CRASH: Java 1.4.2 beta + Ant 1.5.2

Swing apps crash when using Ant 1.5.2 and Java 1.4.2 beta.
(Windows XP)

This bug doesn't affect IDEA, as it runs under a dedicated JVM, but I need your feedback on this bug, if you experienced it.

SDK 1.4.2 (even beta) is great, and I need to use it with Ant. (So do you, I guess). I've posted a bug report on java.sun.com, BTW.

Here is the Ant Build script:
(The FileChooserDemo.jar file is from the demo distribution of the JDK 1.4.2, which works fine when running from command line only)

And here is the (long) exception dump: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x5FF0983F Function=[Unknown.] Library=C:\WINDOWS\System32\umxw.dll NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at sun.awt.windows.Win32SurfaceData.initDDraw(Native Method) at sun.awt.windows.Win32SurfaceData.(Win32SurfaceData.java:269) at sun.awt.windows.D3DBlitLoops.register(D3DBlitLoops.java:39) at sun.awt.windows.Win32OffScreenSurfaceData.initD3D(Win32OffScreenSurfaceData.java:92) at sun.awt.windows.Win32OffScreenSurfaceData.(Win32OffScreenSurfaceData.java:134) at sun.awt.windows.WToolkit.initIDs(Native Method) at sun.awt.windows.WToolkit.(WToolkit.java:94) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.Toolkit$2.run(Toolkit.java:748) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739) - locked <0x14206308> (a java.lang.Class) at java.awt.datatransfer.SystemFlavorMap$2.run(SystemFlavorMap.java:187) at java.security.AccessController.doPrivileged(Native Method) at java.awt.datatransfer.SystemFlavorMap.(SystemFlavorMap.java:183) at java.awt.datatransfer.SystemFlavorMap.getDefaultFlavorMap(SystemFlavorMap.java:147) - locked <0x100aec30> (a java.util.WeakHashMap) at java.awt.dnd.DropTarget.(DropTarget.java:805) at java.awt.dnd.DropTarget.(DropTarget.java:131) at javax.swing.TransferHandler$SwingDropTarget.(TransferHandler.java:531) at javax.swing.JComponent.setTransferHandler(JComponent.java:2742) at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:213) at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:129) at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:152) at javax.swing.JComponent.setUI(JComponent.java:449) at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701) at javax.swing.JFileChooser.setup(JFileChooser.java:345) at javax.swing.JFileChooser.(JFileChooser.java:320) at javax.swing.JFileChooser.(JFileChooser.java:273) at FileChooserDemo.]]>(FileChooserDemo.java:113)
at FileChooserDemo.main(FileChooserDemo.java:595)

Dynamic libraries:
0x00400000 - 0x00406000 E:\j2sdk1.4.2\jre\bin\java.exe
0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08136000 E:\j2sdk1.4.2\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AA000 C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
0x10000000 - 0x100A0000 C:\WINDOWS\System32\scorillont.dll
0x003A0000 - 0x003D0000 C:\WINDOWS\System32\scorsock.dll
0x5FE00000 - 0x5FE12000 C:\WINDOWS\System32\umxexw.dll
0x5FC00000 - 0x5FC18000 C:\WINDOWS\System32\umxtrw.dll
0x5FF00000 - 0x5FF2F000 C:\WINDOWS\System32\umxw.dll
0x00B90000 - 0x00B97000 E:\j2sdk1.4.2\jre\bin\hpi.dll
0x00BB0000 - 0x00BBE000 E:\j2sdk1.4.2\jre\bin\verify.dll
0x00BC0000 - 0x00BD8000 E:\j2sdk1.4.2\jre\bin\java.dll
0x00BE0000 - 0x00BED000 E:\j2sdk1.4.2\jre\bin\zip.dll
0x02FE0000 - 0x030EA000 E:\j2sdk1.4.2\jre\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x771B0000 - 0x772CA000 C:\WINDOWS\system32\ole32.dll
0x03100000 - 0x03150000 E:\j2sdk1.4.2\jre\bin\fontmanager.dll
0x51000000 - 0x5104D000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 220K [0x100a0000, 0x10140000, 0x10580000)
eden space 512K, 30% used [0x100a0000, 0x100c73e8, 0x10120000)
from space 64K, 100% used [0x10130000, 0x10140000, 0x10140000)
to space 64K, 0% used [0x10120000, 0x10120000, 0x10130000)
tenured generation total 1408K, used 131K [0x10580000, 0x106e0000, 0x140a0000)
the space 1408K, 9% used [0x10580000, 0x105a0cd8, 0x105a0e00, 0x106e0000)
compacting perm gen total 4096K, used 3155K [0x140a0000, 0x144a0000, 0x180a0000)
the space 4096K, 77% used [0x140a0000, 0x143b4cd8, 0x143b4e00, 0x144a0000)

Local Time = Mon Apr 07 10:21:29 2003
Elapsed Time = 1
#

  1. The exception above was detected in native code outside the VM

#

  1. Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode)

#

2 comments

Note:

