Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamer sending false OnPlayerEnterDynamicArea calls #141

Closed
iD0N opened this issue Sep 13, 2016 · 7 comments
Closed

Streamer sending false OnPlayerEnterDynamicArea calls #141

iD0N opened this issue Sep 13, 2016 · 7 comments

Comments

@iD0N
Copy link

iD0N commented Sep 13, 2016

Hey there, there's been a weird flood of false calls on streamer areas since I added a recent system to my gamemode, resulting in my server crashing and receiving these errors:

[17:35:32] [debug] Run time error 4: "Array index out of bounds"
[17:35:32] [debug] Accessing element at index 67698713 past array upper bound 49
[17:35:32] [debug] AMX backtrace:
[17:35:32] [debug] #0 0023e08c in public sd_OPEDA (playerid=67698713, areaid=10) at modules/jobs.pwn:166
[17:35:32] [debug] #1 0015c5a4 in public OnPlayerEnterDynamicArea (playerid=67698713, areaid=10) at modules/sd.pwn:53
[17:35:33] [debug] Server crashed due to an unknown error
[17:35:33] [debug] Native backtrace:
[17:35:33] [debug] #0 60e7bec4 in ?? () from plugins\streamer.dll
[17:35:33] [debug] #1 60e7b382 in ?? () from plugins\streamer.dll
[17:35:33] [debug] #2 00469a66 in ?? () from samp-server.exe
[17:35:33] [debug] #3 0048d4db in ?? () from samp-server.exe
[17:35:33] [debug] #4 0049b4a1 in ?? () from samp-server.exe
[17:35:33] [debug] #5 0049b4b1 in ?? () from samp-server.exe

There seems to be nothing wrong with the code since it begins the calls with a false one (the original OPEDA) so the data isn't tampered with thru calls.
Even tho I don't think this is originated from my code, I can provide them if needed.
Also to be noted when I say spam I mean it's not only 1 crash with 1 false call, here are a few

OnPlayerEnterDynamicArea (playerid=7880328, areaid=7880280)
OnPlayerEnterDynamicArea (playerid=7800264, areaid=7892792)
OnPlayerEnterDynamicArea (playerid=7912552, areaid=7893272)
OnPlayerEnterDynamicArea (playerid=1092616192, areaid=-1)

@IstuntmanI
Copy link
Contributor

IstuntmanI commented Sep 13, 2016

It is a problem from your script. Players can't call this callback by themselves. You are probably directly calling that callback somehow or you made other mistakes, or it is some memory corruption. I use this streamer a lot for areas and I have no problems.

@iD0N
Copy link
Author

iD0N commented Sep 13, 2016

Find in Files feature of sublime shows me there are only 3 OPEDA's in my code right now ( currently only 3 are included as I only need those)
All of them are publics properly hooked, all of them only using playerid as index, none of them change it.
I've used the area system many times, I do have pretty much an area for each player, house, vehicle and business and haven't had a problem with this system.
Whats hard to understand for me is how different this last system I added is to the others, I pretty much use the very same system and I have no idea where I should start debugging to find the problem.

@samp-incognito
Copy link
Owner

The plugin isn't doing this. You probably just have an array going out of bounds somewhere in your script that's corrupting the stack.

@Ryder17z
Copy link

See the first two lines of your own log. That's a fault of your script

@JernejL
Copy link

JernejL commented Sep 14, 2016

Looks like a bug in your script, i have been using and relying on this extensively and had no issues whatsoever.

Sadly i have no idea what is at address 00469a66 , if you can provide this crash report on linux server i can look up function address on what called it.

as for playerid=67698713, a workaround could be made, a simple isplayerconnected on playerid would do for start.

@iD0N
Copy link
Author

iD0N commented Sep 14, 2016

The plugin isn't doing this. You probably just have an array going out of bounds somewhere in your script that's corrupting the stack.

Wouldn't that call the crashdetect plugin itself? because thats all the errors I get. It's weird I've written many systems with areas and they worked quite well, I guess I'll have to re-write the system because I can't for the life of me figure out what is going wrong (fortunately I at least know which system is causing it)

@JernejL thanks for your help, but sadly I don't have an access to a linux system atm, only testing them on my localhost.

Also having problem closing the server lately, it crashes right when it reaches streamer, any idea what might cause it? or even if it's related to streamer or my next plugin in the list?

[03:26:12] ===============================

[03:26:12] sscanf plugin unloaded.

[03:26:12] ===============================

[03:26:12] plugin.mysql: Unloading plugin...
[03:26:12] plugin.mysql: Plugin unloaded.
[03:26:12]
[03:26:12] ====================
[03:26:12]
[03:26:12] Whirlpool unloaded
[03:26:12]
[03:26:12] ====================
[03:26:12]
[03:26:12]

*** Streamer Plugin v2.8.2 by Incognito unloaded ***

@Southclaws
Copy link
Contributor

AMX and Plugins don't share the same memory so an out-of-bounds error in Pawn won't directly affect a plugin and crash it in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants