Jmol users: I think we have some reasonable out-of-memory error handling now. In this business nothing is perfect, but please check out
http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm and files in http://chemapps.stolaf.edu/jmol/docs/examples-11/jmol-11.jar Jmol 11.7.16 now tries to handle out-of-memory errors in the following situations: -- any operation involving file loading -- any command creating an image (write, for example, setting antialiasing, or creating scalable fonts) -- in general, any script command involving objects (isosurface, for example) If the error occurs with file loading, ZAP will be called, and the error message will display on the screen If the error occurs creating an object such as isosurface, all objects of that type will be deleted in an attempt to recover If the error occurs while rendering, the rendering just doesn't happen. The error message can be retrieved using jmolGetPropertyAsString("errorMessage") or, if scriptCallback is enabled, then the script termination message will contain "null" if there is no error or the error message if there is one. These error messages include general script errors, but you can look for an out of memory error because it will always contain "java.lang.OutOfMemoryError:" as part of the message. I can't guarantee this will work all the time, but my preliminary results at http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm suggest that it's pretty good. I'm interested in what others find when they produce errors using the links on that page or errors of their own. Bob -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users