Very strange compile error...

Hi,

All my java programs compile fine, except for when I try to set the background color of a component. It's driving me nuts. I've uninstalled and reinstalled the Java JDK, but to no avail. Here's the text of the error message when I attempt to compile.

Unexpected Signal : EXCEPTION_FLT_STACK_CHECK (0xc0000092) occurred at PC=0xE6D2

12

Function=[Unknown.]

Library=(N/A)

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:

Dynamic libraries:

0x00400000 - 0x0040B000 C:\j2sdk1.4.2_05\bin\javac.exe

0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll

0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll

0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll

0x78000000 - 0x7807E000 C:\WINDOWS\system32\RPCRT4.dll

0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll

0x08000000 - 0x08139000 C:\j2sdk1.4.2_05\jre\bin\client\jvm.dll

0x77D40000 - 0x77DC6000 C:\WINDOWS\system32\USER32.dll

0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll

0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll

0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.DLL

0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL

0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll

0x6BC00000 - 0x6BC14000 C:\WINDOWS\System32\DrvTrNTm.dll

0x6BC20000 - 0x6BC3D000 C:\WINDOWS\System32\DrvTrNTl.dll

0x00A20000 - 0x00A94000 C:\WINDOWS\TEMP\qka3.tmp

0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.DLL

0x71B20000 - 0x71B31000 C:\WINDOWS\system32\MPR.DLL

0x771B0000 - 0x772C7000 C:\WINDOWS\system32\OLE32.DLL

0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.DLL

0x71AD0000 - 0x71AD8000 C:\WINDOWS\System32\WSOCK32.DLL

0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32\WS2_32.dll

0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll

0x00BC0000 - 0x00BEB000 C:\WINDOWS\System32\msctfime.ime

0x10000000 - 0x10007000 C:\j2sdk1.4.2_05\jre\bin\hpi.dll

0x00C00000 - 0x00C0E000 C:\j2sdk1.4.2_05\jre\bin\verify.dll

0x00C10000 - 0x00C29000 C:\j2sdk1.4.2_05\jre\bin\java.dll

0x00C30000 - 0x00C3D000 C:\j2sdk1.4.2_05\jre\bin\zip.dll

0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll

0x6D510000 - 0x6D58D000 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 362K [0x10010000, 0x100b0000, 0x104f0000)

eden

****************

Another exception has been detected while we were handling last error.

Dumping information about last error:

ERROR REPORT FILE = (N/A)

PC = 0x00e6d212

SIGNAL = -1073741678

FUNCTION NAME = (N/A)

OFFSET = 0xFFFFFFFF

LIBRARY NAME = (N/A)

Please check ERROR REPORT FILE for further information, if there is any.

Good bye.

And here' s the block of code that causes the error... if I comment out the line

panel.setBackground(Color.white)

it compiles without error.

JPanel panel =new JPanel();

panel.setBorder(BorderFactory.createLoweredBevelBorder());

panel.setPreferredSize(new Dimension(400,300));

panel.setBackground(Color.white);

I am running Windows XP Home Edition. Any ideas? Help is greatly appreciated.

Nick

[3667 byte] By [NPatrick6] at [2007-9-30 16:04:48]
# 1
Your JVM crashed when you compile your file. This is unusual.If your can reproduce this with a small test-case, I suggest youfilke a bug here: http://bugs.sun.com/services/bugreport/index.jsp--Alexis
am74686 at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...
# 2

Hi there

I also got a strange compiler error on code that everyone said works fine. Since your code looks fine maybe you should try what I did.

I used the jdb debug tool (that you find in the home directory of your j2sdk installation.) Basically you run the application using "jdb" from the command line instead of "java".

jdb myClass

Then you have to tell the debugger to stop at a line that you know the execution will get to before the compiler bugs out.

stop at myClass:42

run

Then you can step through the code and find out which line is causing hassle.

step

In my case there was a line of code setting an unused variable to null that crashed everything.

I'm not saying it's the definite answer but it might help!

Cheers,

rachel

RachelSwailes at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...
# 3

Sorry!! I totally misread your post! I thought it was compiling and then bugging out at runtime! Sorry about that...

I agree with the first reply, see if you can replicate it on a smaller scale and if you call tell Sun about it. If you can't, gradually work your smaller scale example into your bigger code.

Cheers,

Rachel

RachelSwailes at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...
# 4

Thanks for all the suggestions.

Yeah, the fact that it's such a simple thing and there's nothing wrong with the code is what really gets on my nerves. I've pinpointed it just to setting the background color of components... I tried reinstalling the JVM but that didn't fix it... and I have been able to replicate it in other places (basically, any time I try to set the background color I get this error).

However, this code compiles fine on other computers... so I'm not sure if it would be considered a "bug." Seems too simple... seems like something's wrong on my computer, not with Sun's product. A damaged file maybe?

Thanks again for the help... any other ideas? I'll keep looking around...

Nick

NPatrick6 at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...
# 5
Ho wdo you compile? IDE, command-line? Which options?What platforms work fine and which fail?--Alexis
am74686 at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...
# 6

Compile using the command prompt (DOS in Windows XP)... so yeah, command line, not IDE.

No options... just javac and the file.

Windows XP does not work.

Will try it on Windows 98 machine downstairs and on my sister's XP machine when I get the chance.

I've used the setBackground() method plenty of times at my summer internship compiling in Linux and it worked flawlessly.

NPatrick6 at 2007-7-5 23:35:05 > top of Java-index,Administration Tools,Sun Connection...