JDK-4834329 : REGRESSION: Eclipse 2.1 crashes on j2sdk1.4.2-build18
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_8,windows_2000
  • CPU: x86,sparc
  • Submitted: 2003-03-18
  • Updated: 2003-03-19
  • Resolved: 2003-03-19
Related Reports
Relates :  
Relates :  
Description
###@###.### 2003-03-18

J2SE Version (please include all output from java -version flag):
  java version "1.4.2-beta"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b18)
  Java HotSpot(TM) Client VM (build 1.4.2-beta-b18, mixed mode)

Does this problem occur on J2SE 1.3, 1.4 or 1.4.1?  Yes / No (pick one)
  No, it works fine with previous Mantis build 12, 14, 16, but
  crash since Mantis build17.

Operating System Configuration Information (be specific):
  Microsoft Windows 2000 [Version 5.00.2195]
  Service Pack 3

Hardware Configuration Information (be specific):
  P3-450
  384MB RAM
  ATI Rage Pro
  8GB HD

Bug Description:
  Eclipse 2.1(eclipse-SDK-RC2-win32.zip) worked fine with j2sdk1.4.2-build12,
  14 and 16 but crash with build18.

  Trying to start eclipse (eclipse.exe). Windows pops up, telling the 
  VM crashed, or to start eclipse by this command line;

java.exe -cp c:\eclipse\startup.jar org.eclipse.core.launcher.Main -os win32 -ws win32 -arch x86 -showsplash 600

After a few seconds this message appears:


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77E498EC
Function=CopyRect+0xCED
Library=C:\WINNT\system32\USER32.dll

Current Java thread:
 at org.eclipse.swt.internal.win32.OS.DrawTextW(Native Method)
 at org.eclipse.swt.internal.win32.OS.DrawText(OS.java:1307)
 at org.eclipse.swt.graphics.GC.drawText(GC.java:1242)
 at org.eclipse.swt.graphics.GC.drawText(GC.java:1194)
 at org.eclipse.swt.custom.CLabel.onPaint(CLabel.java:380)
 at org.eclipse.swt.custom.CLabel.access$0(CLabel.java:287)
 at org.eclipse.swt.custom.CLabel$1.paintControl(CLabel.java:102)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:80)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:850)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:834)
 at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:726)
 at org.eclipse.swt.widgets.Control.windowProc(Control.java:2738)
 at org.eclipse.swt.widgets.Display.windowProc(Display.java:2177)
 at org.eclipse.swt.internal.win32.OS.UpdateWindow(Native Method)
 at org.eclipse.swt.widgets.Decorations.setVisible(Decorations.java:1120)
 at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:994)
 at org.eclipse.swt.widgets.Shell.open(Shell.java:679)
 at org.eclipse.jface.window.Window.open(Window.java:537)
 at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:371)
 at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:862)
 at org.eclipse.ui.internal.Workbench.init(Workbench.java:679)
 at org.eclipse.ui.internal.Workbench.run(Workbench.java:1422)
 at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
 at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
 at org.eclipse.core.launcher.Main.run(Main.java:703)
 at org.eclipse.core.launcher.Main.main(Main.java:539)