The current thread trace can be different (on some programs the exception seems to trigger during JFrame instanciation, but the trace-top is always "sun.awt.windows.Win32SurfaceData.initDDraw".

If any of you have time to try reproducing the experience under Win32 as well as Linux, I would be really gratefull.

Simply use one of the JAR files from the demo directory of the JDK 1.4.2 beta, and run it from the command line (usual java -jar stuff). Then use a very basic Ant script (see previous post), and run the task.

Then you should (or not) get the exception.

Thanks for the feedback.

Dan/

0

Hi Dan -

As it looks like a possible conflict with DirectDraw, there are a couple
flags to try. The following flag disables the off screen buffer used
by Swing:

-Dsun.java2d.ddoffscreen=false

If that doesn't stop the crash, you could try disabling DirectDraw
altogether:

-Dsun.java2d.noddraw=true

Just a couple suggestions to get a better bug report together for Sun.

Peter

dan wrote:

Swing apps crash when using Ant 1.5.2 and Java 1.4.2 beta.
(Windows XP)

This bug doesn't affect IDEA, as it runs under a dedicated JVM, but I need your feedback on this bug, if you experienced it.

SDK 1.4.2 (even beta) is great, and I need to use it with Ant. (So do you, I guess). I've posted a bug report on java.sun.com, BTW.

Here is the Ant Build script:
(The FileChooserDemo.jar file is from the demo distribution of the JDK 1.4.2, which works fine when running from command line only)

<target name="runtest" description="">
<java dir="." failonerror="true" fork="true" jar="test/FileChooserDemo.jar" />
</target>


And here is the (long) exception dump:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x5FF0983F
Function=[Unknown.]
Library=C:\WINDOWS\System32\umxw.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at sun.awt.windows.Win32SurfaceData.initDDraw(Native Method)
at sun.awt.windows.Win32SurfaceData.<clinit>(Win32SurfaceData.java:269)
at sun.awt.windows.D3DBlitLoops.register(D3DBlitLoops.java:39)
at sun.awt.windows.Win32OffScreenSurfaceData.initD3D(Win32OffScreenSurfaceData.java:92)
at sun.awt.windows.Win32OffScreenSurfaceData.<clinit>(Win32OffScreenSurfaceData.java:134)
at sun.awt.windows.WToolkit.initIDs(Native Method)
at sun.awt.windows.WToolkit.<clinit>(WToolkit.java:94)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.Toolkit$2.run(Toolkit.java:748)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)
- locked <0x14206308> (a java.lang.Class)
at java.awt.datatransfer.SystemFlavorMap$2.run(SystemFlavorMap.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.datatransfer.SystemFlavorMap.<init>(SystemFlavorMap.java:183)
at java.awt.datatransfer.SystemFlavorMap.getDefaultFlavorMap(SystemFlavorMap.java:147)
- locked <0x100aec30> (a java.util.WeakHashMap)
at java.awt.dnd.DropTarget.<init>(DropTarget.java:805)
at java.awt.dnd.DropTarget.<init>(DropTarget.java:131)
at javax.swing.TransferHandler$SwingDropTarget.<init>(TransferHandler.java:531)
at javax.swing.JComponent.setTransferHandler(JComponent.java:2742)
at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:213)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:129)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:152)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at FileChooserDemo.<init>(FileChooserDemo.java:113)
at FileChooserDemo.main(FileChooserDemo.java:595)

Dynamic libraries:
0x00400000 - 0x00406000 E:\j2sdk1.4.2\jre\bin\java.exe
0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08136000 E:\j2sdk1.4.2\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AA000 C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
0x10000000 - 0x100A0000 C:\WINDOWS\System32\scorillont.dll
0x003A0000 - 0x003D0000 C:\WINDOWS\System32\scorsock.dll
0x5FE00000 - 0x5FE12000 C:\WINDOWS\System32\umxexw.dll
0x5FC00000 - 0x5FC18000 C:\WINDOWS\System32\umxtrw.dll
0x5FF00000 - 0x5FF2F000 C:\WINDOWS\System32\umxw.dll
0x00B90000 - 0x00B97000 E:\j2sdk1.4.2\jre\bin\hpi.dll
0x00BB0000 - 0x00BBE000 E:\j2sdk1.4.2\jre\bin\verify.dll
0x00BC0000 - 0x00BD8000 E:\j2sdk1.4.2\jre\bin\java.dll
0x00BE0000 - 0x00BED000 E:\j2sdk1.4.2\jre\bin\zip.dll
0x02FE0000 - 0x030EA000 E:\j2sdk1.4.2\jre\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x771B0000 - 0x772CA000 C:\WINDOWS\system32\ole32.dll
0x03100000 - 0x03150000 E:\j2sdk1.4.2\jre\bin\fontmanager.dll
0x51000000 - 0x5104D000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 220K [0x100a0000, 0x10140000, 0x10580000)
eden space 512K, 30% used [0x100a0000, 0x100c73e8, 0x10120000)
from space 64K, 100% used [0x10130000, 0x10140000, 0x10140000)
to space 64K, 0% used [0x10120000, 0x10120000, 0x10130000)
tenured generation total 1408K, used 131K [0x10580000, 0x106e0000, 0x140a0000)
the space 1408K, 9% used [0x10580000, 0x105a0cd8, 0x105a0e00, 0x106e0000)
compacting perm gen total 4096K, used 3155K [0x140a0000, 0x144a0000, 0x180a0000)
the space 4096K, 77% used [0x140a0000, 0x143b4cd8, 0x143b4e00, 0x144a0000)

Local Time = Mon Apr 07 10:21:29 2003
Elapsed Time = 1
#

  1. The exception above was detected in native code outside the VM

#

  1. Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode)

#


0

Please sign in to leave a comment.