"AWT-EventQueue-0" java.lang.Error: Cannot call in

User 677b9c22ff

29-05-2009 21:26:50

Hi,


I got the following error with this file: http://cheminf.cmbi.ru.nl/biometa/flat/


molfiles.sdf.gz


Product Version:    MarvinView 5.1.3_2


The files probably contains some corrupt structures,


but it would be nice to catch the error or skip the broken ones and replace


with a black cross or error message and just allow scrolling further.


 


Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at chemaxon.marvin.io.MDocSource.skipRecords(MDocSource.java:273)
at chemaxon.marvin.io.MDocSource.seekForward(MDocSource.java:203)
at chemaxon.formats.MolImporter.seekRecord(MolImporter.java:968)
at chemaxon.marvin.view.MDocStorage.tryToExtend(MDocStorage.java:819)
at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:761)
at chemaxon.marvin.view.swing.modules.GridBagView.getDocument(GridBagView.java:654)
at chemaxon.marvin.view.swing.modules.GridBagView.setVisibleCanvas(GridBagView.java:1135)
at chemaxon.marvin.view.swing.ViewPanel.setVisibleCanvas(ViewPanel.java:2494)
at chemaxon.marvin.view.swing.modules.GridBagView.setVisibleCell(GridBagView.java:1580)
at chemaxon.marvin.view.swing.modules.GridBagView.visibleCells(GridBagView.java:1781)
at chemaxon.marvin.view.swing.modules.GridBagView.update(GridBagView.java:3447)
at chemaxon.marvin.view.swing.modules.GridBagView.access$1200(GridBagView.java:46)
at chemaxon.marvin.view.swing.modules.GridBagView$9.run(GridBagView.java:3400)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Cheers Tobias


 

User ef5e605ae6

30-05-2009 05:02:31

Hi Tobias,


Please use the latest version. Record reading has fundamentally changed in MarvinView 5.2, I doubt you could produce such an error with recent versions.


cheers,
Peter

User 677b9c22ff

02-06-2009 18:15:10

Hi,


you are right, I upgraded to Mview 5.2.2 and its very pleasant with all kinds


of larger and weird files. Scrolling through files with 2 to 5 million compounds is really fun.


The memory footprint also seems reasonable. Thank you!


 


BUT. For whatever reason the current testcase crashes the whole program,


without catching the error in the current window (which is weird, because whenever I


had the older mview batch files, the errors would correctly show up in the current batch window)


The current error probably kills the whole process (on purpose?) which I dont like


because then the window just disappears without any error message.


 


So the error here with the same test file (see avobe) in this case with MVIEW MarvinView 5.2.2


and java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06)


I used the file molfiles.sdf and set an 11x11 matrix and then scrolled down, and then


it crashes.


 


Z:\>mview molfiles.sdf
chemaxon.formats.MolFormatException: Bad multiple group subscript, not an integer
        at chemaxon.marvin.io.formats.mdl.MolImport.setSgroupSubscript(MolImport.java:2121)
        at chemaxon.marvin.io.formats.mdl.MolImport.readPropertiesBlockV2(MolImport.java:1316)
        at chemaxon.marvin.io.formats.mdl.MolImport.readCtab(MolImport.java:772)
        at chemaxon.marvin.io.formats.mdl.MolImport.readMol0(MolImport.java:644)
        at chemaxon.marvin.io.formats.mdl.MolImport.readMol(MolImport.java:292)
        at chemaxon.marvin.io.MRecordImporter.readDoc(MRecordImporter.java:375)
        at chemaxon.marvin.io.MRecordImporter.readDoc(MRecordImporter.java:356)
        at chemaxon.marvin.io.MRecordImporter.readDoc(MRecordImporter.java:168)
        at chemaxon.formats.MolImporter.readDoc(MolImporter.java:734)
        at chemaxon.formats.MolImporter.nextDoc(MolImporter.java:675)
        at chemaxon.marvin.view.MDocStorage.readDoc(MDocStorage.java:2630)
        at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:804)
        at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:762)
        at chemaxon.marvin.view.swing.RecordFetcher$3.run(RecordFetcher.java:240)
        at chemaxon.marvin.view.SequentialScheduler$CmpRunnable.run(SequentialScheduler.java:53)
        at chemaxon.marvin.view.SequentialScheduler$1.run(SequentialScheduler.java:209)
Z:\>


 

User ef5e605ae6

03-06-2009 05:40:28











It is not a crash, it catched the exception and then exited deliberately because the clause was considered to be impossible at that point. I changed to code to display an error dialog and return from that method instead of exiting. It seems to work. However, I cannot "fix" the mdl molfile import bug because the file is buggy in my opinion. As far as I know, multiple S-group multipliers must be integers but you have an "x"  in line 289577 of your molfiles.sdf.


User 677b9c22ff

03-06-2009 16:53:15

Hi,


thanks. Yes there are lots of bugs in many files, but a hardened application


is always better. The new faster handling for large files is really very nice, for handling


large SDF files MVIEW is really the killer application.


Cheers


Tobias