Jump to content
The Dark Mod Forums

Posix_QueEvent: overflow in Vengeance for a Thief Part 1


Recommended Posts

That string isn't in our libraries or engine or DLL, so I guess it's coming from one of the linux libs.

 

I doubt there's much we can do about this, unless some Linux expert wants to step in here and offer some advice.

Link to post
Share on other sites

It very well could be a performance issue as that area was taking a huge hit. I've tweaked it to be re-relased as part of a a three part campaign. It's now hitting 50-60 fps where as before it was hitting 30fps.

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

Link to post
Share on other sites

That string isn't in our libraries or engine or DLL, so I guess it's coming from one of the linux libs.

 

I doubt there's much we can do about this, unless some Linux expert wants to step in here and offer some advice.

 

It comes from here:

 

 

sys/posix/posix_main.cpp
273:            common->Printf( "Posix_QueEvent: overflow\n" );

 

MAX_QUED_EVENTS is set to 256. Either it could be raised (512? 1024?), or we need to see why events are dropped. If it is performance related, then events can be dropped if the system receives them faster than it can handle them, and 512 or 1024 might not help much.

 

Interestingly enough the code does not saywhat these events are (keyboard? mouse? joystick?) ,and also this is suspicious:

 

 

/*
================
Sys_ClearEvents
================
*/
void Sys_ClearEvents( void ) {
    eventHead = eventTail = 0;
}

 

Events can contain data, emptying the queue like this would leak memory if there are events with data that is not freed. :o

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

 

Interestingly enough the code does not saywhat these events are (keyboard? mouse? joystick?) ,and also this is suspicious:
/*
================
Sys_ClearEvents
================
*/
void Sys_ClearEvents( void ) {
    eventHead = eventTail = 0;
}

Events can contain data, emptying the queue like this would leak memory if there are events with data that is not freed. :o

 

It are indeed keyboard, or console events. And a quick look through the code shows that the ptr seems to be always NULL, except for some cases on win32 (which also empties the queue without freeing the memory in these ptrs).

  • Like 1

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

Btw, my guess is that the overflow apepars if you hold down a key (constant source of keyboard events) or move the mouse, and the game freezes for some time. In that case it cannot handle events (its busy) and the buffer overflows.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

 

It comes from here:

sys/posix/posix_main.cpp
273:            common->Printf( "Posix_QueEvent: overflow\n" );

MAX_QUED_EVENTS is set to 256. Either it could be raised (512? 1024?), or we need to see why events are dropped. If it is performance related, then events can be dropped if the system receives them faster than it can handle them, and 512 or 1024 might not help much.

 

Interestingly enough the code does not saywhat these events are (keyboard? mouse? joystick?) ,and also this is suspicious:

/*
================
Sys_ClearEvents
================
*/
void Sys_ClearEvents( void ) {
    eventHead = eventTail = 0;
}

Events can contain data, emptying the queue like this would leak memory if there are events with data that is not freed. :o

I didn't spot that line of code last night. The bit I was looking at explicitly freed the memory before adjusting the head or tail of the queue.

Link to post
Share on other sites

Could it be that "Posix_QueEvent: overflow" is just a result of the game grinding to a halt? I can reproduce the problem without getting the error in terminal as well..

Even at low resolution with Lod, antialias and everything else at low setting the game still freezes at the intersection....

Link to post
Share on other sites

Could it be that "Posix_QueEvent: overflow" is just a result of the game grinding to a halt? I can reproduce the problem without getting the error in terminal as well..

Even at low resolution with Lod, antialias and everything else at low setting the game still freezes at the intersection....

 

Yes, the overflow very likely happens because thegame grinds to a halt - in this case it no longer can handle events, so they pile up. I don't think the overflow is critical and it can't really be avoided, even by raising the buffer.

 

However, the memory leak might be present, that needs further checkind (depending on wether the queue gets only emptied at game shutdown, or sometimes in the meantime).

 

In addition, the game freeze should be fixed. Maybe the problem is already fixed in 2.03, I think that warrants checking :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...