Losing topic tree configuration

Found a bug in Wandora. Please report it here.

Losing topic tree configuration

Postby mordenkainen » Sun Feb 15, 2015 5:27 pm

I had added new topic tree tab with custom relation (belongs_to). After that I saved project and restarted wandora to check if it saves tree tab configuration between runs. I discovered that custom tab is preservred. But all associations was removed. The three builtin-in (subclass, instance, default association) was removed as well as newly created one.

And what is more important associations is removed from wandora completely. Newly created projects also misses assocations, and all they show in the topic tree is Wandora class. All subclasses and instances relations is cleared from the tree, so the Wandora class stays here alone. Still I can found scheme topics with finder. But not with tree.

How can I restore them and make changes persistent?

update: I reproduced error another time. On Wandora start I get
Code: Select all
Root topic not found for topic tree. Disabling tree.
. After that entire <trees> subtree was removed from global options.xml. It's very dubious to store project-related data such as root topic inside global configuration. I'm not surprised that something went wrong
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: Losing topic tree configuration

Postby akivela » Sun Feb 15, 2015 7:46 pm

I suppose you want to save configuration of a Tree panel window that is added with a menu option View > New panel > Tree. At the moment Wandora doesn't save configurations of these Tree panels but the user has to configure Tree panel again after restart.

But, the user can create new Topic tree tabs beside Topics and Finder tabs on the left of Wandora window. Right mouse click the empty space right of the Finder tab and Wandora views a popup menu. Choose menu option Create new tab. Wandora opens a topic tree configuration dialog. Enter name for the tree, select root and tree relations, and click OK button. These settings are now stored to options (build/resources/conf/options.xml) and survive even if application restarts.

However, notice, tree root is a topic and tree relations are specified by topics, and Wandora doesn't create these topics while it restarts. This is why Wandora may inform that "Root topic not found for topic tree. Disabling tree." Although the settings were found in application options, Wandora coudn't find required topics. These topics must be either loaded, imported or othewise created before the tree works as intended.

Usually it is much more convenient to create one additional topic that is an instance of or a subclass of the Wandora class. This additional topic now shows up in any topic tree and you can use it as a class of or a superclass of your topics.
akivela
Site Admin
 
Posts: 257
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Losing topic tree configuration

Postby mordenkainen » Sun Feb 15, 2015 8:50 pm

I've exactly done as you described. The bug is that wandora does not wait for topic to be loaded, it instantly removes types from topic tree. Even if I load root topic from a wandora project later, all types including instance, subclass, default association and any custom type are removed. So all trees would have single root element and no other nodes in the tree. Because all associations used for extracting child nodes is already gone.
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: Losing topic tree configuration

Postby mordenkainen » Mon Feb 16, 2015 12:34 am

I continued to test custom tree tabs. Root topic turns out to be not the case. The source of the troubles is custom topic tree relation with custom types. I may edit type relations, add custom association to the list and they would be shown in the configure topic tree dialogue. But if I switch to another tree tab or activate topic tree inside choose dialog all topic tree relations are instantly removed. Already existed topic trees continues to work normally, but newly created have nothing except root topic.
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: Losing topic tree configuration

Postby akivela » Mon Feb 16, 2015 3:15 pm

After some investigation I found that Wandora had a real bug in the handling of custom tree configurations. Wandora used to wipe out all custom tree relations. Thank you very much, Mordenkainen, for your help in spotting the bug.

