Save/load session bug in 3.92

24 views
Skip to first unread message

Mungo Carstairs

unread,
Jun 19, 2015, 10:25:29 PM6/19/15
to varn...@googlegroups.com
Hi,

The next release of Jalview will include the ability to save and restore any open Varna sessions.
I am trying to update Jalview from Varna 3.91 to 3.92 and noticed this problem:
When the session is written to XML, this includes the toString() version of the BP_STYLE enum value (toString() added in 3.92).
When it is read back, this fails to resolve using the getStyle() method.
As a result, VARNAConfig._mainBPStyle is null, and this causes a NullPointerException at the switch statement in VARNAPanel.drawBasePair().

I think the solution is just to change VARNAConfig.toXML()
from

atts.addAttribute("","",XML_VAR_MAIN_BP_STYLE,"CDATA"""+_mainBPStyle);

to

atts.addAttribute("","",XML_VAR_MAIN_BP_STYLE,"CDATA"mainBPStyle.getOpt());


but I haven't tested this (or looked for any similar problems elsewhere).


One other observation on reloading from the saved session:

The <RNA mode=""> attribute is written, but not read on load.

As a result reloaded models all default to RADIATE.

Would it be possible to set this value when the XML is parsed please?


Thanks!


Mungo

Yann Ponty

unread,
Jun 20, 2015, 1:30:52 AM6/20/15
to varn...@googlegroups.com, gmu...@gmail.com
Dear Jim & Mungo,

Thanks for the feedback, and for tracking down so effectively the origin of the bug!!

I implemented your recommended changes in a minor 3.93 release, tested them, and it seems to fix both issues.
The source is available on the main VARNA website at:
  http://varna.lri.fr/index.php?page=downloads
To the best of my knowledge this is the only change between the 3.92 and 3.93 version (but I haven't been very active on VARNA lately).

Please let me know if you experience any further trouble and I'll try to react ASAP!

Cheers,

Yann

Mungo Carstairs

unread,
Jun 22, 2015, 10:40:33 AM6/22/15
to varn...@googlegroups.com, gmu...@gmail.com
Thanks Yann, that does indeed seem to fix these issues. The quick response is appreciated.

The only other diff to 3.92 was the removal of some debug output from class BasicINI.

Best regards,

Mungo
Reply all
Reply to author
Forward
0 new messages