mview 5.1.2 AIOOBE

User 677b9c22ff

08-11-2008 05:49:23

Hi,


if a SMILES or SD file is still under creation by an external process and I scroll (using the scrollbar) to the end and to the begin and back and forth I get an AIOOBE. I am using mview 5.1.2 with WIN32 under JAVA1.6.





Tobias





Error:


Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1


at java.io.BufferedInputStream.read(Unknown Source)


at chemaxon.marvin.io.PositionedInputStream.readLine8bit(PositionedInputStream.java:361)


at chemaxon.marvin.io.PositionedInputStream.readLine(PositionedInputStream.java:299)


at chemaxon.marvin.io.formats.AbstractMRecordReader.readLine(AbstractMRecordReader.java:127)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.readLine(MolRecordReader.java:172)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.readCtab(MolRecordReader.java:560)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.readMol0(MolRecordReader.java:193)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.nextRecord(MolRecordReader.java:135)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.skipRecord(MolRecordReader.java:88)


at chemaxon.marvin.io.MRecordImporter.skipRecord(MRecordImporter.java:445)


at chemaxon.formats.MolImporter.skipRecord(MolImporter.java:865)


at chemaxon.marvin.io.MDocSource.skipRecords(MDocSource.java:231)


at chemaxon.marvin.io.MDocSource.seekForward(MDocSource.java:201)


at chemaxon.formats.MolImporter.seekRecord(MolImporter.java:965)


at chemaxon.marvin.view.MDocStorage.tryToExtend(MDocStorage.java:819)


at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:761)


at chemaxon.marvin.view.MDocStorage.getDoc(MDocStorage.java:704)


at chemaxon.marvin.view.swing.modules.SpreadsheetView.getDocument(SpreadsheetView.java:611)


at chemaxon.marvin.view.swing.ViewPanel.getAnimLength(ViewPanel.java:1726)


at chemaxon.marvin.view.swing.modules.SpreadsheetView.setSelectedCellIndex(SpreadsheetView.java:1385)


at chemaxon.marvin.view.swing.ViewPanel.setSelectedCellIndex(ViewPanel.java:2577)


at chemaxon.marvin.view.swing.modules.MoleculeCellEditor.getTableCellEditorComponent(MoleculeCellEditor.java:125)


at javax.swing.JTable.prepareEditor(Unknown Source)


at javax.swing.JTable.editCellAt(Unknown Source)


at chemaxon.marvin.view.swing.modules.ResizableTable.editCellAt(ResizableTable.java:761)


at javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(Unknown Source)


at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)


at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)


at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)


at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)


at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)


at java.awt.Component.processMouseEvent(Unknown Source)


at javax.swing.JComponent.processMouseEvent(Unknown Source)


at java.awt.Component.processEvent(Unknown Source)


at java.awt.Container.processEvent(Unknown Source)


at java.awt.Component.dispatchEventImpl(Unknown Source)


at java.awt.Container.dispatchEventImpl(Unknown Source)


at java.awt.Component.dispatchEvent(Unknown Source)


at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)


at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)


at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)


at java.awt.Container.dispatchEventImpl(Unknown Source)


at java.awt.Window.dispatchEventImpl(Unknown Source)


at java.awt.Component.dispatchEvent(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)


Exception in thread "Thread-1043" java.lang.ArrayIndexOutOfBoundsException: -1


at chemaxon.marvin.io.PositionedInputStream.readLine8bit(PositionedInputStream.java:343)


at chemaxon.marvin.io.PositionedInputStream.readLine(PositionedInputStream.java:299)


at chemaxon.marvin.io.formats.AbstractMRecordReader.readLine(AbstractMRecordReader.java:127)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.readLine(MolRecordReader.java:172)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.nextRecord(MolRecordReader.java:101)


at chemaxon.marvin.io.formats.mdl.MolRecordReader.skipRecord(MolRecordReader.java:88)


at chemaxon.marvin.io.MRecordImporter.skipRecord(MRecordImporter.java:445)


at chemaxon.formats.MolImporter.skipRecord(MolImporter.java:865)


at chemaxon.marvin.io.MDocSource.skipRecords(MDocSource.java:231)


at chemaxon.marvin.io.MDocSource.seekForward(MDocSource.java:201)


at chemaxon.formats.MolImporter.seekRecord(MolImporter.java:965)


at chemaxon.marvin.view.MDocStorage.tryToExtend(MDocStorage.java:819)


at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:761)


at chemaxon.marvin.view.swing.modules.RecordFetcher$2.run(RecordFetcher.java:81)


at chemaxon.marvin.util.ThreadSerializer$CmpThread.run(ThreadSerializer.java:48)





--------


Edit (marvin 5.1.2), WIN32, for SMILES with 10 million SMILES


scrolling fast from begin to end and vice versa (up and down)





chemaxon.formats.MolFormatException: Error parsing SMILES string '' at character 1 ('')


at chemaxon.marvin.io.formats.smiles.SmilesImport.readMol0(SmilesImport.java:925)


at chemaxon.marvin.io.formats.smiles.SmilesImport.readMol(SmilesImport.java:531)


at chemaxon.marvin.io.formats.smiles.SmilesImport.readMol(SmilesImport.java:489)


at chemaxon.marvin.io.MRecordImporter.readDoc(MRecordImporter.java:170)


at chemaxon.formats.MolImporter.readDoc(MolImporter.java:702)


at chemaxon.formats.MolImporter.nextDoc(MolImporter.java:642)


at chemaxon.marvin.view.MDocStorage.readDoc(MDocStorage.java:2494)


at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:772)


at chemaxon.marvin.view.swing.modules.GridBagView.getDocument(GridBagView.java:648)


at chemaxon.marvin.view.swing.modules.GridBagView.setVisibleCanvas(GridBagView.java:1126)


at chemaxon.marvin.view.swing.ViewPanel.setVisibleCanvas(ViewPanel.java:2494)


at chemaxon.marvin.view.swing.modules.GridBagView.setVisibleCell(GridBagView.java:1571)


at chemaxon.marvin.view.swing.modules.GridBagView.visibleCells(GridBagView.java:1772)


at chemaxon.marvin.view.swing.modules.GridBagView.update(GridBagView.java:3417)


at chemaxon.marvin.view.swing.modules.GridBagView.access$1200(GridBagView.java:46)


at chemaxon.marvin.view.swing.modules.GridBagView$9.run(GridBagView.java:3370)


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)

ChemAxon 990acf0dec

09-11-2008 10:12:08

Thank you for the report; we will investigate it.

User ef5e605ae6

10-11-2008 16:54:55

Hi Tobias,





Good news that you could reproduce your previous GridBagView bug with SpreadsheetView too. However, since I do not have your external process, I cannot test this bug either. A lot of related code was rewritten and optimized since 5.1.2, could you please try it with the latest release, 5.1.3?





Peter

User 677b9c22ff

10-11-2008 19:55:08

Hi Peter,


yes I will check with the newer versions. Sometimes I just


report errors, even if the error output may not be very helpful


but mview is an extremely important application so its worth it.


Tobias

User ef5e605ae6

10-11-2008 20:34:39

I'm afraid 5.1.3 is not better, the exception is originated from the AWT event dispatch thread which seem to read the file simultaneously with another thread. I made a workaround to prohibit using I/O this way in the AWT thread (in SpreadsheetView.getDocument) and use the cached molecule instead. I'm not sure it works, it should be tested. 5.1.4 will contain the fix if it does not seem to make anything worse.


Peter