[Ajuda] Run time error 3: "Stack/heap collision (insufficient stack size)"
#1

Apуs a ъltima atualizaзгo do GameMode, surgiu esse debug no log

Acontece que ele se refere a uma callback que na verdade eu nem alterei nada.
Pesquisei sobre esse problema, mas nгo achei nada certo. Se jб passaram por esse erro, me ajude a corrigi-lo.


Debug no server_log:

Код:
[23:57:45] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[23:57:45] [debug]  Stack pointer (STK) is 0x307B5C, heap pointer (HEA) is 0x307C6C
[23:57:45] [debug] AMX backtrace:
[23:57:45] [debug] #0 00008a90 in ?? (3177852, 3060684, 3177576) from NFS.amx
[23:57:45] [debug] #1 001236a8 in ?? (0) from NFS.amx
[23:57:45] [debug] #2 0010e5fc in public playRace (0) from NFS.amx
[23:57:45] [debug] #3 0015ad94 in ?? () from NFS.amx
[23:57:45] [debug] #4 0002174c in public Itter_OnGameModeInit () from NFS.amx
[23:57:45] [debug] #5 native CallLocalFunction () from samp-server.exe
[23:57:45] [debug] #6 0001d1b8 in public ScriptInit_OnGameModeInit () from NFS.amx
[23:57:45] [debug] #7 0001c13c in public SSCANF_OnGameModeInit () from NFS.amx
[23:57:45] [debug] #8 native CallLocalFunction () from samp-server.exe
[23:57:45] [debug] #9 00006b8c in public zcmd_OnGameModeInit () from NFS.amx
[23:57:45] [debug] #10 native CallLocalFunction () from samp-server.exe
[23:57:45] [debug] #11 000005c0 in public OnGameModeInit () from NFS.amx
Nгo acredito que o problema esteja realmente em playRace, atй porque nгo alterei nada lб.
Fico no aguardo!
Reply
#2

Isto acontece quando vocк tem muitas variбveis/arrays com muitas cйlulas. vocк nгo precisa de muitas cйlulas para executar algo..


pawn Код:
new string[512];

Dificilmente uma string usarб tudo isso de cйlulas, entгo vocк pode fazer assim:

pawn Код:
new string[128];
Reply
#3

Quote:
Originally Posted by pawn-lang-3.2.3664
  • #pragma dynamic value
    Sets the size, in cells, of the memory block for dynamic data
    (the stack and the heap) to the value specified by the expression.
    The default size of the dynamic data block is implementation
    defined. An implementation may also choose to
    grow the block on an as-needed basis (see the host program’s
    documentation, or the “Implementor’s Guide” for details).
Pode usar estб diretiva caso necessite de mais memуria(Como no seu caso), ou entгo pode rever seu cуdigo e reduzir o uso excessivo de memуria para maior optimizaзгo.
Reply
#4

Obrigado pessoal,
sу nгo sei onde e como vou encontrar essa cйlula :/
Mas vou pesquisar se tem algo a ver com a ultima att.
Reply
#5

Quote:
Originally Posted by Skudinhu
Посмотреть сообщение
Obrigado pessoal,
sу nгo sei onde e como vou encontrar essa cйlula :/
Mas vou pesquisar se tem algo a ver com a ultima att.
Geralmente й como mostrei no exemplo(da forma mais simplificada possivel).. Boa sorte
Reply
#6

Valeu rapaziada!

Consegui resolver o problema!
Reply
#7

Quote:
Originally Posted by Skudinhu
Посмотреть сообщение
Valeu rapaziada!

Consegui resolver o problema!
Como resolveu o problema?
Conte-nos oque vocк fez
Reply
#8

Quote:
Originally Posted by zSuYaNw
Посмотреть сообщение
Como resolveu o problema?
Conte-nos oque vocк fez
Foi o que vocк havia dito mesmo, eu tinha alterado o valor de uma #define por engano.
Foi difнcil achar aonde corrigir, mas achei husahu.

Novamente agradeзo pela dica :P
Reply
#9

Quote:
Originally Posted by Skudinhu
Посмотреть сообщение
Foi o que vocк havia dito mesmo, eu tinha alterado o valor de uma #define por engano.
Foi difнcil achar aonde corrigir, mas achei husahu.

Novamente agradeзo pela dica :P
De nada. esse erro da stack/heap size й muito comum em arrays quando o valor й muito alto para caber no bloco da stack.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)