Skip to content
New issue

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

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

Already on GitHub? # to your account

OnPlayerEnterDynamicArea invalid ids + false calls #149

Closed
djacicd opened this issue Oct 29, 2016 · 9 comments
Closed

OnPlayerEnterDynamicArea invalid ids + false calls #149

djacicd opened this issue Oct 29, 2016 · 9 comments

Comments

@djacicd
Copy link

djacicd commented Oct 29, 2016

It happened few days ago, and today again, just few minutes after i started the server. In ~2 seconds streamer called OnPlayerEnterDynamicArea 33530 times with invalid playerids, and i don't know how many times with right ids. Invalid id's are not the problem, it's my fault that i haven't checked is those id's are valid or not, but false calls for right id's and that amount of spam is an issue.

[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (196216880, 44) from f382.amx
[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (184187972, 1) from f382.amx
[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (94208, 255) from f382.amx
[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (337, 70) from f382.amx
[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (-386193152, 255) from f382.amx
[29.10.2016][11:51:41] [debug] #2 00016f8c in public OnPlayerEnterDynamicArea (184188932, 1) from f382.amx

fulllog.txt

Usage of streamer:

STREAMER_TYPE_AREA: 2232 (11 polygons, 42 cuboids, 1 rectangle and rest are cylinders)
STREAMER_TYPE_OBJECT: 26925
STREAMER_TYPE_PICKUP: 1446
STREAMER_TYPE_CP: 0
STREAMER_TYPE_RACE_CP: 0
STREAMER_TYPE_MAP_ICON: 13
STREAMER_TYPE_3D_TEXT_LABEL: 1862
@samp-incognito
Copy link
Owner

See #141. Your script is causing this.

@djacicd
Copy link
Author

djacicd commented Nov 6, 2016

How can i locate the problem?
I'm not making any explicit calls to OnPlayerEnterDynamicArea.

@samp-incognito
Copy link
Owner

As I said in the other issue:

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.

It could be something else, but that's the most common cause of the problem. There's no easy way of debugging it apart from investigating what functions were running in your script prior to this happening. Start logging everything. Make sure none of your arrays are going out of bounds as well.

@djacicd
Copy link
Author

djacicd commented Nov 6, 2016

Crash detect plugin is not detecting false access to arrays, but i'll try to locate functions which are called prior to this issue. It's happening just after server fresh start (not after gmx).

@djacicd djacicd closed this as completed Nov 6, 2016
@IstuntmanI
Copy link
Contributor

IstuntmanI commented Nov 6, 2016

Things like

new string[ 4 ];
format( string, 128, "sdjadhaldakdla;sdkadsadgdsagdahdahasd" );

could lead to invalid memory access which causes this kind of problems and which aren't detected by crashdetect. Also strcat and other string functions.

@djacicd
Copy link
Author

djacicd commented Nov 8, 2016

@IstuntmanI checked everything.

[08.11.2016][13:00:03] [debug] Server crashed due to an unknown error
[08.11.2016][13:00:03] [debug] Native backtrace:
[08.11.2016][13:00:03] [debug] #0 e7ae1e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[08.11.2016][13:00:03] [debug] #1 e7adabcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[08.11.2016][13:00:03] [debug] #2 e7adbdbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[08.11.2016][13:00:03] [debug] #3 e7adc226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[08.11.2016][13:00:03] [debug] #4 e7ae1adc in ?? () from plugins/crashdetect.so
[08.11.2016][13:00:03] [debug] #5 e7e3e410 in __kernel_rt_sigreturn () from linux-gate.so.1
[08.11.2016][13:00:03] [debug] #6 e7a9b2db in _ZN8Streamer16executeCallbacksEv () from plugins/streamer.so
[08.11.2016][13:00:03] [debug] #7 e7aa38dc in _ZN8Streamer20startAutomaticUpdateEv () from plugins/streamer.so
[08.11.2016][13:00:03] [debug] #8 e7a6c415 in ProcessTick () from plugins/streamer.so
[08.11.2016][13:00:03] [debug] #9 080d1ce2 in ?? () from samp03svr
[08.11.2016][13:00:03] [debug] #10 080aef6c in ?? () from samp03svr
[08.11.2016][13:00:03] [debug] #11 080aa13a in ?? () from samp03svr
[08.11.2016][13:00:03] [debug] #12 e7b1fa63 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[08.11.2016][13:00:03] [debug] #13 0804b4e1 in ?? () from samp03svr

@djacicd djacicd reopened this Nov 8, 2016
@samp-incognito
Copy link
Owner

I can't really do anything with that. You'll need to compile the debug version and run the server in GDB if you want to produce more meaningful output. However, it still just looks like a scripting issue to me.

@djacicd
Copy link
Author

djacicd commented Nov 20, 2016

I was forced to remove streamer zone system for entrances/exits and to create it pawn side, it's not fast as it was with plugin, but at least it works fine, without crashes or other problems (false calls)... I'm still using small amount of streamer zones for other things, and they are working perfectly fine. I don't know what caused previous problems, but not that sure that it was script related... So, unfortunately i'm unable to do further tests..

@samp-incognito
Copy link
Owner

Reopen if you have any new information then.

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

No branches or pull requests

3 participants