View Single Post
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 07-06-2011 , 11:36   Re: [EXTENSION ALL] CTX editor (For anything/everything)
Reply With Quote #9

Code:
Program received signal SIGSEGV, Segmentation fault.
0xeef82eef in RestoreSet(CUtlDict<void*, unsigned short>*, CUtlDict<void*, unsigned short>*, int, int, unsigned int) ()
   from /home/kyle/SRCDS/orangebox/cstrike/addons/sourcemod/extensions/ctx.ext.so
(gdb) backtrace
#0  0xeef82eef in RestoreSet(CUtlDict<void*, unsigned short>*, CUtlDict<void*, unsigned short>*, int, int, unsigned int) ()
   from /home/kyle/SRCDS/orangebox/cstrike/addons/sourcemod/extensions/ctx.ext.so
#1  0xeef830b5 in CTX_ResetAll(SourcePawn::IPluginContext*, int const*) () from /home/kyle/SRCDS/orangebox/cstrike/addons/sourcemod/extensions/ctx.ext.so
#2  0xef850c87 in NativeCallback(sp_context_s*, unsigned int, int*) () from /home/kyle/SRCDS/orangebox/cstrike/addons/sourcemod/bin/sourcepawn.jit.x86.so
#3  0x082c3ebd in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
This sure hates CSS

I wrote the attached plugin and was planning on releasing it. However, the bools don't seem to fire correctly (they always return true, even when garbage is entered)? The natives throw silent errors (I'm at fault for not looking at the source), and the return on CTX_Get doesn't have a static type (and can create false positives if the value of the said CTX is 0, 0.0, or false). Could you always fill the ReturnString and just return true or false depending on it's action?

To reproduce the crash (easily), just load the attached plugin and type in sm_ctx_resettype CTX_Weapon or any one of the types.
Attached Files
File Type: sp Get Plugin or Get Source (CTXTools.sp - 376 views - 7.6 KB)
File Type: smx CTXTools.smx (4.2 KB, 428 views)

Last edited by KyleS; 07-06-2011 at 11:51. Reason: Added a compiled binary.
KyleS is offline