List Info

Thread: JVM Crashing




JVM Crashing
user name
2006-05-30 23:17:52
 Hi,


Is anyone who is running the latest ImageMagick and JMagick
running into a
similar problem where the 1.5 JVM crashes?  We are using the
latest 6.2.6-0
<http://www.yeo.id.au/jmagick/quickload/J
Magick-6.2.6-0.tar.gz>Jmagick and
6.2.6 ImageMagick

I've pasted the Java code below as well.  I'm more
concerned about the JVM
crashing than an exception being thrown which can be caught.


     [java]  INFO [Thread-0] (ImageDownloaderTask.java:255)
May 26 2006
20:58:03 - HTTP fetch request complete for:
http://TSA.xxxxx.net/graphics/product_images/p223415th
.gif (68 ms., 3555
bytes), output file:
/opt/sdc/mbe/ip/tmpimages/45/43/31/34744e4e574b363248574f794
471714a374767.unknown

     [java] #

     [java] # An unexpected error has been detected by
HotSpot Virtual
Machine:

     [java] #

     [java] #  SIGSEGV (0xb) at pc=0x92d47c3d, pid=8311,
tid=16

     [java] #

     [java] # Java VM: Java HotSpot(TM) Server VM
(1.5.0_06-b05 mixed mode)

     [java] # Problematic frame:

     [java] # C  [libMagick.so.10.0.2+0x147c3d]

     [java] #

     [java] # An error report file with more information is
saved as
hs_err_pid8311.log

     [java]  INFO [Thread-10]
(MagickImageResizerImpl.java:83) May 26 2006
20:58:03 - Done shrinking image.  Origin dimension are:
80x80, resize flag
is: false, output file is:
/opt/sdc/mbe/ip/tmpimages/46/35/65/4f30322d566e2d416a75765f3
9635a6b594677.jpg

     [java] ERROR [Thread-16]
(MagickImageResizerImpl.java:87) May 26 2006
20:58:03 - magick.MagickException: Unable to retrieve handle

     [java] java.io.FileNotFoundException:
/opt/sdc/mbe/ip/tmpimages/30/41/4b/70437a7532754a50736236726
b57655f446a77.jpg
(No such file or directory)

     [java]     at java.io.FileInputStream.open(Native
Method)

     [java]     at
java.io.FileInputStream.<init>(FileInputStream.java:10
6)

     [java]     at
com.shopping.util.Checksum.getFileChecksum(Checksum.java
:31)

     [java]     at
com.shopping.util.Checksum.getFileChecksum(Checksum.java
:26)

     [java]     at
com.shopping.feed.task.image.imageserver.ImageDownloaderTask
.processImage(
ImageDownloaderTask.java:378)

     [java]     at
com.shopping.feed.task.image.imageserver.ImageDownloaderTask
.execute(
ImageDownloaderTask.java:526)

     [java]     at
com.shopping.feed.task.infra.QueueTaskRunner.onTask(
QueueTaskRunner.java:308)

     [java]  INFO [Thread-10] (ImageDownloaderTask.java:379)
May 26 2006
20:58:03 - File checksum is 223908271 for file:
/opt/sdc/mbe/ip/tmpimages/46/35/65/4f30322d566e2d416a75765f3
9635a6b594677.unknown

     [java]  INFO [Thread-16] (ImageDownloaderTask.java:379)
May 26 2006
20:58:03 - File checksum is -1 for file:
/opt/sdc/mbe/ip/tmpimages/30/41/4b/70437a7532754a50736236726
b57655f446a77.unknown

     [java] #

     [java] # If you would like to submit a bug report,
please visit:

     [java] #   http:
//java.sun.com/webapps/bugreport/crash.jsp

     [java] #

     [java]     at
com.shopping.feed.task.infra.QueueTaskRunner.run(
QueueTaskRunner.java:274)

     [java]     at java.lang.Thread.run(Thread.java:595)

     [java] Java Result: 6





      try {
        ImageInfo info = new ImageInfo();
        MagickImage image = new MagickImage(new
ImageInfo(inputFile));

        Dimension dim = image.getDimension();

        double width = dim.getWidth();
        double height = dim.getHeight();

        setOriginDimensions(new ImageDimensions((int) width,
(int) height));

        MagickImage outputImage;

        if (width >= getMaxWidth() || height >=
getMaxHeight() ) {
           // do the following to preserve the aspect ratio
of the original
image...
           // JMagic scaleImage API DOES NOT preserve the
aspect ratio, so
we have to be smarter...

           int new_height = getMaxHeight();
           int new_width = getMaxWidth();

           if (width > height)
             new_height = (int) (getMaxWidth() * height /
width);
           else
             new_width = (int) (getMaxHeight() * width /
height);

           outputImage = image.scaleImage(new_width,
new_height);
           outputImage.setFileName(getOutputFile());
           setResized(true);
        } else {
          outputImage = image.scaleImage((int) width, (int)
height);
          outputImage.setFileName(getOutputFile());
          setResized(false);
        }

        setResizedDimensions(new ImageDimensions((int)
outputImage.getDimension().getWidth(), (int)
outputImage.getDimension().getHeight()
));

        //$input_image->Set(quality=>80,
interlace=>'line',
compression=>'JPEG');
        outputImage.setImageAttribute("quality",
Integer.toString
(getDesiredImageQuality()));
       
outputImage.setImageAttribute("interlace",
"line");
       
outputImage.setImageAttribute("compression",
"JPEG");
        outputImage.writeImage(info);

        info = null;
        outputImage = null;

        logger.info("Done shrinking image.  Origin
dimension are: " +
getOriginDimensions() + ", resize flag is: " +
isResized() + ", output file
is: " + getOutputFile());


      } catch (MagickException ex) {
          logger.error(ex);
      }


Thanks very much, and pointers towards the right
solution/direction would be
really helpful.


Jordan
_______________________________________________
Magick-developers mailing list
Magick-developersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/m
agick-developers
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )