• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Image resizing in app -> Sudden death
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 09:14:41 -0400

... uh -- make that it "WAS" cheaper, not it "WASN'T" cheaper, but then context probably made that clear :) ...

On May 12, 2005, at 9:08 AM, 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:
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
References: 
 >Image resizing in app -> Sudden death (From: Hugi Thordarson <email@hidden>)
 >Re: Image resizing in app -> Sudden death (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: WO 5.2.4 API symbol lookup problem
  • Next by Date: Re: Image resizing in app -> Sudden death
  • Previous by thread: Re: Image resizing in app -> Sudden death
  • Next by thread: Re: Image resizing in app -> Sudden death
  • Index(es):
    • Date
    • Thread