MediaTracker and fullscreen mode.

Anyone had any trouble with MediaTracker in fullscreen mode?

In particular waitForID( id, ms ) seems to be triggering a System.exit somewhere. I am guessing this is the case as my program suddenly steps back out of fullscreen and exits - no stack trace, no nothing. With the judicous use of some printlns I’ve figured out that is the last thing it does. It doesn’t do this in windowed mode. Any thoughts?

cheers,
John

(PC specs: Win98 SE, 400Mhz celeron, 256Mb RAM, and a SiS 6326 card 8Mb VRAM, JDK 1.4.1)

Sorry John,

I’ve been playing a little with the fullscreen exclusive mode API and using the MediaTracker to load images as well with fine success (I am also on 98SE sadly, but the other system specs differ). Another thing you could try is to use the javax.swing.ImageIcon(URL).getImage() method of constructing your image to see if you have the same results… I’ve also had success doing that in FS.

Good luck!

It sounds like you’ve run into a bug in SiS video drivers. We’ve seen similar behaviour on some other videoboards. It has nothing to do with ImageTracker, but with fullscreen mode.

Try running the app with first -Dsun.java2d.d3d=false, if it doesn’t help, with -Dsun.java2d.ddoffscreen=false,
and then with -Dsun.java2d.noddraw=true . This is not a great workaround, obviously, but will help you determine what could be causing this.

Also, make sure you’re using the latest jdk (1.4.2 that is), and have the latest drivers.

Cheers for the flags. They did give me some more pointers.
The d3d=false flag didn’t make a difference, but the other two (ddoffscreen=false and noddraw=true) meant the game did not unexpectantly quit (which is nice). However they images did not seem to render properly, as I ended up with a black screen. I could tell I was in the game tho, as my cursor would change when I was hovering over menu text (which was otherwise invisible).
I am probably going to drive a different card in this PC, as it’s misbehaving a lot, so I’ll see if that makes a difference. I’ll try the latest JDK too (now that I’ve finally got broadbanc!!).

John