Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Low-level exception when dealing with Fullscreen  (Read 3237 times)
0 Members and 1 Guest are viewing this topic.
Offline Ceranith

Senior Newbie





« Posted 2005-01-09 06:55:05 »

When I start up my game, there's about a 30% chance it abruptly crashes. I see a white full screen window at 640x480, then it just exits with this error:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d0b5f87, pid=2288, tid=2296
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
# Problematic frame:
# C  [awt.dll+0xb5f87]
#

---------------  T H R E A D  ---------------

Current thread (0x00035de0):  JavaThread "main" [_thread_in_native, id=2296]

siginfo: ExceptionCode=0xc0000005, reading address 0x017afe65

Registers:
EAX=0x0007f8a4, EBX=0x00000001, ECX=0x017afe65, EDX=0x0007f928
ESP=0x0007f890, EBP=0x0007f978, ESI=0x0ae04540, EDI=0x0007f928
EIP=0x6d0b5f87, EFLAGS=0x00010246

Top of Stack: (sp=0x0007f890)
0x0007f890:   01000400 0007f8a4 00035e9c 0007f99c
0x0007f8a0:   2b394928 00000064 00035e9c 0007f99c
0x0007f8b0:   00000062 00035e9c 00035e9c 0007f99c
0x0007f8c0:   0007f8b4 00035e9c 0007fbb8 6d759f8a
0x0007f8d0:   6d764a90 ffffffff 0007f978 6d03423c
0x0007f8e0:   00035e9c 0007f99c 00000062 00035e9c
0x0007f8f0:   0007f99c ff000000 6d0342b7 00035e9c
0x0007f900:   0007f99c 00000000 6d0af2d6 00035e9c

Instructions: (pc=0x6d0b5f87)
0x6d0b5f77:   8b 8e a8 00 00 00 8d 44 24 0c 50 68 00 04 00 01
0x6d0b5f87:   8b 11 6a 00 6a 00 57 ff 52 20 3d c2 01 76 88 7f


Stack: [0x00040000,0x00080000),  sp=0x0007f890,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [awt.dll+0xb5f87]
j  sun.awt.windows.Win32DDRenderer.fillRect(Lsun/java2d/SunGraphics2D;IIII)V+146
j  sun.java2d.pipe.ValidatePipe.fillRect(Lsun/java2d/SunGraphics2D;IIII)V+19
j  sun.java2d.SunGraphics2D.fillRect(IIII)V+10
j  scepter.engine.graphics.Surface.clear()V+22
j  scepter.engine.GameEngine.start()V+81
j  scepter.Scepter.main([Ljava/lang/String;)V+3
v  ~StubRoutines::call_stub
V  [jvm.dll+0x8168d]
V  [jvm.dll+0xd4179]
V  [jvm.dll+0x8155e]
V  [jvm.dll+0x8844c]
C  [java.exe+0x14c0]
C  [java.exe+0x64cd]
C  [kernel32.dll+0x2141a]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.windows.Win32DDRenderer.doFillRectDD(Lsun/java2d/SurfaceData;IIIII)V+0
j  sun.awt.windows.Win32DDRenderer.fillRect(Lsun/java2d/SunGraphics2D;IIII)V+146
j  sun.java2d.pipe.ValidatePipe.fillRect(Lsun/java2d/SunGraphics2D;IIII)V+19
j  sun.java2d.SunGraphics2D.fillRect(IIII)V+10
j  scepter.engine.graphics.Surface.clear()V+22
j  scepter.engine.GameEngine.start()V+81
j  scepter.Scepter.main([Ljava/lang/String;)V+3
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x0ae02150 JavaThread "Direct Clip" daemon [_thread_blocked, id=3588]
  0x0ae01cd0 JavaThread "Direct Clip" daemon [_thread_blocked, id=3332]
  0x00acfde0 JavaThread "Java Sound Sequencer" [_thread_blocked, id=3484]
  0x0add49b0 JavaThread "Headspace mixer frame proc thread" daemon [_thread_blocked, id=2216]
  0x00accab8 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=1652]
  0x00acc7f8 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=2940]
  0x00ac0d88 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=3700]
  0x00abbd60 JavaThread "AWT-Windows" daemon [_thread_in_native, id=2924]
  0x00abb930 JavaThread "AWT-Shutdown" [_thread_blocked, id=956]
  0x00aba6c0 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1604]
  0x00a6bc80 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3220]
  0x00a6a858 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2872]
  0x00a69b00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=800]
  0x00a45ee0 JavaThread "Finalizer" daemon [_thread_blocked, id=2852]
  0x0003fa00 JavaThread "Reference Handler" daemon [_thread_blocked, id=492]
=>0x00035de0 JavaThread "main" [_thread_in_native, id=2296]

