Bug 243172 - Jave Core Dump creating image obj
Summary: Jave Core Dump creating image obj
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2008-08-05 10:54 EDT by Doug MacDonald CLA
Modified: 2008-10-03 11:27 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug MacDonald CLA 2008-08-05 10:54:31 EDT
Build ID: 3.4.0.I20080521-2000

Steps To Reproduce:
I ran into an issue where I get a java core dump when using ImageDescriptor.createImage.

The issue only happens in linux redhat (not SLED or windows XP).

The following works just fine:
try{
  String f = "http://www.labpixies.com/campaigns/weather/images/thumbnail.jpg";
  ImageDescriptor thumbDescr = ImageDescriptor.createFromURL(new URL(f));
  if (thumbDescr != null) {
    Image image = thumbDescr.createImage();
    System.out.println(image);
  }
}catch(Exception e){
  e.printStackTrace();
}

BUT if you download the image to local file system and try using that file java will core dump:
try{
  String f = "file:///home/user1/thumbnail.jpg";
  ImageDescriptor thumbDescr = ImageDescriptor.createFromURL(new URL(f));
  if (thumbDescr != null) {
    Image image = thumbDescr.createImage();
    System.out.println(image);
  }
}catch(Exception e){
  e.printStackTrace();
}

The core dump is here:
0SECTION       THREADS subcomponent dump routine
NULL           =================================
NULL            1XMCURTHDINFO  Current Thread Details
NULL           ----------------------
3XMTHREADINFO      "Worker-6" TID:0x08936500, j9thread_t:0xA2D603C8, state:R, prio=5
3XMTHREADINFO1            (native thread ID:0x6038, native priority:0x5, native policy:UNKNOWN)
4XESTACKTRACE          at org/eclipse/swt/internal/gtk/OS._gdk_pixbuf_new_from_file(Native Method)
4XESTACKTRACE          at org/eclipse/swt/internal/gtk/OS.gdk_pixbuf_new_from_file(Bytecode PC:9)
4XESTACKTRACE          at org/eclipse/swt/graphics/Image.<init>(Bytecode PC:64(Compiled Code))
4XESTACKTRACE          at org/eclipse/jface/resource/URLImageDescriptor.createImage(Bytecode PC:22)
4XESTACKTRACE          at org/eclipse/jface/resource/ImageDescriptor.createImage(Bytecode PC:5)
4XESTACKTRACE          at org/eclipse/jface/resource/ImageDescriptor.createImage(Bytecode PC:2)

More information:
Comment 1 Remy Suen CLA 2008-08-05 10:57:02 EDT
What version of RHEL are you using? What is your gtk+ version? Are you on a 32-bit machine or a 64-bit machine? Are you using the 32-bit or 64-bit download of Eclipse? What Java runtime environment are you using?
Comment 2 Doug MacDonald CLA 2008-08-05 11:50:55 EDT
RHEL 5.1

rpm -q gtk+ = 1.2.10-56.el5

32 bit machine

32 bit eclipse

JRE info:
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr1ifix-20080709_02(SR1+133778.1+IZ25540+IZ25963))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20080415_18762 (JIT enabled, AOT enabled)
J9VM - 20080415_018762_lHdSMr
JIT  - r9_20080415_1520
GC   - 20080415_AA)
JCL  - 20080707_01
[db2admin@Rhel5clean4 bin]$ ./notes2 -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr1ifix-20080709_02(SR1+133778.1+IZ25540+IZ25963))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20080415_18762 (JIT enabled, AOT enabled)
J9VM - 20080415_018762_lHdSMr
JIT  - r9_20080415_1520
GC   - 20080415_AA)
JCL  - 20080707_01
Comment 3 Steve Northover CLA 2008-08-05 15:54:22 EDT
Bug in the native GTK image loader?
Comment 4 Bogdan Gheorghe CLA 2008-08-05 18:22:06 EDT
I tried this on my RHEL5 and it worked for me - I'm on GTK 2.10.4-16. I think the only difference between our configs is that I am using Sun JRE 6. Could you try with another JRE? 
Comment 5 Doug MacDonald CLA 2008-08-07 13:14:30 EDT
A bit more info... When I launch my debug session via the IDE, I am launching the new Notes Client that is built on top of eclipse. When testing with an eclipse launch configuration via the IDE, I cannot reproduce this issue no matter what JRE I use. I should have tested this before I wrote the bugzilla. So it seems like it would be an issue with the Notes Client environment, but I can't imaging what it would be.

Both environments are using the same JRE. Both are using the same versions of org.eclipse.swt and org.eclipse.swt.linux.x86. I am running the same action with the same file. 
Comment 6 Steve Northover CLA 2008-08-07 14:05:27 EDT
> Both are using the same versions of org.eclipse.swt and 
> org.eclipse.swt.linux.x86.

Are we 100% sure of that?  Try using the SWT from CVS HEAD and see whether it crashes or not.  See: http://www.eclipse.org/swt/cvs.php
Comment 7 Doug MacDonald CLA 2008-08-07 14:12:47 EDT
I compared the jar names an they had the same exact names (dates).

I'll try with SWT from HEAD.
Comment 8 Steve Northover CLA 2008-08-07 14:24:08 EDT
... and sizes?
Comment 9 Doug MacDonald CLA 2008-08-07 16:36:53 EDT
The file sizes were a tiny bit diferent but I believe it is due to jar signing files.

I tried with SWT from HEAD in my Notes environment and I get the same result.
Comment 10 Bogdan Gheorghe CLA 2008-08-27 15:38:41 EDT
I have also tried to reproduce this on our RHEL4 machine but, once again, it works for me. 

As the bug seems to happen only with your particular configuration and not with a base Eclipse install, there's not much more I can do at my end. I need you to either set me up with access to your system or somehow instruct me how to recreate your exact workspace in order to proceed.

Needless to say, this bug is not under consideration for 3.4.1 as I can't even recreate it yet.
Comment 11 Doug MacDonald CLA 2008-09-04 06:47:14 EDT
Tryig to get some of our eclipe/UI experts to take a look on our end.
Comment 12 Bogdan Gheorghe CLA 2008-09-04 11:16:23 EDT
OK - keep us posted.
Comment 13 Raji Akella CLA 2008-10-03 11:12:16 EDT
We can't reproduce this issue anymore. 

Comment 14 Steve Northover CLA 2008-10-03 11:27:13 EDT
Please reopen if you get it again.