SA-MP Forums Archive
AMXBacktrace: Array index out of bounds. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AMXBacktrace: Array index out of bounds. (/showthread.php?tid=606568)



AMXBacktrace: Array index out of bounds. - SetPlayerNameTag - 06.05.2016

Well.. My friend gave me a script then I set up everything (MySQL etc..), when I join the server everything seems good but I enter a store, and go active the checkpoint for view buy list ok dialog does not showing and I got these from crashdetect, When I typed /help, dialog will be showing but If I choose any items nothing happens. It's weird because a part of dialogs are looks dead but others are working good. I'm confusing so any help from you guys?

(I'm not sure which is linking to OnPlayerEnterCheckpoint so I copied all here)

Код:
[08:33:37] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:37] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709828
[08:33:37] [debug] AMX backtrace:
[08:33:37] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:46] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:46] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709808
[08:33:46] [debug] AMX backtrace:
[08:33:46] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:48] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:48] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709810
[08:33:48] [debug] AMX backtrace:
[08:33:48] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:51] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:51] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709828
[08:33:51] [debug] AMX backtrace:
[08:33:51] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:53] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:53] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709820
[08:33:53] [debug] AMX backtrace:
[08:33:53] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:55] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:55] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD70982C
[08:33:55] [debug] AMX backtrace:
[08:33:55] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:33:58] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:33:58] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709834
[08:33:58] [debug] AMX backtrace:
[08:33:58] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:34:00] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:34:00] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709828
[08:34:00] [debug] AMX backtrace:
[08:34:00] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:34:03] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:34:03] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709830
[08:34:03] [debug] AMX backtrace:
[08:34:03] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:34:06] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:34:06] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709834
[08:34:06] [debug] AMX backtrace:
[08:34:06] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:34:08] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[08:34:08] [debug]  Stack pointer (STK) is 0xD708820, heap pointer (HEA) is 0xD709854
[08:34:08] [debug] AMX backtrace:
[08:34:08] [debug] #0 00000000 in public OnDialogResponse () from Compile.amx
[08:39:38] [debug] Run time error 4: "Array index out of bounds"
[08:39:38] [debug]  Accessing element at index 106 past array upper bound 105
[08:39:38] [debug] AMX backtrace:
[08:39:38] [debug] #0 000b1fa4 in ?? (400) from Compile.amx
[08:39:38] [debug] #1 002961c4 in public OnPlayerEnterCheckpoint (5) from Compile.amx
OnDialogResponse: http://pastebin.com/0HJYLd7a


Re: AMXBacktrace: Array index out of bounds. - Micko123 - 06.05.2016

Why don't you upload dialogs to pastebin.com and send link here. Because it is hard from this


Re: AMXBacktrace: Array index out of bounds. - SetPlayerNameTag - 06.05.2016

Quote:
Originally Posted by Micko123
Посмотреть сообщение
Why don't you upload dialogs to pastebin.com and send link here. Because it is hard from this
http://pastebin.com/0HJYLd7a


Re: AMXBacktrace: Array index out of bounds. - Konstantinos - 06.05.2016

You ran out of local memory. From a fast looking, I saw these:
pawn Код:
str[4848]
dialogMsg[5000]
and a couple of 2048. You must reduce those and it's recommended to declare big local strings with "static" instead of "new".

As for OnPlayerEnterCheckpoint callback, a function that was called in it with 1 parameter and its value of 400 caused the run time error 4. If there isn't much of code to it post it otherwise compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
and get the line and more information.