Title: Re: Safari-Java problems
Several people in this forum have complained about instances where Safari crashes or hangs unexpectedly upon loading Jmol. The problems have been difficult to reproduce across different machines, even ones running the same system, and sometimes even on the same machine and browser. The problems seem to have arisen only after Apple's Java updates 1 and 2. 

After examining a crash log, a programmer at ChemAxon, owners of MarvinSketch (which was causing these problems for me) had some insight that I thought I should share.

Apparently, the crashing/hanging problem (in our case, anyway) is caused by a confluence of three circumstances:

(1) Initialization of the applet may be particularly slow because of a slow machine, slow connections, or a large applet.
 (2) The _javascript_ on the Web page is calling the applet a second time before initialization of the applet is complete, creating a Java exception.
 (3) The browser's _javascript_ interpreter does not accept Java exceptions, so the browser hangs or crashes.

Item (1) explains why the crashing problem is so difficult to reproduce over different systems. Items (1) and (2) explain why certain pages cause the browser to crash, and other, similar pages do not. Item (3) explains why this particular problem seemed to appear only after Apple's recent Java updates.

In our case, ChemAxon is correcting Marvin's code so that a Java exception is no longer generated if Marvin is called again before initialization is complete. You may want to examine whether a similar solution might work for Jmol.

I'm not a Java programmer, so if you have any questions about any of this, I suggest you post them at the ChemAxon forum, http://www.chemaxon.hu/forum . 

-- Bob Grossman

Reply via email to