Re: Image resizing in app -> Sudden death
Re: Image resizing in app -> Sudden death
- Subject: Re: Image resizing in app -> Sudden death
- From: Hugi Thordarson <email@hidden>
- Date: Thu, 12 May 2005 13:35:43 +0000
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:
email@hidden
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