Dynamic libraries:
0x00400000 - 0x00406000  C:\WINNT\system32\java.exe
0x77880000 - 0x77901000  C:\WINNT\System32\ntdll.dll
0x77DA0000 - 0x77DFB000  C:\WINNT\system32\ADVAPI32.dll
0x77E70000 - 0x77F2E000  C:\WINNT\system32\KERNEL32.dll
0x77D20000 - 0x77D91000  C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78046000  C:\WINNT\system32\MSVCRT.dll
0x08000000 - 0x08136000  C:\Programme\Java\j2re1.4.2\bin\client\jvm.dll
0x77E00000 - 0x77E5F000  C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F79000  C:\WINNT\system32\GDI32.dll
0x77540000 - 0x77571000  C:\WINNT\system32\WINMM.dll
0x10000000 - 0x10007000  C:\Programme\Java\j2re1.4.2\bin\hpi.dll
0x007C0000 - 0x007CE000  C:\Programme\Java\j2re1.4.2\bin\verify.dll
0x007D0000 - 0x007E8000  C:\Programme\Java\j2re1.4.2\bin\java.dll
0x007F0000 - 0x007FD000  C:\Programme\Java\j2re1.4.2\bin\zip.dll
0x18890000 - 0x188D7000  C:\eclipse\plugins\org.eclipse.swt.win32_2.1.0\os\win32\x86\swt-win32-2122.dll
0x77A40000 - 0x77B35000  C:\WINNT\system32\ole32.dll
0x71710000 - 0x71794000  C:\WINNT\system32\COMCTL32.dll
0x76B00000 - 0x76B3E000  C:\WINNT\system32\comdlg32.dll
0x70BD0000 - 0x70C35000  C:\WINNT\system32\SHLWAPI.DLL
0x77580000 - 0x777CA000  C:\WINNT\system32\SHELL32.DLL
0x779A0000 - 0x77A3B000  C:\WINNT\system32\OLEAUT32.dll
0x75DF0000 - 0x75E0A000  C:\WINNT\system32\IMM32.dll
0x6E330000 - 0x6E336000  C:\WINNT\System32\INDICDLL.dll
0x694D0000 - 0x694EF000  C:\WINNT\system32\oleacc.dll
0x77910000 - 0x77933000  C:\WINNT\system32\imagehlp.dll
0x72970000 - 0x7299D000  C:\WINNT\system32\DBGHELP.dll
0x68F30000 - 0x68F3B000  C:\WINNT\system32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 423K [0x10010000, 0x100b0000, 0x104f0000)
  eden space 512K,  81% used [0x10010000, 0x10077c28, 0x10090000)
  from space 64K,  12% used [0x100a0000, 0x100a2108, 0x100b0000)
  to   space 64K,   0% used [0x10090000, 0x10090000, 0x100a0000)
 tenured generation   total 4552K, used 3619K [0x104f0000, 0x10962000, 0x14010000)
   the space 4552K,  79% used [0x104f0000, 0x10878fc8, 0x10879000, 0x10962000)
 compacting perm gen  total 7680K, used 7649K [0x14010000, 0x14790000, 0x18010000)
   the space 7680K,  99% used [0x14010000, 0x147884e8, 0x14788600, 0x14790000)

Local Time = Thu Mar 13 14:02:17 2003
Elapsed Time = 13
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b18 mixed mode)
#



Steps to Reproduce (be specific):

Uninstall old J2SDK 1.4 / 1.4.1 / 1.4.2.
Install J2SDK 1.4.2-build18.
Try to start eclipse 2.1

Comments
EVALUATION Was able to reproduce on sparc Solaris 9.. Still investigating this.. Crashing in customer native code at this time. ###@###.### 2003-03-19 Broken in b17 - 20030214130631.jmasa.baseline build... ###@###.### 2003-03-19 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ###@###.### 2003-03-19 This is a bug in the application which shows up now because the JNI code for JNI Get<Type>ArrayElements has been updated to detect this problem. The native method Java_org_eclipse_swt_internal_motif_OS_XmCreateScrolledList is calling the JNI function GetByteArrayElements, passing it an array of length zero. GetByteArrayElements is expected to make a copy of zero bytes and return a pointer to that copy. Previously, the JVM would allocate zero bytes with malloc(0) and return a pointer to the resulting buffer. Since there are zero valid data bytes in that buffer, any reference to any data in that buffer would be invalid. The application passes this buffer to XmCreateScrolledList(), which passes it to strlen(), which looks at the first byte of the (empty copy of the empty) array. The byte returned was probably/coincidentally a null character, allowing strlen() to return 0, which seems not to have interfered with the application. Now, in this special case (empty arrays), the JVM deliberately returns a pointer to an invalid address. Calling strlen() on this address now produces a fault (SEGV) instead of the previous unpredictable and invalid behavior. This is not a bug in the JVM.
11-06-2004