Hi

The simple "select 25 /1 " command manages to freeze Jmol when used as  
an application.
A couple of things need to come together to cause this:
- the evalString needs to be called before a structure is being loaded
- a particular group and model needs to be selected
- the stack in Eval then has entries of null and that's where the  
thread gets stuck...

here some example code:

        JmolViewer viewer = jmolPanel.getViewer();

             viewer.evalString("select 25 /1 ");

             String pdb = "ATOM      2  CA  ALA     1      43.888   
10.862  -6.231     1     0\n"+
             "ATOM      7  CA  PRO     2      46.689  12.815  -4.561      
1     0\n"+
             "ATOM     14  CA  ARG     4      44.872  15.621  -2.730      
1     0\n"+
             "ATOM     25  CA  LYS     5      48.356  17.146  -2.714      
1     0\n"+
             "ATOM     34  CA  PHE     6      49.089  18.463   0.778      
1     0\n"+
             "ATOM     45  CA  PHE     7      48.167  22.143   0.886      
1     0\n";
             viewer.openStringInline(pdb);
             viewer.evalString("select * ; wireframe on;");

Eval gets stuck with the following exception:

java.lang.NullPointerException
        at org.jmol.viewer.Eval.expression(Eval.java:836)
        at org.jmol.viewer.Eval.select(Eval.java:2875)
        at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:478)
        at org.jmol.viewer.Eval.runEval(Eval.java:105)
        at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2246)
        at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
        at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
        at  
org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java 
:146)
        at java.lang.Thread.run(Thread.java:552)


Regards,
Andreas


-----------------------------------------------------------------------

Andreas Prlic      Wellcome Trust Sanger Institute
                               Hinxton, Cambridge CB10 1SA, UK
                         +44 (0) 1223 49 6891


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to