Bugs item #2971384, was opened at 2010-03-16 12:03
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=2971384&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Rolf Huehne (rhuehne)
Assigned to: Nobody/Anonymous (nobody)
Summary: Large image export problem - 11.8.20/11.9.24

Initial Comment:
If I try to export larger images (e.g.: 1600x1600) of larger structures (e.g.: 
2NOX, asym.unit, antialiasdisplay on)  with the unsigned applet using the 
Javascript command 'jmolGetPropertyAsString("image")' with version 11.8.20 or 
11.9.24 there occurs reproducibly a rendering error:

  rendering error -- perhaps use "set refreshing FALSE/TRUE"?

The exported image contains only parts of the structure (up to nothing at all). 
And parts of the structure look like one half of two interlaced images.
If I provide the following two commands (as suggested by the error message?) 
immediately before the export it works:

  set refreshing false;
  set refreshing true;

But then sometimes undesired echo text (e.g.: "Please wait...") is included in 
the image. And I also didn't find a reliable way to execute the two commands 
automatically just in time before the Javascript export command and use this as 
a workaround.

The error doesn't occur with version 11.6.8. The only other version in between 
I tried was 11.8.8 and there the error occurs.

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

>Comment By: Bob Hanson (hansonr)
Date: 2010-09-01 10:31

Message:
left unresolved. Just getting too large an image and blowing memory in some
way.

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

Comment By: Rolf Huehne (rhuehne)
Date: 2010-03-24 08:08

Message:
I don't think that this assumed limit is involved here. 2000x2000 pixel is
usually not a problem. This usually happens near 2500x2500, depending on
the content.
Why should 11.8.20 produce a larger image than 11.6.8 with the same
settings and view?
Besides there is exported an image and bounced back to the browser by our
server with the correct resolution.
(Usually when I have a truncated JPEG image file there are lines
missing.)

I rather think it is some bug introduced after 11.6.8. 

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

Comment By: Bob Hanson (hansonr)
Date: 2010-03-24 07:45

Message:
OK, so this is probably an applet-only issue, perhaps some limitation of
how much text can be sent via LiveConnect. I have to think about that....

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

Comment By: Rolf Huehne (rhuehne)
Date: 2010-03-23 08:32

Message:
To rule out memory issues I almost doubled now the Java memory (486 MB
maximum) on my Linux machine. Although more than 200 MB are reported as
free the problem still occurs.

It is difficult to achieve 1) and 2) with the unsigned applet and the
"getProperty image" function called by Javascript.
At least I tried not to move the mouse after pressing the "snapshot"
button. But the result was the same.

When I used the signed applet and the "write image" function (v11.8.20)
the exported JPEG image was ok. So the problem seems to be specifically
related to the 'jmolGetPropertyAsString("image")' function.

Regarding number 3): Yes, it is an extension of the "jmolScript"
Javascript command. An "echo" command with this message is added before
each command set to display it in the upper left corner of the applet.

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

Comment By: Bob Hanson (hansonr)
Date: 2010-03-22 17:18

Message:
That's true. OK. The "Rendering Error -- perhaps use..." message is just in
case set refreshing was set FALSE and now needs to be set TRUE. So that
should not be the issue. So what we have here is two renderers going
simultaneously, I think. It could be just that your actions trigger this
problem with the mouse movement over the screen while the large image is
being created. Things to try:

1) command line scripts with no mouse action that creates the image and
closes Jmol.

2) entering the write command in the console rather than using any mouse
action. 

3) "Please wait..." -- that sounds like YOUR message, not mine. Yes?



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

Comment By: Rolf Huehne (rhuehne)
Date: 2010-03-22 12:06

Message:
OUT-OF-MEMORY errors were always reported in the Java console. Besides
11.6.8 doesn't have to report it because it works with this version. Only
11.8.20 has the problem.

When I used JmolApplet0.jar there was no rendering error message any more.
But the image still was not ok. And there were reported now 55 MB of free
space afterwards. (I almost was convinced that it was just an out-of-memory
problem. But with this result I am in doubt again.)

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

Comment By: Bob Hanson (hansonr)
Date: 2010-03-19 15:50

Message:
Well, I think you are really pushing the memory limit and must be very
close. I suspect that the size of the model -- number of atoms -- would
have a lot to do with it as well. So perhaps in 11.6.8 there's just that
much less in the area of features that are present. Make sure you are using
JmolApplet0.jar and not JmolApplet.jar, as that should save memory in that
only the essentials will be loaded, but that's still not necessarily going
to work. I don't think 11.6 can report OUT-OF-MEMORY errors. That wasn't
introduced until 11.7.14. 

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

Comment By: Rolf Huehne (rhuehne)
Date: 2010-03-19 10:02

Message:
The proposed "jmolEvaluate" command only provides a pure black image,
presumably because "refreshing" is off.
In my manual workaround it was "set refreshing false; set refreshing
true;" before "getProperty image". But this time I couldn't reproduce it.
I admit that this operates at least near the upper memory limit (8mb free
of 246mb after the export) for 2000x2000 pixels. And it currently still
works with 1600x1600 pixels. (The Java memory size was increased meanwhile
because of a student course) But at least there is no "out of memory" error
reported in the Java console.
And how do you explain that it works with version 11.6.8? The image is ok
and the same amount of free memory (8mb) is reported after export.

Of course the user could set antaliasDisplay off. But then the lower
quality would make the high resolution picture obsolete.

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

Comment By: Bob Hanson (hansonr)
Date: 2010-03-16 14:14

Message:
The way you would do this from javascript is:

x = jmolEvaluate("script('set refreshing false;getProperty image;set
refreshing true')")

But I don't think that will work. I think you are running into a memory
problem. Those are huge images and if there is any translucent business
there, it will be 4x the size in memory. You could try

set antialiasImages false

and see how that works. Ah, or you could use

set antialiasdisplay false
getproperty image
set antialiasdisplay true

this might save substantially in memory. Might need

set antialiasdisplay false
refresh
getproperty image
set antialiasdisplay true


That at least will save you any display memory you don't need during that
operation. 

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=2971384&group_id=23629

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to