Exception when typing invalid control sequnce in group name

User 57295192cc

25-04-2013 09:21:45

Hello,


It looks like we've managed to find a tricky way to trigger an exception from Marvin Sketch (5.12.3): if you create a group, choose Superatom for type, and for the Name field enter an invalid control sequence like "\3" (the "\" and a number seems to be important), an exception is thrown:


Closing brace ('}') without opening
chemaxon.common.util.text.SimpleTeX.<init>(Unknown Source)
chemaxon.marvin.paint.internal.TextGraphics.<init>(TextGraphics.java:82)
chemaxon.marvin.paint.internal.MolPainter.drawText(MolPainter.java:6047)
chemaxon.marvin.paint.internal.MolPainter.paintSgroupBrackets(MolPainter.java:3197)
chemaxon.marvin.paint.internal.MolPainter.highlightRelatedObject(MolPainter.java:1991)
chemaxon.marvin.paint.internal.MolPainter.hilitSgroup(MolPainter.java:2017)
chemaxon.marvin.sketch.MolEditor.paintAnythingOverSomethingElse(MolEditor.java:6218)
chemaxon.marvin.sketch.MolEditor.paint(MolEditor.java:6139)
chemaxon.marvin.sketch.swing.SketchCanvas.paintGraphics(SketchCanvas.java:402)
chemaxon.marvin.sketch.swing.SketchCanvas.paint(SketchCanvas.java:374)
javax.swing.JComponent.paintChildren(JComponent.java:870)
javax.swing.JComponent.paint(JComponent.java:1046)
javax.swing.JComponent.paintToOffscreen(JComponent.java:5132)
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
javax.swing.RepaintManager.paint(RepaintManager.java:1225)


I'm not sure how likely it is that users run into this you have to enter something clearly invalid, but handling this kind of parsing error would be probably easy, so it might be worth looking into it.


Many thanks,


Pál

ChemAxon 25dcd765a3

29-04-2013 11:09:15

Thank you for the report, we will check it.