sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Upgrade Jmol to 12.3.27, Advance Jmol Interactive Features in Flask Notebook #12299

Closed gutow closed 12 years ago

gutow commented 12 years ago

This ticket provides the following advanced interactive features to Jmol in the notebook:

  1. Initial display is a static image created by Jmol (if a javaVM is available on the server) or Tachyon. This means all browsers and devices will at least be able to see a 3-D image.
  2. The live applet can be loaded by clicking on a "Make Interactive..." button.
  3. Colors can be changed without recalculating
  4. spin on checkbox
  5. high quality checkbox
  6. Meshes can be displayed without recalculating (no sparkles either :))
  7. Transparency can be adjusted without recalculating
  8. Applet size can be adjusted
  9. Applet can be displayed in its own window
  10. Can download a file that the Jmol application can open to recreate the exact view shown on the web page. This allows for more sophisticated manipulation and the semi-automatic creation of web pages that include this live 3-D image.
  11. Solves memory problems associated with opening too many Jmols at once, by automatically putting Jmols that are not being used to sleep.

Explicit Installation Instructions for <=sage-5.1:

  1. Install the flask notebook by following the instructions at #11080.
  2. Then do the following to apply the patches and install an updated version of Jmol.
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654505/trac-12299_java_doctest_opt.patch.gz

./sage --hg -R devel/sagenb qimport -P https://github.com/sagemath/sage-prod/files/10654494/trac_12299_adv_jmol_nb.patch.gz
./sage --hg -R devel/sagenb qimport -P https://github.com/sagemath/sage-prod/files/10654495/trac_12299_old_wksht.patch.gz
./sage --hg -R devel/sagenb qimport -P https://github.com/sagemath/sage-prod/files/10654497/trac_12299_server_sync_and_UI.2.patch.gz

./sage -f  "http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p2.spkg"

./sage -b

Explicit Installation Instructions for >sage-5.1:

  1. Install sagenb 0.10.x by following the instructions at #13121 - those instructions include everything necessary to test this ticket.

Notes:

If you are doing this in a different way you need to:

Depends on #11080 Depends on #11078 Depends on #11503 Depends on #13121

Upstream: Fixed upstream, in a later stable release.

CC: @novoselt @strogdon @ppurka @kini

Component: notebook

Keywords: Jmol, 3D, notebook

Author: Jonathan Gutow

Reviewer: Karl-Dieter Crisman, Steven Trogdon, Punarbasu Purkayastha, John Palmieri, Dan Drake

Merged: sage-5.4.beta0

Issue created by migration from https://trac.sagemath.org/ticket/12299

gutow commented 12 years ago
comment:43

Thanks. This gives me a sequence I can follow to see what is happening. I believe there is a collision between signed and unsigned applets. I may have to convert all open applets to signed...This may take a while to figure out, but I think it is important. Replying to @strogdon:

In trying to isolate exactly what triggers the above I found that if I don't try to recover the Advanced Controls on the applet that was used to download the view as a jmol file (Download this view) then the worksheet doesn't seem to freeze as I make other applets interactive. And eventually this applet that was used to download the view as a jmol will be put in a sleep state that can then be made interactive. So, it seems that if an applet is unsigned and one wishes to save the view in a jmol file, to avoid freezes the best thing to do is to not re-evaluate its cell.

gutow commented 12 years ago

Changed work issues from old worksheets don't work to old worksheets don't work, signed and unsigned applet collision

kcrisman commented 12 years ago
comment:45

Here's an interesting thing I wasn't expecting.

More than 9 Jmols have been launched on the worksheet since it was last openned. Unable to get a static image from Jmol#0 You might want to try Chrome as this problem does not exist with Chrome on MacOS.

And indeed, a few have a little message to that effect, and no static image. Looks like something added on the previous ticket, though I'm using Safari, not FF, on Mac.

So one could sort of jam up a worksheet. I was able to get all the plots to vanish by playing a little game where I chased them around, and then got the advanced menu to try to generate a static image, which would (intentionally, I guess) fail. What is the story behind this? Can Jmol not detect that there are no longer any live images, and hence try again to generate a static one, or would this be hard to work around?

I do note that quitting and reopening the page gives normal behavior. But just restarting inside the worksheet doesn't.

