Spurious SDL_ACTIVEEVENT messages?

Some people have been reporting weird behavior with one of our games,
described as “The rest of the time I did see either the background
picture through the window, all black in the window, or an afterimage of
whatever I had just had on the screen, delimited by the frame of Wendy’s
window (such as the Firefox window open to the mail message).”

I think this may have some relation to another family of bug reports I
get, which say the game appears in the task bar but the window never
appears. I heard another developer said it was a bug introduced after
1.2.6 (1.2.6 works, 1.2.8 doesn’t) but I haven’t been able to reproduce
it.

After some exchange of debug builds, the only weird thing I could see is
that the game gets a lot of SDL_ACTIVEEVENTs. The following log fragment
shows it - the numbers are the values of pEvent.active.gain,
pEvent.active.state and SDL_GetAppState() when the message is received.
For reference, there are the relevant flags :

SDL_APPMOUSEFOCUS 0x01 /* The app has mouse coverage /
SDL_APPINPUTFOCUS 0x02 /
The app has input focus /
SDL_APPACTIVE 0x04 /
The application is active */

And here’s the log :

G: Act 0 0x01 [0x06]
G: Act 1 0x01 [0x07]
G: Act 0 0x01 [0x06]
G: Act 0 0x02 [0x04]
G: Act 1 0x01 [0x05]
G: Act 1 0x06 [0x07]
G: Act 0 0x01 [0x06]
G: Act 0 0x02 [0x04]
G: Act 1 0x06 [0x06]
G: Act 1 0x01 [0x07]
G: Act 0 0x01 [0x06]
G: Act 1 0x01 [0x07]
G: Act 0 0x01 [0x06]
G: Act 0 0x02 [0x04]
G: Act 1 0x06 [0x07]
G: Act 1 0x01 [0x07]
G: Act 0 0x02 [0x05]
G: Act 0 0x01 [0x04]
G: Act 1 0x01 [0x05]
G: Act 0 0x01 [0x04]
G: Act 1 0x06 [0x06]
G: Act 1 0x01 [0x07]
G: Act 0 0x01 [0x06]
G: Act 0 0x02 [0x04]
G: Act 1 0x01 [0x05]
G: Act 0 0x01 [0x04]
G: Act 1 0x06 [0x07]
G: Act 1 0x01 [0x07]
G: Act 0 0x01 [0x06]
G: Act 1 0x01 [0x07]
G: Act 0 0x02 [0x04]
G: Act 0 0x01 [0x04]
G: Act 1 0x06 [0x07]
G: Act 1 0x01 [0x07]
G: Act 0 0x02 [0x05]
G: Act 0 0x01 [0x04]
G: Act 1 0x01 [0x05]
G: Act 0 0x01 [0x04]
G: Act 1 0x06 [0x06]

Any idea about what can be causing the app to get such a flurry of
activation/deactivations?

Thanks,
–Gabriel

Any idea about what can be causing the app to get such a flurry of
activation/deactivations?

I assume this is Windows…is this happening on a Win98 box and not
WinXP, or whatnot?

–ryan.

El mar, 21-06-2005 a las 02:55 -0400, Ryan C. Gordon escribi?:

Any idea about what can be causing the app to get such a flurry of
activation/deactivations?
I assume this is Windows…is this happening on a Win98 box and not
WinXP, or whatnot?

This report in particular is in Windows XP (5.1 SP2). However it doesn’t
happen in ALL machines with XPSP2. And it doesn’t happen for me with W98
either.

I’ll send this user an older SDL to see if we can at least isolate the
change that makes this happen.

Thanks,
–Gabriel