Jump to content
The Dark Mod Forums

Posix_QueEvent: overflow in Vengeance for a Thief Part 1


whoop
 Share

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.

 

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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.

 Share

  • Recent Status Updates

    • jaxa

      Embracer Group is Buying Square Enix Montréal, Eidos, and Crystal Dynamics for “Only” 300 Million USD: https://wccftech.com/embracer-group-square-enix-montreal-eidos-crystal-dynamics/
      · 1 reply
    • duzenko

      Do we want fur in TDM? Like https://duzenko.github.io/webgl/
      · 6 replies
    • Epifire

      Sometimes life throws a curveball - other times it straight up tries to take you outta the game. Been one thing after another lately but I ain't goin without a fight!
      · 2 replies
    • duzenko

      My Uber rating (as a passenger) is 4.71. Is there still hope or should I just kill myself? What's yours?
      · 3 replies
    • kano

      Did I mention how absolutely grateful I am that TDM didn't get (and can never be) assimilated by a huge company like Microsoft, as is what happened to Minecraft?
      · 3 replies
×
×
  • Create New...