Jump to content
The Dark Mod Forums

Posix_QueEvent: overflow in Vengeance for a Thief Part 1


whoop

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.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...