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):
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:
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)
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