I have silently fixed the bug and updated Wandora's distribution packages in Wandora's web site ( http://wandora.org/www/download/ ). Also, our Github repository contains fixed sources. The distribution packages in Sourceforge have not been updated yet.

Kind Regards,
Aki / Wandora Team
akivela
Site Admin
 
Posts: 257
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Losing topic tree configuration

Postby mordenkainen » Mon Feb 16, 2015 8:44 pm

Thank you for fast reaction.

There are few notes that seems be appropriate for http://wandora.org/wiki/How_to_install_Wandora under section of Upgrading

The right way to upgrade Wandora is to completely remove folder with existed version and then reinstall the newer version. You should keep somewhere build/resources/conf/options.xml and probably some other files which location and existence is unknown to me.

If you ignore warning about completely removing old version you may get some error like this:
Code: Select all
*****************************************************
***   WANDORA - THE KNOWLEDGE MANAGEMENT STUDIO   ***
***     Copyright (C) 2004-2015 Wandora Team      ***
***              http://wandora.org               ***
*****************************************************
Xms750m Xmx1000m
Exception in thread "main" java.lang.VerifyError: Stack map does not match the one at exception handler 83
Exception Details:
  Location:
    org/wandora/application/tools/extractors/rekognition/AbstractRekognitionExtractor.getBestMatch(Lorg/wandora/dep/json/JSONObject;D)Ljava/lang/String; @83: astore
  Reason:
    Type 'org/wandora/dep/json/JSONException' (current frame, stack[0]) is not assignable to 'java/lang/RuntimeException' (stack map, stack[0])
  Current Frame:
    bci: @36
    flags: { }
    locals: { 'org/wandora/application/tools/extractors/rekognition/AbstractRekognitionExtractor', 'org/wandora/dep/json/JSONObject', double, double_2nd, 'org/wandora/dep/json/JSONArray', double, double_2nd, 'java/lang/String', integer, 'org/wandora/dep/json/JSONObject' }
    stack: { 'org/wandora/dep/json/JSONException' }
  Stackmap Frame:
    bci: @83
    flags: { }
    locals: { 'org/wandora/application/tools/extractors/rekognition/AbstractRekognitionExtractor', 'org/wandora/dep/json/JSONObject', double, double_2nd, 'org/wandora/dep/json/JSONArray', double, double_2nd, 'java/lang/String', integer, 'org/wandora/dep/json/JSONObject' }
    stack: { 'java/lang/RuntimeException' }
  Bytecode:
    0x0000000: 2b12 28b6 0029 3a04 2839 0501 3a07 0336
    0x0000010: 0815 0819 04b6 002a a200 4319 0415 08b6
    0x0000020: 002b 3a09 1909 122c b600 2db8 002e 390a
    0x0000030: 180a 1805 979e 001b 1909 122f b600 2d3a
    0x0000040: 0c19 0c12 3012 31b6 0032 3a07 180a 3905
    0x0000050: a700 053a 0a84 0801 a7ff b919 07c7 000d
    0x0000060: bb00 3459 1235 b700 36bf 1907 b0       
  Exception Handler Table:
    bci [36, 80] => handler: 83
    bci [36, 80] => handler: 83
  Stackmap Table:
    full_frame(@17,{Object[#184],Object[#185],Double,Object[#186],Double,Object[#187],Integer},{})
    append_frame(@80,Object[#185])
    same_locals_1_stack_item_frame(@83,Object[#188])
    chop_frame(@85,1)
    chop_frame(@91,1)
    same_frame(@106)

   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:260)
   at org.wandora.application.WandoraToolManager2.scanAllTools(WandoraToolManager2.java:250)
   at org.wandora.application.WandoraToolManager2.<init>(WandoraToolManager2.java:108)
   at org.wandora.application.Wandora.initializeWandora(Wandora.java:468)
   at org.wandora.application.Wandora.<init>(Wandora.java:286)
   at org.wandora.application.Wandora.main(Wandora.java:2288)


May be information about this exception worth to be presented in the user FAQ: http://wandora.org/wiki/FAQ_for_Wandora_user
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: Losing topic tree configuration

Postby akivela » Mon Feb 16, 2015 10:43 pm

Thanks for the idea! I'll take your experiences of upgrading Wandora and write a short chapter into the Wandora documentation.
akivela
Site Admin
 
Posts: 257
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron