Some YSI related AMX errors and issues
#1

So recently I went back to a gamemode I had not worked on in a while and I lost the original includes I used to compile. So I went around and got back whatever I needed to compile it properly. However, I've been getting some odd AMX errors on connect and disconnect that I did not get before.

Also, it seems as if OnPlayerRequestClass is no longer working with y_classes. Class_GoTo is able to bring me to other classes but the built in arrow buttons at the bottom of the screen do not switch to other classes anymore.

I've compiled with the script with YSI set to debug 7 to try and locate what's causing the AMX issues specifically and it seems I have found it but I have no clue if its my problem or what I would need to look for in the script.

OnPlayerConnect error and logs:

Код:
[15:41:53] hook Timers_OnPlayerConnect ended
[15:41:53] Group_OnPlayerConnect: Master 0
[15:41:53] Group_SetPlayer called: 0, 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 4
[15:41:53] _Group_SetPlayer: Loop 0 -1 -1
[15:41:53] _Group_SetPlayer: Add 0 0 1
[15:41:53] _Group_SetPlayer: Add 0 1 2
[15:41:53] _Group_SetPlayer: Add 0 2 4
[15:41:53] _Group_SetPlayer: Add 0 3 8
[15:41:53] _Group_SetPlayer: Add 0 4 16
[15:41:53] _Group_SetPlayer: Add 0 5 32
[15:41:53] _Group_SetPlayer: Add 0 6 64
[15:41:53] _Group_SetPlayer: Add 0 7 128
[15:41:53] _Group_SetPlayer: Add 0 8 256
[15:41:53] _Group_SetPlayer: Add 0 9 512
[15:41:53] _Group_SetPlayer: Add 0 10 1024
[15:41:53] _Group_SetPlayer: Add 0 11 2048
[15:41:53] _Group_SetPlayer: Add 0 12 4096
[15:41:53] _Group_SetPlayer: Add 0 13 8192
[15:41:53] _Group_SetPlayer: Add 0 14 16384
[15:41:53] _Group_SetPlayer: Add 0 15 32768
[15:41:53] _Group_SetPlayer: Add 0 16 65536
[15:41:53] _Group_SetPlayer: Add 0 17 131072
[15:41:53] _Group_SetPlayer: Add 0 18 262144
[15:41:53] _Group_SetPlayer: Add 0 19 524288
[15:41:53] _Group_SetPlayer: Add 0 20 1048576
[15:41:53] _Group_SetPlayer: Add 0 21 2097152
[15:41:53] _Group_SetPlayer: Add 0 22 4194304
[15:41:53] _Group_SetPlayer: Add 0 23 8388608
[15:41:53] _Group_SetPlayer: Add 0 24 16777216
[15:41:53] _Group_SetPlayer: Add 0 25 33554432
[15:41:53] _Group_SetPlayer: Add 0 26 67108864
[15:41:53] _Group_SetPlayer: Add 0 27 134217728
[15:41:53] _Group_SetPlayer: Add 0 28 268435456
[15:41:53] _Group_SetPlayer: Add 0 29 536870912
[15:41:53] _Group_SetPlayer: Add 0 30 1073741824
[15:41:53] _Group_SetPlayer: Add 0 31 --
[15:41:53] _Group_SetPlayer: Loop 1 -1 -1
[15:41:53] _Group_SetPlayer: Add 0 32 1
[15:41:53] _Group_SetPlayer: Add 0 33 2
[15:41:53] _Group_SetPlayer: Add 0 34 4
[15:41:53] _Group_SetPlayer: Add 0 35 8
[15:41:53] _Group_SetPlayer: Add 0 36 16
[15:41:53] _Group_SetPlayer: Add 0 37 32
[15:41:53] _Group_SetPlayer: Add 0 38 64
[15:41:53] _Group_SetPlayer: Add 0 39 128
[15:41:53] _Group_SetPlayer: Add 0 40 256
[15:41:53] _Group_SetPlayer: Add 0 41 512
[15:41:53] _Group_SetPlayer: Add 0 42 1024
[15:41:53] _Group_SetPlayer: Add 0 43 2048
[15:41:53] _Group_SetPlayer: Add 0 44 4096
[15:41:53] _Group_SetPlayer: Add 0 45 8192
[15:41:53] _Group_SetPlayer: Add 0 46 16384
[15:41:53] _Group_SetPlayer: Add 0 47 32768
[15:41:53] _Group_SetPlayer: Add 0 48 65536
[15:41:53] _Group_SetPlayer: Add 0 49 131072
[15:41:53] _Group_SetPlayer: Add 0 50 262144
[15:41:53] [debug] Run time error 4: "Array index out of bounds"
[15:41:53] [debug]  Accessing element at index 50 past array upper bound 49
[15:41:53] [debug] AMX backtrace:
[15:41:53] [debug] #0 000412bc in ?? (0x00000000, 0x002406cc, 0x00000004) from tdm.amx
[15:41:53] [debug] #1 00040cb0 in ?? (0x00000000, 0x002406cc, 0x00000004) from tdm.amx
[15:41:53] [debug] #2 00040b5c in public _Group_FakePlayer@ (0x00000000, 0x002406cc, 0x00000004, 0xffffffff) from tdm.amx
[15:41:53] [debug] #3 native CallRemoteFunction () [080dc8f0] from samp03svr
[15:41:53] [debug] #4 00040a6c in ?? (0x00000000, 0x001401cc, 0x00000004) from tdm.amx
[15:41:53] [debug] #5 0003fb4c in ?? (0x00000000) from tdm.amx
[15:41:53] [debug] #6 00020400 in public SSCANF_OnPlayerConnect (0x00000000) from tdm.amx
[15:41:53] [debug] #7 native CallLocalFunction () [080dce40] from samp03svr
[15:41:53] [debug] #8 0001202c in public FIXES_OnPlayerConnect (0x00000000) from tdm.amx
[15:41:53] [debug] #9 0000ac34 in public OnPlayerConnect (0x00000000) from tdm.amx
[15:41:53] Iter_OnPlayerConnect: 0
[15:41:53] Iter_OnPlayerConnect end
[15:41:53] Callback_Get called: Response:(ЬБ FFFFFFC1
[15:41:53] Callback_Get: 2345256, 522716, 135, 1, FFFFFFC1
[15:41:53] Callback_Get: Getting public Response:(ЬБ format
[15:41:53] 00008701 00008600
OnPlayerDisconnect error and logs:

Код:
[15:42:37] Hooks_OnPlayerDisconnect called: 0, 1
[15:42:37] hook OnPlayerDisconnect called: 0, 1
[15:42:37] YSI_gABITSFunc called: 11110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, -1
[15:42:37] YSI_gABITSFunc called: 01110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 0
[15:42:37] YSI_gABITSFunc called: 00110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 1
[15:42:37] YSI_gABITSFunc called: 00010111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 2
[15:42:37] YSI_gABITSFunc called: 00000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 3
[15:42:37] YSI_gABITSFunc called: 00000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 5
[15:42:37] YSI_gABITSFunc called: 00000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 6
[15:42:37] YSI_gABITSFunc called: 00000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 7
[15:42:37] YSI_gABITSFunc called: 00000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 8
[15:42:37] YSI_gABITSFunc called: 00000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 9
[15:42:37] YSI_gABITSFunc called: 00000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 10
[15:42:37] YSI_gABITSFunc called: 00000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 11
[15:42:37] YSI_gABITSFunc called: 00000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 12
[15:42:37] YSI_gABITSFunc called: 00000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 13
[15:42:37] YSI_gABITSFunc called: 00000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 14
[15:42:37] YSI_gABITSFunc called: 00000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 15
[15:42:37] YSI_gABITSFunc called: 00000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 16
[15:42:37] YSI_gABITSFunc called: 00000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 17
[15:42:37] YSI_gABITSFunc called: 00000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 18
[15:42:37] YSI_gABITSFunc called: 00000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 19
[15:42:37] YSI_gABITSFunc called: 00000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 20
[15:42:37] YSI_gABITSFunc called: 00000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 21
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 22
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 23
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 24
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 25
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 26
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 27
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 28
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 29
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 30
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 31
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 32
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 33
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 34
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 35
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 36
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 37
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 38
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 39
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 40
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 41
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 42
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111110, 43
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111110, 44
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111110, 45
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111110, 46
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111110, 47
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111110, 48
[15:42:37] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111110, 49
[15:42:37] [debug] Run time error 4: "Array index out of bounds"
[15:42:37] [debug]  Accessing element at index 50 past array upper bound 49
[15:42:37] [debug] AMX backtrace:
[15:42:37] [debug] #0 0003f924 in ?? (0x00000000, 0x00000001) from tdm.amx
[15:42:37] [debug] #1 000205d4 in public SSCANF_OnPlayerDisconnect (0x00000000, 0x00000001) from tdm.amx
[15:42:37] [debug] #2 native CallLocalFunction () [080dce40] from samp03svr
[15:42:37] [debug] #3 00012098 in public FIXES_OnPlayerDisconnect (0x00000000, 0x00000001) from tdm.amx
[15:42:37] [debug] #4 0000ad0c in public OnPlayerDisconnect (0x00000000, 0x00000001) from tdm.amx
Obviously it seems like some loops are going to far but I have no clue what I could have done in the script to affect internal ysi loops
Reply
#2

Run time error 4 is caused when an index is out-of-bounds. Let's say, you create an array with size of 50. its valid indexes are 0-49 and any other would cause a run time error 4.

Compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
so you can get more information such as the exact line caused it and update crashdetect plugin to 4.15.1 if you're using an older version.

After done the above, run the server and wait for it to print to server log the new results and post them here.
Reply
#3

The script is compiled in debug mode and I know what run time error 4 is. The issue is the error comes from within the YSI includes and not in the gamemode.
Reply
#4

I was compiling with -d3 but the version of crashdetect running on the server was outdated so I updated it and was able to get more information from it.

All the YSI debug information is the same as before

OnPlayerConnect:

Код:
[17:41:53] [debug] Run time error 4: "Array index out of bounds"
[17:41:53] [debug]  Accessing element at index 50 past array upper bound 49
[17:41:53] [debug] AMX backtrace:
[17:41:53] [debug] #0 000412bc in _Group_SetPlayer (p=0, Bit:g[4]=@002406cc, s=4) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:834
[17:41:53] [debug] #1 00040cb0 in _Group_FakePlayer (p=0, Bit:g[4]=@002406cc, s=4) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:778
[17:41:53] [debug] #2 00040b5c in public _Group_FakePlayer@ (p=0, Bit:g[4]=@002406cc, s=4, __m=-1) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:771
[17:41:53] [debug] #3 native CallRemoteFunction () from samp03svr
[17:41:53] [debug] #4 00040a6c in _Group_FakePlayer_ (p=0, Bit:g[4]=@001401cc, s=4) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:771
[17:41:53] [debug] #5 0003fb4c in ?? (... <1 argument>) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:600
[17:41:53] [debug] #6 00020400 in public SSCANF_OnPlayerConnect (playerid=0) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\..\y_hooks/impl.inc:612
[17:41:53] [debug] #7 native CallLocalFunction () from samp03svr
[17:41:53] [debug] #8 0001202c in public FIXES_OnPlayerConnect (... <1 argument>)  at C:\Users\Sergey\Desktop\development\pawno\include\sscanf2.inc:202
[17:41:53] [debug] #9 0000ac34 in public OnPlayerConnect (playerid=0) at C:\Users\Sergey\Desktop\development\pawno\include\fixes.inc:3836
OnPlayerDisconnect:

Код:
[17:42:09] [debug] Run time error 4: "Array index out of bounds"
[17:42:09] [debug]  Accessing element at index 50 past array upper bound 49
[17:42:09] [debug] AMX backtrace:
[17:42:09] [debug] #0 0003f924 in ?? (... <2 arguments>) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_grouponce.inc:561
[17:42:09] [debug] #1 000205d4 in public SSCANF_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\..\y_hooks/impl.inc:655
[17:42:09] [debug] #2 native CallLocalFunction () from samp03svr
[17:42:09] [debug] #3 00012098 in public FIXES_OnPlayerDisconnect (... <2 arguments>)  at C:\Users\Sergey\Desktop\development\pawno\include\sscanf2.inc:223
[17:42:09] [debug] #4 0000ad0c in public OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Sergey\Desktop\development\pawno\include\fixes.inc:3870
I'm also getting this warning when compiling. Not sure if it is relevant somehow:

Код:
C:\Users\Sergey\Desktop\development\pawno\include\YSI\internal\y_groupsecond.inc(389) : warning 213: tag mismatch
Reply
#5

YSI 3.1!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)