Other Threads:
  0x00a67150 VMThread [id=2380]
  0x00a6ce90 WatcherThread [id=2408]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 576K, used 6K [0x22a60000, 0x22b00000, 0x22f40000)
  eden space 512K,   1% used [0x22a60000, 0x22a61880, 0x22ae0000)
  from space 64K,   0% used [0x22ae0000, 0x22ae0000, 0x22af0000)
  to   space 64K,   0% used [0x22af0000, 0x22af0000, 0x22b00000)
 tenured generation   total 4612K, used 3967K [0x22f40000, 0x233c1000, 0x26a60000)
   the space 4612K,  86% used [0x22f40000, 0x2331fc58, 0x2331fe00, 0x233c1000)
 compacting perm gen  total 8192K, used 719K [0x26a60000, 0x27260000, 0x2aa60000)
   the space 8192K,   8% used [0x26a60000, 0x26b13f28, 0x26b14000, 0x27260000)
    ro space 8192K,  66% used [0x2aa60000, 0x2afb7960, 0x2afb7a00, 0x2b260000)
    rw space 12288K,  46% used [0x2b260000, 0x2b7f43a8, 0x2b7f4400, 0x2be60000)

Dynamic libraries:
0x00400000 - 0x0040c000       C:\Program Files\Java\jdk1.5.0\bin\java.exe
0x77f50000 - 0x77ff7000       C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000       C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000       C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000       C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000       C:\WINDOWS\system32\MSVCRT.dll
0x6d640000 - 0x6d7c5000       C:\Program Files\Java\jdk1.5.0\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcc000       C:\WINDOWS\system32\USER32.dll
0x7f000000 - 0x7f041000       C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000       C:\WINDOWS\System32\WINMM.dll
0x6d280000 - 0x6d288000       C:\Program Files\Java\jdk1.5.0\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000       C:\WINDOWS\System32\PSAPI.DLL
0x6d610000 - 0x6d61c000       C:\Program Files\Java\jdk1.5.0\jre\bin\verify.dll
0x6d300000 - 0x6d31d000       C:\Program Files\Java\jdk1.5.0\jre\bin\java.dll
0x6d630000 - 0x6d63f000       C:\Program Files\Java\jdk1.5.0\jre\bin\zip.dll
0x6d000000 - 0x6d166000       C:\Program Files\Java\jdk1.5.0\jre\bin\awt.dll
0x73000000 - 0x73023000       C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763ac000       C:\WINDOWS\System32\IMM32.dll
0x771b0000 - 0x772d4000       C:\WINDOWS\system32\ole32.dll
0x5ad70000 - 0x5ada4000       C:\WINDOWS\System32\uxtheme.dll
0x51000000 - 0x51049000       C:\WINDOWS\System32\ddraw.dll
0x73bc0000 - 0x73bc6000       C:\WINDOWS\System32\DCIMAN32.dll
0x5c000000 - 0x5c0c8000       C:\WINDOWS\System32\D3DIM700.DLL
0x6d240000 - 0x6d27d000       C:\Program Files\Java\jdk1.5.0\jre\bin\fontmanager.dll
0x10000000 - 0x10007000       C:\Program Files\Logitech\MouseWare\System\LgWndHk.dll
0x02dc0000 - 0x02dcb000       C:\Program Files\Common Files\Logitech\Scrolling\LgMsgHk.dll
0x55900000 - 0x55961000       C:\WINDOWS\System32\MSVCP60.dll
0x6d190000 - 0x6d1bf000       C:\Program Files\Java\jdk1.5.0\jre\bin\cmm.dll
0x6d3c0000 - 0x6d3df000       C:\Program Files\Java\jdk1.5.0\jre\bin\jpeg.dll
0x6d470000 - 0x6d495000       C:\Program Files\Java\jdk1.5.0\jre\bin\jsound.dll
0x6d4a0000 - 0x6d4a7000       C:\Program Files\Java\jdk1.5.0\jre\bin\jsoundds.dll
0x51080000 - 0x510dd000       C:\WINDOWS\System32\DSOUND.dll
0x77c00000 - 0x77c07000       C:\WINDOWS\system32\VERSION.dll
0x72d20000 - 0x72d29000       C:\WINDOWS\System32\wdmaud.drv
0x72d10000 - 0x72d18000       C:\WINDOWS\System32\msacm32.drv
0x77be0000 - 0x77bf4000       C:\WINDOWS\System32\MSACM32.dll
0x77bd0000 - 0x77bd7000       C:\WINDOWS\System32\midimap.dll
0x5ef80000 - 0x5ef84000       C:\WINDOWS\System32\KsUser.dll

VM Arguments:
java_command: scepter.Scepter

Environment Variables:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\MinGW\bin;C:\Program Files\Java\jdk1.5.0\bin
USERNAME=Jason
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD


---------------  S Y S T E M  ---------------

OS: Windows XP Build 2600 Service Pack 1

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 523764k(174940k free), swap 1280332k(974092k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0-b64) for windows-x86, built on Sep 15 2004 03:00:31 by "java_re" with MS VC++ 6.0


This only occurs in fullscreen mode and not windowed. It crashes at the first drawing function I attempt to call, which is simply g.fillRect(0, 0, 640, 480);

The problem code is a simplified version this:

frame.createBufferStrategy(2);
// then call getDrawGraphics() and use this to call fillRect

