IE hangs on close after MarvinSketch launched from MViewPane

User c98eb4f406

02-03-2006 11:44:32

We deploy a JApplet which includes an MViewPane (instanced from MarvinBeans.jar), and have noticed that closing the browser after a session generally works fine; however, if we open MarvinSketch (by double-clicking on the MViewPane area) during our applet session, many times Internet Explorer (version 6.0.2900) hangs even after we try to close Internet Explorer (the IE window disappears but its icon is still seen in the toolbar and the process is still listed in Task Manager). There is no cpu load, but mem usage is still present.





We have been using Marvin 3.5.1, but this behavior persists in version 4.0.4.





In version 4.0.4, we have also noticed that simply clicking on the MViewPane to select/activate the window (create/destroy the blue frame lines in the corners of MViewPane) generates the following error in the Java console (although MViewPane and MarvinSketch behaviors seem fine):





Java Plug-in 1.5.0_01


Using JRE version 1.5.0_01 Java HotSpot(TM) Client VM





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


at chemaxon.marvin.view.swing.ViewCanvas.focusOnParentIfApplet(Unknown Source)


at chemaxon.marvin.view.swing.ViewCanvas.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.Component.dispatchEvent(Unknown Source)


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


at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)





Please let us know if any other information would be useful .. we'd like to resolve the hang-on-close problem.





Many thanks.

ChemAxon 7c2d26e5cf

03-03-2006 00:14:42

MViewPane and MSketchPane component are designed to integrate it into standalone applications (not into applets). I suggest you to use the Marvin Applets package for web developing. You can control MarvinSketch/MarvinView applets via applet parameters and you can access theirs methods from JavaScripts.


Is it suitable solution for you?

User c98eb4f406

03-03-2006 21:30:35

Hi Tamas,





Thanks very much for the fast reply. Unfortunately, we are using MViewPane as a component inside a larger deployed applet, and so it would not be easy (or perhaps even possible) for us to restructure our use of Marvin as you describe/suggest. Are there any other alternatives?





Thanks again.

ChemAxon 7c2d26e5cf

07-03-2006 12:13:07

I don't know other alternative than debugging your code.


In JApplet.stop() or in JApplet.destroy(), you should despose Marvin windows, explicitly. Calling MarvinPane.closeWindows() and/or MarvinPane.exit() may help.

User c98eb4f406

10-03-2006 07:47:13

Hi Tamas,





Thanks .. I will add some more explicit destruction and let you know if we see any changes.

User c98eb4f406

01-05-2006 09:49:56

Hi Tamas,





Calling exit() explicitly on MarvinPanes in the JApplet.destroy() method seems to solve the hanging nicely!





Thanks.





Cheers,





Andrew