Random errors from MarvinSketch when trying to save

User 57295192cc

25-03-2013 14:34:54

Hi,


We have an MSketchPane embedded in a dialog. The whole application is launched from an applet. File -> Save As sometimes fails silently, with a stack trace on the applet console. After a second try it seems to work. I suspect a problem related to loading classes when lazily loading the necessary jars. It only seems to happen if loading a jar takes long enough. (I couldn't reproduce the problem running everything on a local machine.)



First occasion:



java.lang.IllegalThreadStateException
chemaxon.marvin.util.MarvinModule.load(Unknown Source)
chemaxon.marvin.common.swing.MolPanel.loadLoadSaveModule(MolPanel.java:4325)
chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4290)
chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4273)
chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4257)
chemaxon.marvin.sketch.swing.SketchPanel.doSaveAs(SketchPanel.java:2016)
chemaxon.marvin.sketch.swing.actions.SaveAsAction.actionPerformed(SaveAsAction.java:27


Second occasion:



java.lang.RuntimeException: java.lang.ClassCastException:
< our JDialog subclass that contains MSketchPane >
cannot be cast to java.awt.Frame
at chemaxon.marvin.util.MarvinModule.load(Unknown Source)
at
chemaxon.marvin.common.swing.MolPanel.loadLoadSaveModule(MolPanel.java:4325)
at chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4290)
at chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4273)
at chemaxon.marvin.common.swing.MolPanel.saveMolfile(MolPanel.java:4257)
at chemaxon.marvin.sketch.swing.SketchPanel.doSaveAs(SketchPanel.java:2016)
at
chemaxon.marvin.sketch.swing.actions.SaveAsAction.actionPerformed(SaveAsAction.java:27)



Could you take a look at this please?



Thanks,


Pal


	
	

ChemAxon 2c555f5717

26-03-2013 10:41:59

Dear Pal!


   Unfortunatelly it is a bug on our side. I have fixed it, and it will be in our next patch release. Until that you can only embed MSketchPane to a Frame correctly.


Regards:
Balázs 

User 57295192cc

26-03-2013 10:59:11

Hi Balázs,


Thanks very much for the quick reply and evaluation! Looking forward to the patch.


Many thanks,


Pál

User 57295192cc

09-04-2013 09:48:41

Hi Balázs,


Would it be possible to obtain the patch to fix this issue?  Looks like this is becoming urgent for our own product release, and unfortunately I can see no workarounds... so any help would be appreciated.


Thanks,


Pál

ChemAxon 2c555f5717

09-04-2013 10:54:55

Dear Pál!


   You can download Marvin 5.12.2. Have you tried it? Does it still fail with dialogs? Do you get a new error message?


Regards:
Balázs 

User 57295192cc

09-04-2013 11:01:38

Hi Balázs,


Ah, so the patch should be included in 5.12.2? That's really good news! I didn't see it in the release notes, so I suppose not all minor changes were listed there. I'll try 5.12.2 then and see how it goes.


Thanks,
Pál

ChemAxon 2c555f5717

09-04-2013 11:26:48

It was commited minutes befor the commit deadline, and skipped administration. I am sorry for this trouble.

User 57295192cc

10-04-2013 11:53:09

Hi Balázs,


No problem, thanks again! I couldn't reproduce the error with 5.12.2 so far (but haven't done a very extensive testing -- and it didn't appear every time originally).
Unfortunately I've run into another problem (NullPointerException coming from ToolBarBoxLayout), which I orignally thought was caused by the same issue, but it's apparently not -- I'll post it in another topic.


Pál

ChemAxon 2c555f5717

10-04-2013 11:54:54

The build of the next patch just have started, but we will investigate the new issue as well.