Invalid memory access
#1

Good evening.

Does somebody know how to fix this annoying run time error? The server crashes twice a day because of this.

Код:
[17:40:53] Incoming connection: *IP*
[17:40:53] [join] *nick* has joined the server (*IP*)
[17:40:53] Script[gamemodes/MyGameMode.amx]: During execution of Itter_OnPlayerConnect():
[17:40:53] Script[gamemodes/MyGameMode.amx]: Run time error 5: "Invalid memory access"
[17:40:53] Error information:
[17:40:53]   No details available
[17:40:53] Call stack (most recent call first):
[17:40:53]   0x0002EEA0 => native CallLocalFunction() from ...
[17:40:53] The server has crashed executing 'gamemodes/MyGameMode.amx'
[17:40:53] Call stack (most recent call first):
[17:40:53]   0x0002EEA0 => native CallLocalFunction() from ...
Reply
#2

Strange, I have had this problem before
but could not fix it.. sorry, I don't know.
Reply
#3

Quote:
Originally Posted by Jay.
Посмотреть сообщение
Strange, I have had this problem before
but could not fix it.. sorry, I don't know.


It seems as if nobody knows how to fix this
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=300665 <==== this might help you, debug the code if neccessary
Reply
#5

Quote:
Originally Posted by Xtreme_playa
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=300665 <==== this might help you, debug the code if neccessary
Well thats wasnt really solved there... how to debug? :S
Reply
#6

(1)http://www.******.com/url?sa=t&rct=j...JjsT4dnOn6bDug
(2)http://www.******.com/url?sa=t&rct=j...hsHMExVQ1rdvBg
(3)[OPTIONAL]https://sampforum.blast.hk/showthread.php?tid=2751
Reply
#7

Thanks, I added the debug messages.

That didn't help me though, the server still crashes twice a day.

In the OnPlayerConnect callback every debug message was shown in the server log, so everything works fine in OnPlayerConnect, but the server still crashes. >.<
Reply
#8

Quote:
Originally Posted by Julian12345
Посмотреть сообщение
Thanks, I added the debug messages.

That didn't help me though, the server still crashes twice a day.

In the OnPlayerConnect callback every debug message was shown in the server log, so everything works fine in OnPlayerConnect, but the server still crashes. >.<
It's probably something with your GM, I can't be too sure.
Reply
#9

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. Maybe it helps some fellow scripters on the path.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)