random "too many events posted" error

Started by Dusty D., Wed 25/05/2005 20:40:18

Previous topic - Next topic

Dusty D.

Two of our test players encountered an "too many events posted" error in completely different situations and rooms of the game. In both cases, I was unable to reproduce this error message, also the search function here didn't give me any hints.

When does this error occur and what does it mean (in general)??

strazer

I think since only one script can run at a time, functions/events will be put in a queue and executed when the current script finishes. According to this page, AGS can queue up to 5 functions per thread.
Maybe the error occurs if more than 5 functions are put in the queue? I've never encountered this error so I can't say in what circumstances this happens.

Pumaman

Whenever you click the mouse or press a key, AGS logs an internal "event". There are also some other things that cause an event to be logged, such as changing room, standing on a hotspot and activating a GUI control.

At the end of each game cycle, AGS then runs through and processes all the posted events.

If more than 15 events get posted, AGS aborts with the error message you describe. This is coded in as a 'sanity test', since there should never really be that many events generated in one cycle.

Was there absoultely nothing in common between the two problems? The same GUI wasn't be used, by any chance?

There are only two ways I can think of that would cause this problem:
(a) Have 16 text boxes on a GUI, and then press a key. This will activate all the text boxes and cause the error
(b) Keep changing between rooms by using NewRoom commands in the Enters Screen Before Fadein interaciton.

Both of these are quite obscure situations though, and I doubt it'd be either.

Is it fairly easy to reproduce the problem, or do you have to play for a while before it happens?

QuoteI think since only one script can run at a time, functions/events will be put in a queue and executed when the current script finishes. According to this page, AGS can queue up to 5 functions per thread.

That's a good thought, but in the case of queued scripts AGS simply discards any extra scripts once 5 are queued. The situation happens too regularly for it to cause an error.

Dusty D.

Quote from: Pumaman on Thu 02/06/2005 19:08:09
Whenever you click the mouse or press a key, AGS logs an internal "event". There are also some other things that cause an event to be logged, such as changing room, standing on a hotspot and activating a GUI control.
Hmm, so I should find out, when such an event is caught. But...: If you are in blocking function and click more than 15 times an object or so, the error would occur, wouldn't it?

Quote
Was there absoultely nothing in common between the two problems? The same GUI wasn't be used, by any chance?
Hmm... the first time, the error was reported to me, it was when interacting a hotspot in room 19 (or so), and the 2nd time was when looking at a hotspot in room 2. both rooms are scrolling (1600x600) rooms, but only one of them with a huge repeatedly_execute script.


Quote
Both of these are quite obscure situations though, and I doubt it'd be either.
I can exclude both possibilities, in fact.

Quote
Is it fairly easy to reproduce the problem, or do you have to play for a while before it happens?
No, I never was able to reproduce this situation, although I got quite good descriptions like "it occured, when I wanted to look at the lower window outside the jail".

The game always runs fine here. Might it be, that it has s.th. to do with an occasionally executed ChangeCharacterView command in the global repeatedly_execute script?
Quote

SMF spam blocked by CleanTalk