Game Development Community

"SDL event queue has too many events"

by Mike Stoddart · in Torque Game Engine · 03/19/2002 (6:31 pm) · 15 replies

I retrieved the latest version of the engine from CVS and installed the SDL RPMs. BTW I'm using Mandrake 8.1. When I run the demo, I get a small window that pops up saying:

"SDL event queue has too many events"

The example then quits.

Has anyone seen this? I haven't managed to find anything on google yet, but I'll keep looking.

#1
03/19/2002 (6:37 pm)
That should "never happen". I'll check it out. Until I fix it you can comment out the AssertFatal on line 493 of x86UNIXWindow, or increase the max number of events on that line (currently 25). If your event queue is truly getting filled up with events though you may experience other problems.

Does it happen immediately when you start the app, or do you have to do something to trigger it? Do you have a joystick and is it configured in mandrake?

- jq
#2
03/19/2002 (6:51 pm)
Sorry, should have given more info.

I choose to start a new missions, then I select the map, and when I click the button to start the mission I get the error.

The "race" game doesn't seem to work - this is the one I first tried to run. Nothing happens, but I'll do some more research.

I don't have a joystick configured in Mandrake; I don't even have one plugged in.

Thanks
#3
03/19/2002 (7:02 pm)
It seems that the only map that works is "Scorched Planet". Both of the other maps give this error.
#4
03/19/2002 (7:09 pm)
Ok, I can reproduce the problem. When the launch button is clicked, torque hitches for a moment doing fileio and during that time it doesn't remove events from the queue, although SDL is still pushing them. So things like mouse motion events can accumulate during that time, although on my system I have to move the mouse very rapidly to trigger it. On slower systems it could be easier to reproduce, and on systems where the X server is generating more X mouse events.

I might just drop that AssertFatal but I need to noodle on it a bit more.
#5
03/19/2002 (7:11 pm)
By the way, to start the racing mod you need to do "./torqueDemo_DEBUG -mod racing".
#6
03/19/2002 (7:13 pm)
Ah, thanks John.
#7
03/19/2002 (7:14 pm)
Wow, real time forum posting. Cool.
#8
03/19/2002 (7:18 pm)
Haha! :)

That racing mod is fantastic! Wonder if I can convince my friend that I wrote it all by mself! *evil grin*

Obviously the racing mod works fine.
#9
03/19/2002 (7:32 pm)
Yeah, the racing mod is weirdly mesmerizing. I just drove around for something like 40 minutes on it once.

Anyway, I checked in a new version of x86UNIXWindow.cc that will print out the event queue when the limit is exceeded. Please grab that version of the code and try it, and post the printouts here.
#10
03/19/2002 (7:49 pm)
Ok we have:

SDL Event Queue:
Event 0: SDL_MOUSEMOTION
Event 1: SDL_MOUSEMOTION
Event 2: SDL_MOUSEMOTION
Event 3: SDL_MOUSEMOTION
Event 4: SDL_MOUSEMOTION
Event 5: SDL_MOUSEMOTION
........
........
........
Event 40: SDL_MOUSEMOTION
Event 41: SDL_MOUSEMOTION
Event 42: SDL_MOUSEMOTION
Event 43: SDL_MOUSEMOTION
Event 44: SDL_MOUSEMOTION
Event 45: SDL_MOUSEMOTION
#11
03/19/2002 (8:00 pm)
Take your time.

If you're using cvs on unix you might need to put a "cvs -z6" in your ~/.cvsrc file to enable compression for the gg server. Then the commands are something like this (replace "username" below with your username):

export CVSROOT=:pserver:username@cvs.garagegames.com:/cvs/torque

cvs login
cd torque
cvs update engine/platformX86UNIX/x86UNIXWindow.cc
#12
03/19/2002 (8:00 pm)
All mouse motion events, nothing else?
#13
03/19/2002 (8:04 pm)
All mouse events; nothing else.

For the record, my PC is:

P3-700
256Mb
Asus V7700 GeForce 2
Abit BH6
SBLive

Mandrake 8.1, with latest SDL RPMs.
#14
03/19/2002 (8:18 pm)
Ok, there's nothing abnormal about your event queue. The code is wrong. I checked in a fix for x86UNIXWindow.cc which disables the checking, since I don't think it is necessary.

Thanks,

- jq
#15
03/19/2002 (8:25 pm)
Great - thanks for your help.