Server Crashing [Sourcehook RecallGetIFace]
So this just started happening tonight and im not sure why as I havent really changed anything at all. The few additions I did make were totally unrelated, didnt use Sourcehook at all, and I removed them and its still occuring.
The problem seems to be with my prehook on LevelInit() however its been there for months and hasnt caused any problems. The exact line I dont think it likes is... SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const *, char const *, char const *, char const *, bool, bool); but as I said before, until now its worked perfectly. Nothing massive has changed in the least so this is extremely odd. Heres a picture of the callstack trace, and so on. http://imagenouch.com/images/2009/Mar/11238501157.PNG |
Re: Server Crashing [Sourcehook RecallGetIFace]
Looks like ( and I'm no real expert here ) that your sourcehook pointer isn't set.
Looks like the error comes from the shptr->GetIfacePtr() |
Re: Server Crashing [Sourcehook RecallGetIFace]
I dunno, still not sure how that could have happened as everything has been working fine. Not to mention it adds various hooks prior to that one.
|
Re: Server Crashing [Sourcehook RecallGetIFace]
Yeah, the SMSDK sets the shptr pointer for you. Though just to be sure you can always inspect it with the debugger.
|
Re: Server Crashing [Sourcehook RecallGetIFace]
Yeah it seems to be fine, so I am still clueless. Ive been tinkering for hours and cannot figure out what the problem is.
|
Re: Server Crashing [Sourcehook RecallGetIFace]
Seems something there is null. Maybe the definition of your IServerGameDLL variable??? Be my next guess.
|
Re: Server Crashing [Sourcehook RecallGetIFace]
Mhhh, that call stack looks weird.
At the bottom engine.dll calls LevelInit Then the hookfunc in metamod.2.ep2.dll gets called (because the metamod core is the first thing that registered a hook on LevelInit) It first calls your PreHook handler over CMyDelegateImpl and FastDelegate. Why does it jump back into metamod...dll ? Your handler function should be there instead. Then some bogus address and then RecallGetIface. RecallGetIface will probably be correct if you're doing RETURN_META_(..)NEWPARAMS but the jump from FastDelegate into metamod.dll and then into an address which seems to be on the heap looks like the stack might have been corrupted. Or I'm wrong, I'm tired, I'll take another look tomorrow. Would you mind sharing some code? Your LevelInit handler might help a bit. |
Re: Server Crashing [Sourcehook RecallGetIFace]
Certainly, I appreciate the help.
Code:
char *g_MapEntLists; //Stores list of all Map Entities on LevelInit() |
Re: Server Crashing [Sourcehook RecallGetIFace]
Mmm, I don't see anything wrong. Have you tried to put that hook alone in a separate test plugin?
Another problem with that callstack is: RETURN_META_VALUE_NEWPARAMS calls: SH_GLOB_SHPTR->SetRes SH_GLOB_SHPTR->DoRecall SH_GLOB_SHPTR->GetIface in that order. So if shptr was null it should crash on the first one. |
Re: Server Crashing [Sourcehook RecallGetIFace]
In his .png tho, the shptr is null in the call stack. That just doesn't make sense on why it would be that way.
|
All times are GMT -4. The time now is 17:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.