Zeex / samp-plugin-crashdetect

Crash/error reporting plugin for SA-MP server
http://forum.sa-mp.com/showthread.php?t=262796
BSD 2-Clause "Simplified" License
116 stars 23 forks source link

crashdetect reports incorrect location of error with open.mp latest release #130

Closed BeckzyBoi closed 5 months ago

BeckzyBoi commented 7 months ago

I've had a couple of "array index out out of bounds" errors in my gamemode later (one under OnPlayerCommandText, and one in a timer), and when using the latest release of open.mp (v1.2.0.2670), and compiling with -d3, crashdetect is reporting the error as being at the last line of the first filterscript I have loaded.

E.g: [19:53:47] Run time error 4: "Array index out of bounds" [19:53:47] Attempted to read/write array element at negative index -400 [19:53:47] AMX backtrace: [19:53:47] #0 00b7f46c in public tdTimeDown (2) at C:\Users\beckzy\Documents\open.mp-server\filterscripts\4dpalms.pwn:30

This error is (was - I've managed to locate and fix it myself) in a timer in my gamemode. 4dpalms is the first filterscript loaded on my server, and line 30 is the final line of that filterscript. So why is crashdetect saying this? It worked fine on the previous release of open.mp (v1.1.0.2612). If it's helpful, it appears to have started happening during a open.mp nightly build at commit "new way of handling ParamCast errors instead of throwing exceptions".

Can this be fixed? I managed to identify and fix where the error was in my timer, but not the OnPlayerCommandText one (due to the large amount of code under that callback it's practically impossible for me to locate with the both the current version of open.mp + crashdetect together).

BeckzyBoi commented 5 months ago

The open.mp update that caused this has been reverted. Issue closed.