vaticle / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
190 stars 43 forks source link

Freeze when trying to move schema nodes around #522

Open matterpale opened 2 years ago

matterpale commented 2 years ago

Description

After running the basic schema view query (match $x sub thing;) in a database with a small schema, I try to move things around to get a nicely structured visualization. Within a few seconds, TypeDB Studio freezes and can only be closed.

Environment

  1. OS: Win10, Ubuntu 20.04.3 LTS
  2. TypeDB version: TypeDB 2.5.0
  3. TypeDB Studio version: 2.4.0-alpha-4

Reproducible Steps

  1. In console, to a newly created database, commit a schema such as following:
    
    ## Matter Ontology

define

ATTRIBUTES

a_tag sub attribute, abstract, value string;

a_name sub a_tag;

a_category sub attribute, abstract, value string;

a_location sub attribute, value string, owns a_location;

occurs_at sub attribute, value datetime;

an_amount sub attribute, value long;

amount_unit sub attribute, value string;

ENTITIES

ConcreteEntity sub entity, abstract, # timespace-dependent physical entities owns a_location;

Object sub ConcreteEntity;

Process sub ConcreteEntity,         # a physical occurrence of an event
    owns occurs_at,
    plays duration:process;

Information sub entity, abstract; # entities with loose timespace dependence

RELATIONS

duration sub relation, owns an_amount, # length of time owns amount_unit, # time unit relates process;

RULES

rule location-transitivity: when { $x has a_location $y; $y has a_location $z; } then { $x has $z; };



2. Open that database in TypeDB Studio 2.4.0-alpha-4 and run the default  `match $x sub thing;`

3. Try to drag the schema nodes around the output tab.

## Expected Output

Smooth reorganization of nodes.

## Actual Output

Freeze (or crash?), in the sense that the only responsive part of the app is the query text field (plus, the OS context buttons).
alexjpwalker commented 2 years ago

We should test this in the new Studio.

jamesreprise commented 2 years ago

https://github.com/vaticle/typedb-studio/pull/585

This issue isn't resolved, but this pull request is a step towards that point. Further crashes occur when visualising this schema.