Program exitting with no errors when in fullscreen exclusive mode

A

Ashak

Hi,

I've been playing with fullscreen exclusive mode in Java for a few
days, yet i've run into troubles. I simply had a single loop (no
threads), it was simply drawing a red ball bouncing around the screen
on a blue background. After about 690 times around my loop (move the
object, redraw it), the program seems to exit. However, I get no
errors and control doesn't continue through the program and execute
the last few statements. The only thing I can think of is that i'm
using graphics memory or something. The machine I was originally
testing on has about 8M of memory for the graphics card, a different
machine with 64M of ram exhibits the same problem but after a much
larger amount of time. I don't have the code at hand, but I can post
it tomorrow if anyone thinks it might help (there's not much too it at
all). I'm creating a BufferStrategy with two buffers, and then getting
a graphics context from my BufferStrategy, drawing to that, then
swapping the buffers over.

Anyway... anyone got any ideas where my problem might be?

Thanks.
 
S

S. Balk

I've been playing with fullscreen exclusive mode in Java for a few
days, yet i've run into troubles. I simply had a single loop (no
threads), it was simply drawing a red ball bouncing around the screen
on a blue background. After about 690 times around my loop (move the
object, redraw it), the program seems to exit. However, I get no
errors and control doesn't continue through the program and execute
the last few statements.

Very nasty bug... I have narrowed it down to:

The moment garbage-collection starts, the app exits. Just try to put a
System.gc()-call after 300 frames and see if it exits the same way.

My solution: reinstalled OS (Win98) and installed the latest video-drivers.
I only saw it on j2sdk 1.4.0.

Good luck!
 
A

Ashak

I've been playing with fullscreen exclusive mode in Java for a few
Very nasty bug... I have narrowed it down to:

The moment garbage-collection starts, the app exits. Just try to put a
System.gc()-call after 300 frames and see if it exits the same way.

My solution: reinstalled OS (Win98) and installed the latest video-drivers.
I only saw it on j2sdk 1.4.0.

Good luck!

Thanks, I'll check which version of the j2sdk i'm using, I have a
strange feeling i'm using 1.4.0 ....

I'l let you know how I get on.

Again, thanks.
 
A

Ashak

Thanks, I'll check which version of the j2sdk i'm using, I have a
strange feeling i'm using 1.4.0 ....

I'l let you know how I get on.

Again, thanks.


Ok, I was using 1.4.1_rc3 on windows and that exhibited the problem
that I discussed. I just upgraded to 1.4.2_01 and my application works
fine.

In response to your other ideas, I did put a System.gc() call after
300 frames and yes, it did cause the exact same problem, until I
upgraded the j2sdk of course.

Thanks for the help, I can now continue playing with this stuff :)

Ashak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top