I tried to recreate strogdon's signed applet issue. I couldn't get exactly that, but I did note that once the signed applet has been requested (not downloaded, as in his), there doesn't seem to be any way to go back to the unsigned applet - even reevaluating the cell doesn't do it.


I also tried to see if I could get away from the problems with old Jmols, but try as I might it wouldn't work. Re-evaluating will sometimes generate a png for the next time one opens the page, but I can't get it to consistently "just work". Now sometimes even new cells in this old worksheet give the same error message. It's puzzling and frustrating.

kcrisman commented 12 years ago
comment:46

I am trying with secure=True. Other than a few extra messages, I don't notice any difference. The only thing is that once I try to download an applet, then all the applets I wake up after that point have the big red Jmol_S thing that strogdon noted above. But otherwise there doesn't seem to be a problem on Safari 5, at least.

I like this enough, even with the work issues, that I'm going to ask on sage-devel if anyone cares about having to wake things up by default. If there is enough outcry, this would have to be dealt with somehow.

gutow commented 12 years ago
comment:47

Replying to @kcrisman:

Here's an interesting thing I wasn't expecting. More than 9 Jmols have been launched on the worksheet since it was last openned. Unable to get a static image from Jmol#0 You might want to try Chrome as this problem does not exist with Chrome on MacOS. And indeed, a few have a little message to that effect, and no static image. Looks like something added on the previous ticket, though I'm using Safari, not FF, on Mac. 

This is a limitation of Safari memory allocation, that I haven't double checked on in a while. Your problems indicate that it has not changed. I will check, but I do not think I can fix it. It appears to be a memory leak in MacOS Safari. This is why you get the suggestion to switch to Chrome, which does not have this problem. The symptom I saw was If you open more than a certain number of java applets on a page in sequence, even if they are not left open, things get messed up.

I also tried to see if I could get away from the problems with old Jmols, but try as I might it wouldn't work. Re-evaluating will sometimes generate a png for the next time one opens the page, but I can't get it to consistently "just work". Now sometimes even new cells in this old worksheet give the same error message. It's puzzling and frustrating.

I have found the problem. There is a change in the way the flask notebook provides information about the path to the cell data. This effects the command script that launches Jmol. I hope to have time tonight to write a fix. I haven't tested this yet, but I think that you should see the same problem with old worksheets in the flask notebook without the enhancements from this ticket.

gutow commented 12 years ago

fix Jmol errors on loading pre-flask worksheets

gutow commented 12 years ago

Description changed:

--- 
+++ 
@@ -26,6 +26,7 @@
 sage: hg_sagenb("qfinish -a")
 sage: hg_sage.apply("https://github.com/sagemath/sage-prod/files/10654493/trac_12299_plot_3D_static_img.patch.gz")
 sage: hg_sagenb.apply("https://github.com/sagemath/sage-prod/files/10654494/trac_12299_adv_jmol_nb.patch.gz")
+sage: hg_sagenb.apply("https://github.com/sagemath/sage-prod/files/10654495/trac_12299_old_wksht.patch.gz")
 sage: exit
 ./sage -f  "http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg"
 ./sage -b
@@ -38,12 +39,14 @@
 The development version of Jmol is necessary.  Install this .spkg:
 http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg

