"Invalid memory access" 0.3d
#1

Hy, i just updated my server on 0.3d, re`compile my GM with the new pwno . no warns/errors

and after 4-5 minutes after server start i get this crash :

Quote:

[16:27:46]: --- Crashdetect v3.6.8 loaded
[16:37:34]: Script[gamemodes/eStar.amx]: During execution of OnPlayerCommandText():
[16:37:34]: Script[gamemodes/eStar.amx]: Run time error 5: "Invalid memory access"
[16:37:34]: Additional information:
[16:37:34]: No details available
[16:37:34]: Call stack (most recent call first):
[16:37:34]: The server has crashed due to an unknown error

Thanks.

p.s i`m using linux host (cent os 5)

plugins: crashdetect.so streamer.so sscanf.so
filterscripts: anti-flood antirconhack HospitalInterior me MidoStream R_Speedov2 DropGun savetuningcar eddress countdown
Reply
#2

can you compile amx file with full debug symbols, to get line of code where it crashed?
Reply
#3

I don`t understand what do you want to say...
Reply
#4

Quote:

What is more interesting is to find how this managed to happen... And you can! Just compile that script with symbolic information (pass -d3 flag to the compiler), you will get this:

Quote:

Setting compiler options via pawno\settings.ini doesn't work for some reason, but you can create a file "pawn.cfg" in pawno directory and specify compiler options there, i.e like in this topic:

https://sampforum.blast.hk/showthread.php?tid=249897

Note that you need -d3

Read the second quote. You need to set your compiler to use the -d3 flag, so symbolic information is included with the AMX which will help trace your crashes.
Reply
#5

New crash reasons :

Quote:

[19:28:50]: --- Crashdetect v3.6.8 loaded
[19:29:08]: Script[gamemodes/eStar.amx]: During execution of OnPlayerStateChange():
[19:29:08]: Script[gamemodes/eStar.amx]: Run time error 4: "Array index out of bounds"
[19:29:08]: Additional information:
[19:29:08]: Array max index is 301 but accessing an element at 307
[19:29:08]: Call stack (most recent call first):
[19:29:08]: public OnPlayerStateChange()
[19:29:31]: Script[gamemodes/eStar.amx]: During execution of OnPlayerDeath():
[19:29:31]: Script[gamemodes/eStar.amx]: Run time error 4: "Array index out of bounds"
[19:29:31]: Additional information:
[19:29:31]: Array max index is 499 but accessing an element at 65535
[19:29:31]: Call stack (most recent call first):
[19:29:31]: public OnPlayerDeath()
[19:29:58]: Script[gamemodes/eStar.amx]: During execution of OnPlayerCommandText():
[19:29:58]: Script[gamemodes/eStar.amx]: Run time error 5: "Invalid memory access"
[19:29:58]: Additional information:
[19:29:58]: No details available
[19:29:58]: Call stack (most recent call first):
[19:29:58]: The server has crashed due to an unknown error

Reply
#6

xml file..
Reply
#7

If anyone still might look into this thread, then I just encountered that error on me and I debugged like a hour or so. Cause I had lots of functions which depended on each other nested in each other and so. And I finally catched the reason why it gives that error.
I had one function where I wanted to return string from one of my functions which also returned string from function. So yeah, returning string from function can cause an issue like this. So yeah to fix this, before you return string, you have to get your string which you want to return, formatted in some string variable, and then you have to return the string variable. (It also might be my own incompetent by not knowing maybe it's written in PAWNs refenrece that you can't do that like this but yeah...)

So yeah maybe it helps someone in the future. Im going to copy and paste that case to other topics too related to that error. Maybe it helps some fellow scripters on the path.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)