Adding a sleep() between those two statements seems to fix everything. Even a Thread.sleep(0).

I've heard of similar things happening to people before, but this is the first time it's happened to me. Is my "solution" the only option I have? Is this a known bug, because I thought it was fixed by 1.5? I don't know, maybe it's my code afterall, I just don't see it.

Anyway, thanks for any explanations.
Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2005-01-09 08:34:07 »

Since its a native crash is likely to do with the particular version of the JVM you're using. I note there's still a "b64" on your version. I think thats beta?

Is there a newer version out yet?

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2005-01-09 18:49:47 »

Quote
Since its a native crash is likely to do with the particular version of the JVM you're using. I note there's still a "b64" on your version. I think thats beta?

Is there a newer version out yet?

Kev


"b" numbers are supposed to be no longer in usage. It was a bug that they continued to be used in linux for a while for the actual normal releases(1.4.2-b29 IIRC being the last one before they fixed it, and switched to the numbering scheme that Sun has officially declared (the _03, _04, _05 etc scheme). I believe it was b for build, not beta, since the numbers are far too high to mean anything else.

So, it could well be that the bug they thought they'd fixed has come back again Smiley. Youll need to "java -version" to find out.

Anyway, current version of java 5 is 1.5.0_01. If you have anything else, you are behind, and you should upgrade immediately.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ceranith

Senior Newbie





« Reply #3 - Posted 2005-01-09 19:11:54 »

I actually didn't have the latest release, but I just got it and the problem is still there. It's the same error message but the version now shows up as 1.5.0_01-b08
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2005-01-10 10:27:05 »

I woudl guess this is one of those major bugs in java 5 we all just expected because its a ".0" release - contrary to the public protestations of Sun executives telling us we were silly and that java 5 was as stable or more stable than mature java releases Tongue.

So...check if it works in 1.4.2_06, then log a bug report (google: sun java bug report). If it works in 1.4.2 it's more likely you'll get a quick fix, I suspect, since regression bugs are easier to fix. If it doesn't work in 1.4.2 either, then probably you have some underlying hardware / graphics driver / etc problem that they're still working on - but would appreciate you logging the bug anyway.

Then again...seeing as you're using an out of date Tongue copy of windows (SP1) perhaps you're the kind of person using old graphics drivers too? Roll Eyes

malloc will be first against the wall when the revolution comes...
Offline Ceranith

Senior Newbie





« Reply #5 - Posted 2005-01-10 15:46:43 »

I guess the only thing left to do is to file a bug report. Thanks.
Offline Virum

Junior Devvie




Like a leaf in an icy world, memories will fade


« Reply #6 - Posted 2005-01-11 14:26:49 »

Quote
Then again...seeing as you're using an out of date Tongue copy of windows (SP1) perhaps you're the kind of person using old graphics drivers too? Roll Eyes



Service Pack 2 seems to be crap from what I've heard. Sad  That's why I haven't upgraded yet.

It's time to prove to your friends that your worth a damn. Sometimes that means dying; sometimes that means killing a whole lotta people.

Blog
Offline Ceranith

Senior Newbie





« Reply #7 - Posted 2005-01-12 21:44:41 »

I think I may have found out why my code crashed all the time. I ran some other fullscreen programs, and they ran just fine. So I tested my app further to see what the problem was.

I was creating a class called "Surface" and right after I called createBufferStrategy(2), I saved a reference of the Graphics object in the Surface class. Constructing it like:
Surface screen = new Surface(bufferStrategy.getDrawGraphics());
Then I would use "screen" to do all my drawing.

I now changed my code to call getDrawGraphics() every loop, and after I'm done using the Graphics object for one loop, I dispose of it. My program hasn't crashed yet, so this may have fixed the problem.

Does this make sense to anybody? I'm wondering what the difference is. Well, now I have to make quite a few design changes because of this... but as long as it's working now, I'm happy Smiley
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #8 - Posted 2005-01-13 02:31:59 »

FYI: the 'b' in the java string name stands for 'build' - in case that's not obvious.

As for the crash, please file a bug, including a test case, information about the configuration (os, video board, drivers version, directx version).

As for the workaround: caching a graphics object is not a good idea in general..
Offline Ceranith

Senior Newbie





« Reply #9 - Posted 2005-01-13 03:38:50 »

Ok, I just submitted the bug report.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #10 - Posted 2005-01-17 01:29:44 »

Thanks, I had it assigned to me on Friday =)
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (25 views)
2018-11-16 13:46:03

hadezbladez (33 views)
2018-11-16 13:41:33

hadezbladez (16 views)
2018-11-16 13:35:35

hadezbladez (12 views)
2018-11-16 13:32:03

EgonOlsen (1890 views)
2018-06-10 19:43:48

EgonOlsen (1912 views)
2018-06-10 19:43:44

EgonOlsen (1267 views)
2018-06-10 19:43:20

DesertCoockie (1711 views)
2018-05-13 18:23:11

nelsongames (1398 views)
2018-04-24 18:15:36

nelsongames (2012 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!