AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Engine Error (https://forums.alliedmods.net/showthread.php?t=39979)

za_bullet 05-08-2006 12:01

Engine Error
 
1 Attachment(s)
I get the attached message from the engine ever now and again. Anyone seen this one?

It seem self explanatory, but I always have a matching EndMessage....and the methods where I use begin and end are locked by a critical section!

Any ideas?

showdax 05-08-2006 12:36

No one is going to have any ideas unless you post some code.

za_bullet 05-09-2006 02:34

WHAT?

There isn't any associated code....the ENGINE crashes...and it throws that dialog (Did you even look at the attachment?). Presumably if someone has seen that message dialog before they might know what causes it (no code required).

Anyway.

D.

c0ldfyr3 05-09-2006 10:35

This means in one of the plugins on your server, someone is calling IVEngineServer::UserMessageBegin, and not calling the corresponding UserMessageEnd function.

Try removing plugins one by one until you can find the culprit.
Hope this helps.

za_bullet 05-11-2006 06:35

Found the problem. It was my plugin. I wasn't thinking it through properly. There were times I was calling beginMessage from another thread which conflicted with a call from the engine itself. Perhaps Valve should just put a locks on their message queue considering its so important that it can bring down the whole engine, or course you'd just get deadlocks if someone didn't called endmessage. ANYWAY, I suppose you don't take that into consideration when you are writing a single threaded application.

It was easy enough to just queue my own messages and then fire them out during a gameframe. Doesn't seem to be a performance hit.

Thanks for input guys.

D.

Mani 05-11-2006 08:49

I would avoid calling any Valve functions from a spawned thread as I highly doubt Valve's code is thread safe.

Mani


All times are GMT -4. The time now is 17:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.