Java (j2re-1.4.x) Tips

Crash when running Applets or Java Graphics

The main Java core for Windows seems to work fine in the Crossover wine environment. But the minute you try to do anything that renders graphics, Java crashes. The simplest test application I've been able to find that displays the problem:

import javax.swing.*;
class test1 {
public static void main(String args[]) {
JFrame mainWin = new JFrame("MainWindow");
JButton button = new JButton("Hello World");
mainWin.getContentPane().add(button);
mainWin.pack();
mainWin.show();
}
}

When you try running this, the windows pops up briefly, then it dissapears and Java crashes with the following (just the interesting parts excerpted):

An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x410B48AEF

Current Java thread:
at sun.awt.windows.Win32BlitLoops.Blit(Native Method)
at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)

So apparently there's something about the Windows Blit call that Java uses to draw on the screen that is causing the crash. I got the above from running Java in a wcmd prompt, there's isn't any error message printed when you try to display an applet from within Internet Explorer, it just crashes so hard the browser locks up.

Digging deeper into Wine, I find this from a --verbose run right before the crash:

fixme:ddraw:Main_DirectDraw_SetCooperativeLevel (0x4036add0)->(00000000,00001008)
err:ddraw:set_render_state Unhandled dwRenderStateType D3DRENDERSTATE_LINEPATTERN (0000000 a) value : 00000000 !
err:ddraw:set_render_state Unhandled dwRenderStateType D3DRENDERSTATE_MONOENABLE (0000000b ) value : 00000000 !

(lots more of these for other render types)

fixme:ddraw:DIB_DirectDrawSurface_Blt dwFlags DDBLT_WAIT and/or DDBLT_ASYNC: can't handle right now.
fixme:ddraw:Main_DirectDrawClipper_Initialize
(0x403e08f8)->(0x4036addc,0x00000000),stub!
fixme:imm:ImmGetContext (0x2002e): stub
fixme:imm:ImmGetContext (0x2002e): stub
fixme:imm:ImmGetOpenStatus (0x403df0a0): semi-stub
fixme:imm:ImmSetConversionStatus (0x403df0a0, 1, 0): stub
fixme:imm:ImmSetOpenStatus Semi-Stub
fixme:imm:ImmGetContext (0x2002e): stub
fixme:imm:ImmGetContext (0x2002e): stub
fixme:imm:ImmSetCompositionWindow STUB
fixme:imm:ImmGetDefaultIMEWnd (0x2002e - (nil) 0x403e0a28 ): semi-stub
fixme:imagehlp:SymGetOptions (): stub
fixme:imagehlp:SymSetOptions (0x00000010): stub
fixme:imagehlp:SymInitialize (0x15, (null), 0): stub


by Unknown on 2009-07-17 11:30:31
Important Information Tips are provided by the CrossOver Community and Advocates. They are not intended to be used for official CodeWeavers Support. For that, please visit our official support pages.
CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi02LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzM4NzIzMjIwLCJjc3JmX3Rva2VuIjoidjdhTjNYbVR6ZktrZ2VFUiIsImdkcHIiOjB9