Raised This Month: $ Target: $400
 0% 

[HELP] Run Time Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-17-2015 , 16:24   Re: [HELP] Run Time Error
Reply With Quote #1

These are the functions that throw AMX_ERR_STACKLOW ( Run time error 7: stack low ) which is know as /* stack underflow */ at amxmodx\amx.h:

At amxmodx\amx.cpp and amxxpc\amx.cpp it is used to composed define function.
PHP Code:
Line 1635#define CHKSTACK()      if (stk>amx->stp) return AMX_ERR_STACKLOW
Line 1661#define CHKSTACK()      if (stk>amx->stp) return AMX_ERR_STACKLOW 
At plugins\include\amxconst.inc its code number is know as 7
PHP Code:
#define AMX_ERR_STACKLOW    7 
The defined function CHKSTACK() is used at compiler\amxxpc\amx.cpp and amxmodx\amx.cpp functions and lines:
PHP Code:
Line 1645int AMXAPI amx_Exec(AMX *amxcell *retvalint index)
Line 2661int AMXAPI amx_Exec(AMX *amxcell *retvalint index)

Line 1671int AMXAPI amx_Exec(AMX *amxcell *retvalint index)
Line 2609int AMXAPI amx_Exec(AMX *amxcell *retvalint index)

    
Line 1752:   CHKSTACK();
    
Line 2050:     CHKSTACK();
    
Line 2745:   CHKSTACK();
    
Line 3085:       CHKSTACK();

    
Line 1774:   CHKSTACK();
    
Line 2072:     CHKSTACK();
    
Line 2704:   CHKSTACK();
    
Line 3043:       CHKSTACK(); 
End of history, I could not do a backtrack because it went crazy at amx_Exec. Then Let us apply this technique, but now a little different because do we have a new context, a mysterious low stack error.

First things first, I could not reproduce you error

How to reproduce you error?

After know it for sure how to reproduce it, remove some functionality from this plugin, then:

1) test if it still throwing that exception.

If not, you are closer to find the problem, and add some functionality back then go to 1)

If yes, remove some functionality again, then go to 1)

Repeat until you discover which line is throwing that Run time error 7. And after find which line, goes through your amxmodx implementation and find out why that line is throwing that exception, as did here.

To maybe guide better the search, the stack underflow error is an error that occurs when an item is called from the stack, but the stack is empty.

So we could think about what uses stacks at this plugin source code and take a close look at it while searching.

Last edited by addons_zz; 12-17-2015 at 17:40. Reason: better info
addons_zz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:09.


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