Re: Image resizing in app -> Sudden death
Re: Image resizing in app -> Sudden death
- Subject: Re: Image resizing in app -> Sudden death
- From: Mike Schrag <email@hidden>
- Date: Thu, 12 May 2005 11:42:58 -0400
When you restarted the wo services, how did you do it? If you sudo-
restart them with specifying user appserver, then it's not really
fixed, because you probably just restarted them as user root instead
of user appserver (I ran into this also).
On May 12, 2005, at 11:23 AM, Hugi Thordarson wrote:
*sigh* We restarted all WO services on the machine, and now,
suddenly, all the AWT stuff works very nicely. I guess that will
have to do - until the next time it fails. *sigh*
I believe the bug you're mentioning below is a 5.2.4 issue, at
least I haven't seen it in 5.2.3.
Cheers,
Hugi
On 12.5.2005, at 14:23, Mike Schrag wrote:
I need to file a radar on this actually -- I just did a small test
case:
public class Test {
public static void main(String[] _args) {
java.awt.Dimension dim = new java.awt.Dimension
(10, 10);
System.out.println("Done.");
}
}
When you run that "headful", it works fine (and you see a small
app launch in the gui). If you run it java.awt.headless=true it
has problems:
Schragtop:~ localmschrag$ java Test
Done.
Schragtop:~ localmschrag$ java -Djava.awt.headless=true Test
** ATTENTION ***
Please Attach Debugger : No Autorelease pool exists
Press any key to continue...
On May 12, 2005, at 9:35 AM, Hugi Thordarson wrote:
Thanks for the reply, Mike!
I suspected it might be something happening deep down in the JVM
guts - every tiny operation that involves AWT seems to cause the
crash. I'm still going to attempt to figure out what the heck the
problem is, since this code has been running problem free on this
server for some time and I need to resolve this fast, so I don't
have time to implement ImageMagick just now.
Sometimes, just sometimes, I really, really hate java.
Thanks!
- Hugi
On 12.5.2005, at 13:08, Mike Schrag wrote:
I ran into this same problem when using AWT-referencing-code
(which fires up Toolkit). It basically results in a total VM
crash because it fails inside of a native method. Annoying
java.awt.headless is supposed to exist to prevent this problem,
but for whatever reason it didn't behave as expected.
Ultimately I never got the performance out of ImageIO that I
needed anyway, so I switched to custom JNI using the ImageMagick
API's (which, incidentally, was between 10 and 100x faster
performing some of the same operations as ImageIO). It was
REALLY frustrating -- I know your pain. At the end of my case,
I only depended on java.awt.Dimension (which ALSO fires up
Toolkit), which I just wrote my own version of. It wasn't
cheaper (time-wise) to go this route then to try and diagnose
exactly what was going on under the covers in the VM. I'm
fairly confident there IS a workaround, because I would be
shocked that it just doesn't work at all, but it wasn't
immediately obvious.
One option you have, unless you're TRULY headless, is to launch
as root instead of appserver, which can then always get to the
windowserver. But that, of course, brings with it other problems.
ms
On May 12, 2005, at 7:46 AM, Hugi Thordarson wrote:
Good morning everyone!
I have a problem with one of my apps. When this application
tries to perform image resizing, it dies suddenly and horribly,
without giving any error messages in the application log (with
debugging enabled). The application instance immediately
terminates and then restarts.
The app is running as the "appserver" user and the -
Djava.awt.headless property is set to true. Running WO 5.2.3 on
OS X server 10.3.8. Classes involved in the resize operation
inclide BufferedImage and ImageIO.
The image resizing code resides in a framework and is running
fine on other servers, so I really don't know what to think. I
just wanted to see if anyone had experienced something similar,
since I suspect this might become a long winded bug hunt.
Cheers,
Hugi
// Hugi Thordarson
// Atvinnulaus
// http://www.karlmenn.is/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden