IS4Code / YSF

YSF Server Functions
Other
98 stars 34 forks source link

Invalid seat crash (OnPlayerStateChange) #104

Closed AbyssMorgan closed 3 years ago

AbyssMorgan commented 4 years ago

If player have invalid vehicle model with 4 seats when original is 2 seats YSF crash server when player enter on invalid seat.

n0bodysec commented 4 years ago

But this isn't related to YSF itself.

IS4Code commented 4 years ago

I also think that. I may be mistaken, but there aren't any vehicle-specific data used by YSF that would facilitate this crash.

n0bodysec commented 4 years ago

It's a old known bug (and it's also fixed on fixes.inc). Anyway, YSF expands to "Y_Less' Server Fixes" so it can be fixed with YSF ofc.

IS4Code commented 4 years ago

@n0bodysec Well, it was originally Y_Less' Server Functions, but of course YSF contains some other fixes, so unless a fix would break some other code, I am not against it.

n0bodysec commented 4 years ago

Oops, my mistake.

AbyssMorgan commented 4 years ago

But after i removed YSF everything is ok...

n0bodysec commented 4 years ago

Can u provide a backtrace?

AbyssMorgan commented 4 years ago

Server crashed due to an unknown error Native backtrace:

0 f739f8b6 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so

1 f7397120 in _ZN18CrashDetectHandler20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so

2 f7397886 in _ZN18CrashDetectHandler20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so

3 f7397f96 in _ZN18CrashDetectHandler7OnCrashERKN2os7ContextE () in plugins/crashdetect.so

4 f739ef82 in ?? () in plugins/crashdetect.so

5 f77a1bd0 in ?? ()

6 f77a1be9 in ?? ()

7 f73f2ea9 in gsignal () in /lib/i386-linux-gnu/libc.so.6

8 f73f4407 in abort () in /lib/i386-linux-gnu/libc.so.6

9 f742e37c in ?? () in /lib/i386-linux-gnu/libc.so.6

10 f74342f7 in ?? () in /lib/i386-linux-gnu/libc.so.6

11 f74367cc in ?? () in /lib/i386-linux-gnu/libc.so.6

12 f7437fc5 in __libc_malloc () in /lib/i386-linux-gnu/libc.so.6

13 0806d12e in ?? () in ./samp03svr

14 0807619d in ?? () in ./samp03svr

15 080763fe in ?? () in ./samp03svr

16 f776d295 in ?? () in /lib/i386-linux-gnu/libpthread.so.0

17 f74ae0ae in clone () in /lib/i386-linux-gnu/libc.so.6

Registers: EAX: 00000000 EBX: 00007573 ECX: 00007628 EDX: 00000006 ESI: f7579000 EDI: f514ac04 EBP: f514ae08 ESP: f514ab48 EIP: f77a1be9 EFLAGS: 00000206 Stack: ESP+00000000: f514ae08 00000006 00007628 f73f2ea9 ESP+00000020: 00000000 20202020 20202020 20202020 ESP+00000040: 00000000 00000000 00000000 00000000 ESP+00000060: 00000000 00000000 00000000 00000000 ESP+00000080: 00000000 00000000 00000000 00000000 ESP+000000a0: 00000000 00000000 00000000 00000000 ESP+000000c0: 20202020 20202020 20202020 20202020 ESP+000000e0: 2f756e67 322d646c 2e33322e 660a6f73 ESP+00000100: 2d2d7220 30302070 30323230 66203030 ESP+00000120: 20202020 20202020 20202020 20202020 ESP+00000140: f73de880 00000007 f73f42b7 00000007 ESP+00000160: ffe50ab9 0000000b f7526e64 00000003 ESP+00000180: f514ae47 00000008 f7526e6f 00000005 ESP+000001a0: dfe662f7 8eb2dcb2 f7526e6f 00000005 ESP+000001c0: f0e10da8 00000000 f514ae47 00000008 ESP+000001e0: f514ad58 0807db7c f7526e69 00000004 ESP+00000200: f0e12de8 00000000 f752722c 00000022 ESP+00000220: f514ad88 0804d3fb f7526e64 00000003 ESP+00000240: f514add8 0804d4eb ffe50ab9 0000000b ESP+00000260: f73f50f9 f7579000 f7526e54 0000000e ESP+00000280: 00000902 f742e140 22ff1b49 22ff1b59 ESP+000002a0: f778c000 0000004f 00000000 f765ed76 ESP+000002c0: f0e00010 f74342f7 00000002 f7526e54 ESP+000002e0: 00000010 00000000 f514ae40 00000010 ESP+00000300: 30306530 00383236 f0e00620 f0e00620 ESP+00000320: f514aea8 0807d0ef 081a3760 00000020 ESP+00000340: 00001120 00000015 22ff1b49 f0e17b30 ESP+00000360: f514af08 0808013d 22ff1b49 22ff1c03 ESP+00000380: f7436079 f0e00010 f7579000 00000015 ESP+000003a0: f0e005e8 0806d12e 00000015 f0e0abd0 ESP+000003c0: f514b358 0807619d 00000019 f0e005e8 ESP+000003e0: 00000000 22d9e599 00000000 00000001 Loaded modules: 00000000 - 00187f43 samp03svr f77a1000 - f77a1d3b f7784000 - f7786a04 /lib/i386-linux-gnu/libdl.so.2 f7767000 - f77826ef /lib/i386-linux-gnu/libpthread.so.0 f75f0000 - f7770b4b /usr/lib/i386-linux-gnu/libstdc++.so.6 f759b000 - f75ef010 /lib/i386-linux-gnu/libm.so.6 f757e000 - f759a1e4 /lib/i386-linux-gnu/libgcc_s.so.1 f73c7000 - f7583b6b /lib/i386-linux-gnu/libc.so.6 f77a2000 - f77c59c4 /lib/ld-linux.so.2 f7380000 - f73c43ac plugins/crashdetect.so f731b000 - f737fe6e plugins/regex.so f778d000 - f779c40c plugins/sscanf.so f722a000 - f731b803 plugins/YSF.so f7164000 - f7229740 plugins/streamer.so f7147000 - f714e714 /lib/i386-linux-gnu/librt.so.1 f703a000 - f714879b plugins/ColAndreas_static.so f622e000 - f644c8c1 plugins/FCNPC.so f5bac000 - f622d95f plugins/RouteConnector.so f69ee000 - f6a28686 /usr/lib/i386-linux-gnu/libtbb.so.2 f5b80000 - f5bab754 /usr/lib/i386-linux-gnu/libtbbmalloc.so.2 f516c000 - f517d2ec /lib/i386-linux-gnu/libnss_files.so.2 f5165000 - f5169a38 /lib/i386-linux-gnu/libnss_dns.so.2 f514c000 - f5163494 /lib/i386-linux-gnu/libresolv.so.2

SAMP Server: 0.3.7-R2

plugins crashdetect.so regex.so sscanf.so YSF.so streamer.so ColAndreas_static.so FCNPC.so RouteConnector.so

Invalid mod: https://cdn.discordapp.com/attachments/628223789607682068/634952172567527444/cars.zip

AbyssMorgan commented 4 years ago

Useful i think:

new const EVF::VehicleSeats[MAX_VEHICLE_MODELS] = {
    4,2,2,2,4,4,1,2,2,4,2,2,2,4,2,2,4,2,4,2,4,4,2,2,2,1,4,4,4,2,1,7,1,2,2,0,2,7,4,2,4,1,2,2,2,4,1,2,1,0,0,2,1,1,1,2,2,2,4,4,
    2,2,2,2,1,1,4,4,2,2,4,2,1,1,2,2,1,2,2,4,2,1,4,3,1,1,1,4,2,2,4,2,4,1,2,2,2,4,4,2,2,1,2,2,2,2,2,4,2,1,1,2,1,1,2,2,4,2,2,1,
    1,2,2,2,2,2,2,2,2,4,1,1,1,2,2,2,2,7,7,1,4,2,2,2,2,2,4,4,2,2,4,4,2,1,2,2,2,2,2,2,4,4,2,2,1,2,4,4,1,0,0,1,1,2,1,2,2,1,2,4,
    4,2,4,1,0,4,2,2,2,2,0,0,7,2,2,1,4,4,4,2,2,2,2,2,4,2,0,0,0,4,0,0
};
n0bodysec commented 4 years ago

I cannot reproduce this issue.

IS4Code commented 3 years ago

Closed due to no further input.