-Two patches are necessary:
+Three patches are necessary:

 A patch to plot3d in Sage: [attachment: trac_12299_plot_3D_static_img.patch](https://github.com/sagemath/sage-prod/files/10654493/trac_12299_plot_3D_static_img.patch.gz)

 A patch to a number of files in sagenb: [attachment: trac_12299_adv_jmol_nb.patch](https://github.com/sagemath/sage-prod/files/10654494/trac_12299_adv_jmol_nb.patch.gz)

+Patch so old worksheets with Jmol load without error (path fix): [attachment: trac_12299_old_wksht.patch](https://github.com/sagemath/sage-prod/files/10654495/trac_12299_old_wksht.patch.gz)
+
 These patches include all the changes in #9238 plus.

 NOTE TO REVIEWERS: Please check that things work for the notebook running in secure mode as well as the default insecure launched by the generic "notebook()" command.
gutow commented 12 years ago
comment:48

Attachment: trac_12299_old_wksht.patch.gz

In the old worksheet patch I chose to generate static images if they do not exist. An alternative is just to fix the path so Jmol loads and print a message suggesting the cell be re-executed to generate a static image. Even without the image the interactive Jmol should now load properly. The advantage of the alternative is that no calls to the sage server would be necessary. The image generation depends on Sage+Jmol. It is not done by the notebook.

gutow commented 12 years ago

Changed work issues from old worksheets don't work, signed and unsigned applet collision to signed and unsigned applet collision

kcrisman commented 12 years ago
comment:49

No luck. I get the same error messages, re-evaluating doesn't help. I also get a new message, quite a while after the original messages recommending re-evaluating etc.

could not find applet jmolApplet0

I suppose it could just be this one worksheet, but at any rate this definitely needs more testing. I should point out that your new patch seems to only affect the generation of the static images, from how I read it, and that part is fixed, they are fine. Maybe there also is trouble finding the live applets in a similar way?

kcrisman commented 12 years ago

Changed work issues from signed and unsigned applet collision to signed and unsigned applet collision, old worksheets may not work all the time

gutow commented 12 years ago
comment:50

Replying to @kcrisman: e-mail me the worksheet please, (gutow@uwosh.edu). This is odd.

kcrisman commented 12 years ago
comment:51

e-mail me the worksheet please, (gutow@uwosh.edu). This is odd.

I uploaded it to the test server first. I tried to share it with you, but maybe you didn't have an account on it. I'll email it as well. It doesn't work right there, either.

By the way, I got

Jmol Applet #0 is having trouble loading.  Will retry once.

on the test server for a new worksheet, but then it eventually did come up fine and so forth.

Remind me why we aren't loading the "High Quality" view right away? I'm sure there's a good reason, but it just looks so much nicer that I'm surprised we don't just use it by default.

kcrisman commented 12 years ago
comment:52

Also, sometimes timing seems to be off. On the test server, I made a cell on a page with an already-functioning Jmol image, and got

script ERROR: script ERROR: io error reading
/home/sagetest/.sage/sage_notebook.sagenb/home/__store__/9/9e/9eb/9eba/k\
crisman/0/cells/3/sage0-size500-747143461.jmol.zip|SCRIPT:
java.io.FileNotFoundException:
/home/sagetest/.sage/sage_notebook.sagenb/home/__store__/9/9e/9eb/9eba/k\
crisman/0/cells/3/sage0-size500-747143461.jmol.zip (No such file or
directory)

But then when I re-evaluated it, all was well. Maybe this is unavoidable in any case with a remote server on occasion.

kcrisman commented 12 years ago
comment:53

Different note. It's possible to mess things up (empty Jmol areas, unable to load messages, dying areas) by clicking to wake up applets really quickly, six or seven in a row. I don't think that's really a regression, because before they would have just been awake and taking up memory, but at any rate I wanted to let you know. This is on FF on Mac, the worst-case scenario (though it does work despite the nasty-sounding warning message I get!).

On Chrome on Mac, no problems.

kcrisman commented 12 years ago
comment:54

Trying a (virtual) Windows XP right now.

Weirdly, I do not have trouble with my suspect worksheet in certain cases! All on the test server:

gutow commented 12 years ago
comment:55

Replying to @kcrisman:

Trying a (virtual) Windows XP right now.

  • IE 8 - no dice. I do get the "If no image appears ..." message about the 3-D viewer being updated, but re-evaluating does not help.

Since this seems to be related to issues of IE8 handling jquery functions differently depending on where they are on the page, I don't think I can fix this easily.

Did you at least get the warning that things were not likely to work? It should have read something like: "Many of the advanced 3-D viewing functions DO NOT work in Internet Explorer..." Or are things failing before then?

kcrisman commented 12 years ago
comment:56

Regarding IE 8 on XP, as I said I get the "If no image appears" message and something about re-evaluating. I did not get the message you report.

Weirdly, I do not have trouble with my suspect worksheet in certain cases! All on the test server:

  • Using Chrome on XP
  • Using FF on XP
  • Using FF on Mac But it still doesn't work with Safari on Mac (just the old worksheet, and just that one).

Update: gutow discovered this was due to a weird Geogebra applet embedding attempt left in that particular worksheet that for some reason was causing the trouble.

Also, based on the sage-devel discussion, sounds like people are ok with not having immediate interaction, and obviously Jonathan is worry about overlapping requests to Jmol. I'm still not sure this is advisable, but be it on their heads.

I'd still ask for some reorganization of the menus but that is probably for another ticket, given the current state of the applet in 5.0 being much more difficult to follow than this new one, which only needs tweaking.

At least some people are reporting success on FF on Linux. Apparently some Opera has trouble there. But maybe Linux is okay, then, at least many of them.


What remains to look at:

gutow commented 12 years ago
comment:57

Replying to @kcrisman:


What remains to look at:

  • Someone to do at least brief testing on Windows 7. I will eventually be able to do that, but I'm not sure when yet.

I may be able to do that at work tomorrow...

  • The signed/unsigned issue.

I cannot reproduce the problem...so I think this will have to wait until we get more info.

  • The secure/insecure notebook issue, if it needs more testing.

I think this is resolved. I cannot reproduce the hangs I sometimes saw. There is no question that loading an unsigned applet causes the initial load to slow down, but after that there seems to be no trouble.

  • Someone has to create an upstream pull thingie - the ticket is already open on github. I think that it would be easiest for kini to do this :) but maybe we should wait until it otherwise has positive review.

I was going to try, but see a problem. This ticket requires changes to both the notebook and Sage. The pull would just be for notebook, right?

  • Anything else? This is looking good, it would be great to get it in 5.2 along with the new notebook.

I'm going to clear the two work issues and replace with "decide default display quality". See this google thread 3D plotter.

gutow commented 12 years ago

Changed work issues from signed and unsigned applet collision, old worksheets may not work all the time to decide default display quality

kcrisman commented 12 years ago
comment:59

Followups now that I've had time to think.

This is looking really close to ready, though.

gutow commented 12 years ago

Changed work issues from decide default display quality to decide default display quality, doctests,switch to generic error

strogdon commented 12 years ago
comment:61

I've been able to reproduce the "signed/unsigned" applet issue under comment:41 and comment:42 on ubuntu 12.04. I don't ususally use ubuntu but had access to an installation. The behavior was observed with FF and chromium. I know there are quite a number of Sage users that install from ubuntu. I was not able to get the "Download this view" to a jmol to work at all unless I manually installed oracle-java-jre. Ubuntu only provides the icedtea-java-jre. Without the oracle jre, when I clicked the "Download this view" there appeared in the applet pane

File reader was not found:org.jmol.adapter.readers.molxyz.XyzReader

and there were similar complaints in the terminal window from which Sage was started. After this happens no applet can be made interactive. A grep of the sagenb tree doesn't reveals that XyzReader isn't called from Sage so I'm guessing it's embedded somewhere in the icedtea jre. As I mentioned the only work-around for me was to manually install oracle. Here is, I think a minimal sequence of steps to reproduce things:

  1. load a worksheet with at least 5 applets
  2. make the first applet interactive
  3. click "Toggle Advanced Controls"
  4. click "Download this view" and cancel all requests (the applet will change to "signed")
  5. re-evaluate the cell to recover the advanced controls
  6. make the applet interactive again
  7. click through the remaining applets to make them interactive

I'm able to make 2 additional applets interactive, but not the 3rd and subsequent applets. An applet can only be made interactive after I put to sleep an already interactive applet. Now I used the applet spawed by that code given in comment:28

gutow commented 12 years ago
comment:62

Replying to @strogdon:

Here is, I think a minimal sequence of steps to reproduce things:

  1. load a worksheet with at least 5 applets
  2. make the first applet interactive
  3. click "Toggle Advanced Controls"
  4. click "Download this view" and cancel all requests (the applet will change to "signed")
  5. re-evaluate the cell to recover the advanced controls
  6. make the applet interactive again
  7. click through the remaining applets to make them interactive

Thanks. I'll try again. So far I haven't been able to reproduce this on MacOS or Linux. If I can reproduce it I'll have a chance of fixing it.

As to the IcedTea, I think we just have to wait for them to finish fixing things. Some people have reported that the applet mostly works with IcedTea (see 3D plotting discussion).

kcrisman commented 12 years ago
comment:63

I've submitted a new pull request with this same code at this Github pull request, because I couldn't figure out how to attach code to the old one. Apparently it introduced a few whitespaces, but that's really not my concern. Hopefully the patches won't need updating, or I'm in trouble; this took hours for me to figure out how to do from scratch.

strogdon commented 12 years ago
comment:64

Another scenario that leads me to believe what I'm seeing is not a "signed/unsigned" applet issue:

  1. load a worksheet with 5 applets
  2. make the applets interactive buy starting from the top and working to the bottom of the worksheet - the applets will be unsigned.
  3. the first applet should now be sleeping, re-evaluate the second applet's cell (this applet should not be sleeping) and make the applet interactive. Here is where I get the problem. I get a pop-up and nothing more can be made interactive.

This can be reproduced if the applets are singed as well. Yet another approach that may shed some light provided someone can get it to behave as here:

  1. load a worksheet with 5 applets
  2. make the applets interactive, from top to bottom, in the order 1 - 5 - 2 - 4 - 3
  3. the first applet should be sleeping but the second one should be interactive
  4. re-evaluate the second applet's cell and make the applet interactive
  5. Here I only get 3 interactive applets, regardless of how many are made interactive.

This is a linux install from a gentoo-prefix where the host OS is debian. The browser is FF.

kcrisman commented 12 years ago
comment:65
  1. load a worksheet with 5 applets
  2. make the applets interactive buy starting from the top and working to the bottom of the worksheet - the applets will be unsigned.
  3. the first applet should now be sleeping, re-evaluate the second applet's cell (this applet should not be sleeping) and make the applet interactive. Here is where I get the problem. I get a pop-up and nothing more can be made interactive.

I can reproduce this on Mac OS with Safari.

could not find applet jmolApplet1

After that once in a while I was able to get one to show up interactive, but most just have

Loading Jmol 3-D viewer...

where the applet would be, and then of course eventually, as it's Safari,

More than 9 Jmols have been launched on the worksheet since it was last openned. Unable to get a static image from Jmol#1 You might want to try Chrome as this problem does not exist with Chrome on MacOS.

which incidentally has a typo (extra "n").

gutow commented 12 years ago

Changed work issues from decide default display quality, doctests,switch to generic error to applet ID when cells re-evaluated,decide default display quality, doctests,switch to generic error

gutow commented 12 years ago
comment:66

Replying to @strogdon:

Another scenario that leads me to believe what I'm seeing is not a "signed/unsigned" applet issue:

  1. load a worksheet with 5 applets
  2. make the applets interactive buy starting from the top and working to the bottom of the worksheet - the applets will be unsigned.
  3. the first applet should now be sleeping, re-evaluate the second applet's cell (this applet should not be sleeping) and make the applet interactive. Here is where I get the problem. I get a pop-up and nothing more can be made interactive.

Thank you now I've got it...This may take a bit to fix. It appears to be a discrepancy between the server and javascript applet numbers. There are many places where the update could be getting messed up. At least I know what to look for now. And you are correct, this should have nothing to do with whether the applets are signed or not.

kini commented 12 years ago
comment:67

I've transferred the sagenb-related patches to a github pull request. Feel free to write more patches, and I'll put them there too, if you like. (Please don't overwrite old patches, that makes it more complicated.) Or I can put any other branch you like onto the pull request - just ask.

Please CC me in the future if you want me to transfer patches to github. If you're interested, here's what I did:

$ cd ~/src/sagenb # go to my sagenb repo
$ git checkout master # get on master
$ git pull # my master is set up to track sagemath/master, i.e. the latest upstream
$ git checkout -b trac_12299 # create a new branch called trac_12299
$ # download the patches to the current directory
$ git am --whitespace=fix trac_12299_adv_jmol_nb.patch
Applying: Trac 12299: add interactive Jmol controls in notebook
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:15: trailing whitespace.
    for particular browser/OS combinations.  Problem systems FF/MacOS (intermittent), 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:18: trailing whitespace.

/home/fs-boone/src/sagenb/.git/rebase-apply/patch:30: trailing whitespace.
Jmol.js 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:37: trailing whitespace.
        the evaluate_cell() call and others that delete cell output must be modified 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:41: trailing whitespace.
        where a 
warning: squelched 37 whitespace errors
warning: 42 lines applied after fixing whitespace errors.
$ git am --whitespace=fix trac_12299_old_wksht.patch
Applying: trac 12299: fix jmol in old worksheets
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:41: trailing whitespace.

/home/fs-boone/src/sagenb/.git/rebase-apply/patch:44: trailing whitespace.
            # Note: this is problematic in the notebook as it uses tools from Sage to 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:51: trailing whitespace.
            f.write('set defaultdirectory "%s"\n' %path) 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:68: trailing whitespace.
                #print script 
/home/fs-boone/src/sagenb/.git/rebase-apply/patch:72: trailing whitespace.

warning: 5 lines applied after fixing whitespace errors.
$ git log -2 --stat
commit 32be06d65240aac183b391ef24e8149b52eabaea (HEAD, refs/remotes/origin/trac_12299, refs/heads/trac_12299)
Author: Jonathan Gutow <gutow@uwosh.edu>
Date:   Mon Jun 11 20:44:10 2012 -0500

    trac 12299: fix jmol in old worksheets

 sagenb/notebook/cell.py |   46 +++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 43 insertions(+), 3 deletions(-)

commit 1971a68138c14e7057e468802a598b05760bb733
Author: Jonathan Gutow <gutow@uwosh.edu>
Date:   Sun May 27 08:48:59 2012 -0500

    Trac 12299: add interactive Jmol controls in notebook

 sagenb/data/sage/js/jmol_lib.js     | 1233 ++++++++++++++++++++++++++++++++++-
 sagenb/data/sage/js/notebook_lib.js |    7 +
 sagenb/notebook/cell.py             |    7 +-
 3 files changed, 1223 insertions(+), 24 deletions(-)

The last command was just for me to check that the author/date/etc. looked correct, as well as the number of lines added/removed and number of files changed. There was a minor discrepancy in the larger patch, but it looks like it was just an instance of trailing whitespace being added which disappeared when git fixed the whitespace changes.

kcrisman commented 12 years ago
comment:68
> $ cd ~/src/sagenb # go to my sagenb repo
> $ git checkout master # get on master
> $ git pull # my master is set up to track sagemath/master, i.e. the latest upstream
> $ git checkout -b trac_12299 # create a new branch called trac_12299
> $ # download the patches to the current directory
> $ git am --whitespace=fix trac_12299_adv_jmol_nb.patch
> $ git am --whitespace=fix trac_12299_old_wksht.patch

This is some of what I was talking about in other locations, except now how does one use this in an actual "working" Sage install? (Before pull 63 on github sagenb, I mean.) From other discussion it looks like plopping this new sagenb in a Sage that already has #11080 and friends applied would suffice?

kini commented 12 years ago
comment:69

Yup. In the instructions on #11080, replace the step "install the sagenb spkg" with "clone the sagenb repo into devel/sagenb (or symlink devel/sagenb to a clone of the sagenb repo), and then run sage -python setup.py develop inside devel/sagenb". You need to run sage -python setup.py develop only once (unlike sage -b for the sage library) - it is the step which pulls in all the dependencies and installs them into your $SAGE_LOCAL.

kcrisman commented 12 years ago
comment:70

and then run sage -python setup.py develop inside devel/sagenb". You need to run sage -python setup.py develop only once (unlike sage -b for the sage library) - it is the step which pulls in all the dependencies and installs them into your $SAGE_LOCAL.

Ah, this is the part I was probably missing.

gutow commented 12 years ago
comment:71

Replying to @gutow:

Replying to @strogdon:

Another scenario that leads me to believe what I'm seeing is not a "signed/unsigned" applet issue:

Thank you now I've got it...This may take a bit to fix. It appears to be a discrepancy between the server and javascript applet numbers. There are many places where the update could be getting messed up. At least I know what to look for now. And you are correct, this should have nothing to do with whether the applets are signed or not.

I think I've fixed it. I found quite a few places I missed where the server could get out of sync with the browser. Please try my test server TestServer before I make a patch. Thanks.

strogdon commented 12 years ago
comment:72

Replying to @gutow:

I think I've fixed it. I found quite a few places I missed where the server could get out of sync with the browser. Please try my test server TestServer before I make a patch. Thanks.

With your changes I'm unable to get a worksheet to freeze or act oddly. This looks good to me. And the original issue, that spawned all this, in attempting to download a jmol is no longer an issue.

kini commented 12 years ago
comment:73

I went to the test server, created an account, plotted x<sup>2+y</sup>3 over (-1,1)×(-1,1), clicked "make interactive", and firefox immediately crashed. Does that count as "acting oddly"? :)

I doubt this is caused by jmol in particular or anything in this code. FWIW it's running the Sun Java 6 plugin on Debian wheezy amd64.

kcrisman commented 12 years ago
comment:74

With your changes I'm unable to get a worksheet to freeze or act oddly.

Great!

I went to the test server, created an account, plotted x<sup>2+y</sup>3 over (-1,1)×(-1,1), clicked "make interactive", and firefox immediately crashed. Does that count as "acting oddly"? :)

Surprisingly, it doesn't! I think acting oddly is different from acting badly :)


I've been messing with the "high quality" issue. So, it does look enough better that it's hard not to want it, especially since memory should not be an issue at this point. I do see the speckles with the mesh on. However, they only appear with the mesh, and only with the black mesh - I can't get it with any other mesh, not even the darker grays.

Maybe we could keep the high-quality if the mesh defaults to one of those colors? Or is there an "xor" we could set, not allowed to use high quality and mesh at the same time if the color is so and so? That seems to be a little limiting, though.

The black mesh speckles have their value too - we could hypnotize people at the Joint Meetings booths...

kcrisman commented 12 years ago

Changed work issues from applet ID when cells re-evaluated,decide default display quality, doctests,switch to generic error to decide default display quality, doctests,switch to generic error

kini commented 12 years ago
comment:76

I tried it again after restarting firefox - this time it seemed to work. Still takes several seconds to load the first interactive plot (which I guess is inevitable since it's a Java applet), but loading subsequent plots only takes one or two seconds each.

kini commented 12 years ago
comment:77

I did notice some yellow warning icons flickering about when I opened the context menu. I'm not sure what that's about.

gutow commented 12 years ago
comment:78

Replying to @kini:

I did notice some yellow warning icons flickering about when I opened the context menu. I'm not sure what that's about.

Maybe the way your software is reacting to all the warnings applets now flash when they make separate windows. This also depends on your Java and browser security settings. If you choose the download option, which causes you to switch to the signed applet, you should get a dialog which actually requires you to make a decision.

ppurka commented 12 years ago
comment:80

There seems to be some problem with the help window at least in firefox on linux. The help window that can be popped up from within jmol actually has mouse scroll disabled and also lacks a scroll bar. But pg up/down works and shows that there is more text present once scrolled down.

I had a look at the spkg and I think inserting a css rule like this in the patches/appletweb/JmolHelp.html might do the trick. Unfortunately, I can't seem to figure out how to do live page edits in firefox, so I can't test this right away.

html {
     overflow: -moz-scrollbars-vertical;
     overflow-y: scroll;
}
ppurka commented 12 years ago
comment:81

And I concur with kini. I always see yellow warning signs on right click menu (and the right click menu is slow too). But that is also with the current jmol in sage-5 (in opera/firefox), so I didn't think much about it. I almost never need to use the right click with jmol anyway.

gutow commented 12 years ago
comment:82

Replying to @kcrisman:

I've been messing with the "high quality" issue.

Maybe we could keep the high-quality if the mesh defaults to one of those colors?

This is a great idea, which works! I suggest we use the darkest of the blues as that is very close to black. If there are no objections I will change the default.

ppurka commented 12 years ago
comment:83

Replying to @gutow:

This is a great idea, which works! I suggest we use the darkest of the blues as that is very close to black. If there are no objections I will change the default.

Anything to get pretty pictures!!

gutow commented 12 years ago
comment:84

Replying to @ppurka:

There seems to be some problem with the help window at least in firefox on linux.

Try it now. I think I've forced it to have a scrollbar (it does on FF/linux for me).

Replying to @ppurka:

Anything to get pretty pictures!!

I've made the change see if you like it.

ppurka commented 12 years ago
comment:85

Thanks. Scroll works now, and pictures look good :)

gutow commented 12 years ago

Changed work issues from decide default display quality, doctests,switch to generic error to doctests,switch to generic error

gutow commented 12 years ago

Fix server<->Jmol syncing and tweak UI (no more sparkles and better vocabulary).

gutow commented 12 years ago

Attachment: trac_12299_server_sync_and_UI.patch.gz

Attachment: trac_12299_server_sync_and_UI.2.patch.gz

Fix server<->Jmol syncing and tweak UI (no more sparkles and better vocabulary).