User c23c5e9da4
04-06-2007 19:38:09
java.lang.ArrayIndexOutOfBoundsException: -1
at chemaxon.marvin.util.MolPainter.paintAtom(MolPainter.java:3916)
at chemaxon.marvin.util.MolPainter.paintObjects(MolPainter.java:2370)
at chemaxon.marvin.util.MolPainter.paintDocument(MolPainter.java:606)
at chemaxon.marvin.sketch.MolEditor.paint(MolEditor.java:3757)
at chemaxon.marvin.sketch.swing.SketchCanvas.paintGraphics(SketchCanvas.java:589)
at chemaxon.marvin.sketch.swing.SketchCanvas.paint(SketchCanvas.java:563)
User f359e526a1
05-06-2007 06:26:58
All right, but what is the structure that generates this and when?
User c23c5e9da4
18-06-2007 16:15:12
Since this is happening on the AWT thread within MSketchPane I don't know how to catch it to capture the structure - we have asked our users to alert us when it happens so we can see what is on the screen. But this is a big issue for us - we are considering downgrading until it is resolved.
User c23c5e9da4
19-06-2007 17:00:08
OK - we can now replicate it - open MSketchPane and sketch a simple reaction and then choose undo multiple times from the edit menu and you get this stack trace over and over again
java.lang.ArrayIndexOutOfBoundsException: -1
at chemaxon.marvin.util.MolPainter.paintAtom(MolPainter.java:3916)
at chemaxon.marvin.util.MolPainter.paintObjects(MolPainter.java:2370)
at chemaxon.marvin.util.MolPainter.paintDocument(MolPainter.java:606)
at chemaxon.marvin.sketch.MolEditor.paint(MolEditor.java:3757)
at chemaxon.marvin.sketch.swing.SketchCanvas.paintGraphics(SketchCanvas.java:589)
at chemaxon.marvin.sketch.swing.SketchCanvas.paint(SketchCanvas.java:563)
User f359e526a1
19-06-2007 17:42:12
Cool, thanks, now we have trace it.
User f359e526a1
20-06-2007 13:33:55
Fixed the undo problem - will be in the next release that is coming out very soon.
User c23c5e9da4
09-07-2007 18:40:21
this is still happening in 4.1.9
java.lang.ArrayIndexOutOfBoundsException: -1
at chemaxon.marvin.util.MolPainter.paintAtom(MolPainter.java:3929)
at chemaxon.marvin.util.MolPainter.paintObjects(MolPainter.java:2383)
at chemaxon.marvin.util.MolPainter.paintDocument(MolPainter.java:606)
at chemaxon.marvin.sketch.MolEditor.paint(MolEditor.java:3766)
at chemaxon.marvin.sketch.swing.SketchCanvas.paintGraphics(SketchCanvas.java:590)
at chemaxon.marvin.sketch.swing.SketchCanvas.paint(SketchCanvas.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at chemaxon.marvin.sketch.swing.SketchPanel.paint(SketchPanel.java:978)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent._paintImmediately(JComponent.java:4881)
at javax.swing.JComponent.paintImmediately(JComponent.java:4667)
User c23c5e9da4
09-07-2007 18:56:05
also still happens in 4.1.10
User f359e526a1
09-07-2007 21:48:25
Now I am a bit confused, the fix should be in the release, will check with Tamas.
User f359e526a1
10-07-2007 08:04:28
Turned out these fixes were not included in 4.1.10 as this release is a sort of unscheduled quick fix. So all I promised for 4.1.10 will be in 4.1.11 instead - that is also very close. Sorry for the delay.
User c23c5e9da4
25-07-2007 02:53:13
This is still happening in 4.1.11. To reproduce run this
import chemaxon.marvin.beans.MSketchPane;
import chemaxon.struc.Molecule;
import javax.swing.*;
public class MarvinUndoTest {
public static void main(String[] args) throws Exception {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MSketchPane sketchPane = new MSketchPane();
sketchPane.setMol(new Molecule());
f.add(sketchPane);
f.pack();
f.setVisible(true);
}
}
sketch the attached reaction.png and select undo from the edit menu
and you get this
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at chemaxon.marvin.util.MolPainter.paintAtom(MolPainter.java:3939)
at chemaxon.marvin.util.MolPainter.paintObjects(MolPainter.java:2387)
at chemaxon.marvin.util.MolPainter.paintDocument(MolPainter.java:606)
at chemaxon.marvin.sketch.MolEditor.paint(MolEditor.java:3768)
at chemaxon.marvin.sketch.swing.SketchCanvas.paintGraphics(SketchCanvas.java:590)
at chemaxon.marvin.sketch.swing.SketchCanvas.paint(SketchCanvas.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent._paintImmediately(JComponent.java:4881)
at javax.swing.JComponent.paintImmediately(JComponent.java:4667)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:477)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
ChemAxon 7c2d26e5cf
14-08-2007 16:02:20
This bug has been fixed. In Marvin 4.1.12, undo is going to work fine.