Marvin Sketch Error

User 9fa69eb201

13-11-2007 13:15:17

Dear All,





I am getting the following error, after few few min of drawing in marvin sketch. I am getting this frequently. I have been using the same version for the past one month, but couldn't find any errors. I am not able to draw after i get this error. I am not able to open all the menu bar commands using keyboard.





Marvin Sketch : 4.1.2


Java Version : 1.6.0_01





Error:





Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException


at chemaxon.marvin.sketch.MolEditor.initAtNewPos(MolEditor.java:3279)


at chemaxon.marvin.sketch.MolEditor.setScreenPointerPos0(MolEditor.java:


3243)


at chemaxon.marvin.sketch.MolEditor.setScreenPointerPos(MolEditor.java:3


209)


at chemaxon.marvin.sketch.MolEditor.setPointerPos(MolEditor.java:3189)


at chemaxon.marvin.sketch.swing.SketchCanvas.setScreenPointerPos(SketchC


anvas.java:926)


at chemaxon.marvin.sketch.swing.SketchCanvas.mouseExited(SketchCanvas.ja


va:998)


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


at java.awt.AWTEventMulticaster.mouseExited(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.trackMouseEnterExit(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)

ChemAxon 990acf0dec

13-11-2007 15:59:20

Thank you for the bug report. Would you please detail the drawing steps you done before you received this message? We need this to be able to reproduce the error.





Thank you in advance.

User 9fa69eb201

14-11-2007 05:27:31

Dear Sir,





The errors occured when i try to draw the chemical reaction given in the attached bmp image file. The errors are specific at those points circled (Only when all the others are drawn), but when i just draw the scaffold with default as carbon atom at all points and try to modify the atoms later with the ones given in picture, I get the same errors i described in my previous mail.





Regards,





Anil

ChemAxon 990acf0dec

14-11-2007 09:29:34

Thank you for the details. We will investigate the problem and the bug will be repaired as soon as possible. Until that please note that the new version of Marvin (5.0, to be released soon) all single-step reaction drawing related problems will be solved.

User aec227c3cb

24-04-2014 18:21:50

I see a similar problem, but find it quite hard to consistently reproduce. Here's my relevant Stack Trace:


java.lang.NullPointerException
    at chemaxon.marvin.sketch.MolEditor.findSelectionHPointsAt(MolEditor.java:8270)
    at chemaxon.marvin.sketch.MolEditor.pntAB(MolEditor.java:8005)
    at chemaxon.marvin.sketch.MolEditor.initAtNewPos(MolEditor.java:5086)
    at chemaxon.marvin.sketch.MolEditor.setScreenPointerPos0(MolEditor.java:5069)
    at chemaxon.marvin.sketch.MolEditor.setScreenPointerPos(MolEditor.java:5035)
    at chemaxon.marvin.sketch.MolEditor.setPointerPos(MolEditor.java:5020)
    at chemaxon.marvin.sketch.swing.SketchCanvas.setScreenPointerPos(SketchCanvas.java:728)
    at chemaxon.marvin.sketch.swing.SketchCanvas.mouseEntered(SketchCanvas.java:794)


...


I am using MarvinSketch 6.0.1 with the MarvinBeans library.  Java 1.6.0_51


Any insight on what conditions may be causing this problem?  What variable could be null at MolEditor.java:8270?

ChemAxon f052bdfe3c

25-04-2014 11:07:48

Do you use our API or the desktop Marvin?


A test case when you get this bug, or a code example would be very useful for us to reproduce this issue. (Or at least any hint what was on the canvas, have you draw reactions or graphical objects etc.). If the information is confidential, please send an email for me directly.


Best Regards,


Efi

User aec227c3cb

28-04-2014 14:12:40

I am using the API.


Like you, I am looking for a reliable way to reproduce the issue.  Users have reported this issue on numerous occasions.


I was able to get the error once drawing the reaction in this thread.  It seemed to occur after I opened the sketcher a second time and did a selection.  I'm unsure if I edited the reaction when it was opened the 2nd time.


You have the benefit of having the source code.  Can you provide some information about about what could be a null pointer in the line chemaxon.marvin.sketch.MolEditor.findSelectionHPointsAt(MolEditor.java:8270)?  It may help me create a use case that can reproduce this error.

User aec227c3cb

28-04-2014 14:44:24

An update- it seems like this error is thrown when an entire molecule is selected.  However, there does not seem to be any relevance to the structure itself.  I have to repeatably open/close the Marvin sketcher from the Marvin view and try selecting again and again until I see this error.  It can take anywhere up to 20 attempts to see the issue.

User aec227c3cb

28-04-2014 15:36:51

Ok, I think I've discovered a means to reproduce.  There is definitely a race condition involved.



  1. Use an interface where the Marvin view is enabled for edit with a double-click.

  2. Draw a reaction with a starting product

  3. Close the sketcher view

  4. Double-click the Marvin view to open the sketcher and as quick as you can, select the entire starting product


You may have to do this multiple times, but I've found after a few tries I can get this error.

ChemAxon 2c555f5717

29-04-2014 15:40:02

Dear Beajuest!


   This fix will be in release: 6.4.


Regards:
Balázs