Hi Bob,

I'm now set up to do some investigating about this issue.

in the "interrupt" function in jsmol/j2s/core/core.z.js (which I replaced with 
jsmol/js/core.js) where this.stopped = true;,
I've added the ability to write to window._sb_debugging (an array that I can 
push information for later inspection.

I'm communicating with my jmolObject._script caller through window._sb_script, 
so the interrupt function knows which script is currently being executed.

This writing to my window variables is slowing the interrupt handling down 
enough so that it is pretty easy to observe the visual effects of a rotation 
thread writing to the wrong molecule.

So, I have two tabs that I click on rather randomly.  Each tab runs a script to 
load a molecule script when it is activated.  I click back and forth on the two 
tabs.  The "interrupt" function in jsmol/j2s/core/core.z.js (which I replaced 
with jsmol/js/core.js) is called a lot when I do this. The variable 
this.stopped is always false when the interrupt function is called.

Questions:

1. Should I expect this.stopped to be false when I enter the interrupt 
function?  It seems likely, but I'm not sure.
2. Should I follow the trail of those functions that set this.stopped false, or 
should I follow the trail of those functions that check to see if this.stopped 
is true?

Thanks,

--Chuck

On Feb 25, 2014, at 12:36 PM, Charles Harrison Shubert 
<[email protected]<mailto:[email protected]>> wrote:

Thanks, Bob!

Great timing, I was just setting up to go poking around.

I'm using HTML5.

I'll see if I can figure out what is happening.

Thanks,

--Chuck

On Feb 25, 2014, at 12:27 PM, Robert Hanson 
<[email protected]<mailto:[email protected]>>
 wrote:

First question: Java or HTML5?

If Java, I'm quite surprised. Java is multi-threaded. So I would need to have a 
very specific example to try myself.


If HTML5, the problem is in the way we are emulating multi-threading.

To debug:

1) replace jsmol/j2s/core/core.z.js  with jsmol/js/core.js

2) add some debugging

Alerts won't work here -- I would use System.out.println (to the Jmol 
Javascript console, visible with applet._showInfo(true) ) or document.title (my 
favorite) or possibly console.log (messages can come out of order).

I would look for "this.stopped = true"  in core.js and add something like this 
there:

document.title = +new Date;

The method is called when a thread is interrupted. So maybe your issue is not 
getting the interruption message.

You should also turn off the  hover thread, probably:

set hover off

Bob

--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk_______________________________________________
Jmol-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/jmol-users


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to