ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
131 stars 30 forks source link

FCNPC_Destroy crashes my server everytime. #154

Closed r1ght00 closed 3 months ago

r1ght00 commented 6 years ago
=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 100007e from f25344a0

Backtrace:
  #0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerCallbackEiP9siginfo_tPv+0xdc) [0xf2526c9c]
  #1 in [0xf7f09cc0]
  #2 in plugins/FCNPC.so(_ZN7CServer17GetVehicleSeatPosEP8CVehicleh+0x20) [0xf25344a0]
  #3 in plugins/FCNPC.so(_ZN11CPlayerData7ProcessEv+0x7e7) [0xf2530dd7]
  #4 in plugins/FCNPC.so(_ZN14CPlayerManager7ProcessEv+0x42) [0xf2531a92]
  #5 in plugins/FCNPC.so(_ZN7CServer7ProcessEv+0x4f) [0xf253405f]
  #6 in plugins/FCNPC.so(ProcessTick+0x24) [0xf2535604]
  #7 in /root/ionic/samp03svr() [0x80d1ce2]
  #8 in /root/ionic/samp03svr() [0x80aef6c]
  #9 in /root/ionic/samp03svr() [0x80aa13a]

Information:
  System: GNU/Linux
  SA-MP: 0.3.7 R2
  FCNPC: 1.8.2

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x80d0a90
  FUNC_CPlayer__Kill: 0x80cb220
  FUNC_CPlayer__EnterVehicle: 0x80cc1c0
  FUNC_CPlayer__ExitVehicle: 0x80cc340
  FUNC_CPlayer__SpawnForWorld: 0x80ccfc0
  FUNC_GetVehicleModelInfo: 0x80d5d30
  FUNC_CConsole__GetIntVariable: 0x80a0070
  FUNC_ClientJoin_RPC: 0x80b0030

Pointers:
  VAR_ServerAuthentication: 0x81aa8a8
  VAR_NetVersion: 0xfd9

Offsets:
  OFFSET_RemoteSystemManager: 0x334
  OFFSET_RemoteSystemSize: 0xc69
  OFFSET_RemoteSystem__ConnectMode: 0xc62
  OFFSET_RemoteSystem__Unknown: 0xc67
=========================== FCNPC Exception Handler ============================

Pretty sure it's because FCNPC_Destroy because everytime I used this function,it crashed. I tested myself with my job system which includes NPC and it destroy the NPC everytime they arrive at their location.

hook FCNPC_OnReachDest(npcid)
{
    foreach(new i : OjekPassengers)
    {
        if(OjekPassenger[i] == npcid)
        {
            FCNPC_Destroy(OjekPassenger[i]);
            Iter_SafeRemove(OjekPassengers, i, i);
            OjekPassenger[i] = -1;
            Log(log_callbacks, DEBUG, "Ojek onreachdest %d", i);
            return -2;
        }
    }
    return 1;
}

Server Version:0.3.7 R2-1 FCNPC Version: 1.8.2,compiled by myself.

ziggi commented 6 years ago

Where are you calls FCNPC_OnReachDest?

r1ght00 commented 6 years ago

There's no FCNPC_OnReachDest other than that except from my taxi job which should do the same. I could give you my job system if you need. FCNPC_OnReachDest is the same as FCNPC_OnReachDestination

r1ght00 commented 6 years ago

Bump @ziggi

NegativeIQ commented 6 years ago

Can you load CrashDetect plugin to provide more info? (Load it before any other plugin just to be safe)

r1ght00 commented 6 years ago

plugins crashdetect.so pawnraknet.so YSF.so SKY.so mysql.so sscanf.so streamer.so irc.so ctime.so DriftPointsCounter.so ColAndreas_static.so FCNPC.so log-plugin.so pawn-memory.so latest crash log from fcnpc log:

=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 267c1791 from 814b7d9

Backtrace:
  #0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerCallbackEiP9siginfo_tPv+0xdc) [0xf250d17c]
  #1 in [0xf7ef9cc0]
  #2 in /root/ionic/samp03svr() [0x814b7d9]
  #3 in /root/ionic/samp03svr() [0x814cd5f]
  #4 in /root/ionic/samp03svr() [0x80af078]
  #5 in /root/ionic/samp03svr() [0x80aa13a]
  #6 in /lib32/libc.so.6(__libc_start_main+0xf6) [0xf7aa6986]
  #7 in /root/ionic/samp03svr() [0x804b4e1]

Information:
  System: GNU/Linux
  SA-MP: 0.3.7 R2
  FCNPC: 1.8.0

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x80d0a90
  FUNC_CPlayer__Kill: 0x80cb220
  FUNC_CPlayer__EnterVehicle: 0x80cc1c0
  FUNC_CPlayer__ExitVehicle: 0x80cc340
  FUNC_CPlayer__SpawnForWorld: 0x80ccfc0
  FUNC_GetVehicleModelInfo: 0x80d5d30
  FUNC_CConsole__GetIntVariable: 0x80a0070
  FUNC_ClientJoin_RPC: 0x80b0030

Pointers:
  VAR_ServerAuthentication: 0x81aa8a8
  VAR_NetVersion: 0xfd9

Offsets:
  OFFSET_RemoteSystemManager: 0x334
  OFFSET_RemoteSystemSize: 0xc69
  OFFSET_RemoteSystem__ConnectMode: 0xc62
  OFFSET_RemoteSystem__Unknown: 0xc67
=========================== FCNPC Exception Handler ============================

There isn't anything in server_log.txt..

ziggi commented 6 years ago

Too much memory hack plugins, I'm not sure, that the causes of this crashes is in FCNPC. Anyway, I have no idea what is the reasons of these crashes.

NegativeIQ commented 6 years ago

Well that second fcnpc log tells us even less then the first one. And like ziggi said, you have to many memory hacking plugins plus there is possibility of GDK conflicts (as in static/dynamic linking) - But i think its very unlikely.

I have no idea what might cause that segmentation but it could be that Iter_SafeRemove since people have complained about it in the past. So i guess you could try commenting it or even avoiding foreach just for test.

ziggi commented 5 years ago

Check with FCNPC 2.0.0 please

r1ght00 commented 5 years ago

Is there any reason why it always failed to load? no matter what version it is(DL or not).

SA-MP Dedicated Server
----------------------
v0.3.DL-R1, (C)2005-2018 SA-MP Team

[16:26:48] 
[16:26:48] Server Plugins
[16:26:48] --------------
[16:26:48]  Loading plugin: crashdetect
[16:26:48]   CrashDetect plugin 4.19
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: pawnraknet
[16:26:48] Pawn.RakNet plugin v1.2.0 by urShadow loaded
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: YSF_DL
[16:26:48] 
[16:26:48]  ===============================
[16:26:48]         YSF - kurta999's version R20-RC4 loaded
[16:26:48]    (c) 2008 Alex "Y_Less" Cole - (c) 2010 - 2016 kurta999
[16:26:48]     Server version: 0.3.DL R1
[16:26:48]     Operating System: Windows
[16:26:48]     Built on: Dec 20 2018 at 16:59:25
[16:26:48]  ===============================
[16:26:48] 
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: SKY
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: mysql
[16:26:48]  >> plugin.mysql: R41-4 successfully loaded.
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: sscanf
[16:26:48] 

[16:26:48]  ===============================

[16:26:48]       sscanf plugin loaded.     

[16:26:48]          Version:  2.8.3        

[16:26:48]   (c) 2018 Alex "Y_Less" Cole  

[16:26:48]  ===============================

[16:26:48]   Loaded.
[16:26:48]  Loading plugin: streamer
[16:26:48] 

*** Streamer Plugin v2.9.3 by Incognito loaded ***

[16:26:48]   Loaded.
[16:26:48]  Loading plugin: irc
[16:26:48] 

*** IRC Plugin v1.4.8 by Incognito loaded ***

[16:26:48]   Loaded.
[16:26:48]  Loading plugin: chrono
[16:26:48]   Loaded.
[16:26:48]  Loading plugin: colandreas
[16:26:48] *********************
[16:26:48] ** Created By:     **
[16:26:48] ** [uL]Chris42O    **
[16:26:48] ** [uL]Slice       **
[16:26:48] ** [uL]Pottus      **
[16:26:48] *********************
[16:26:55] Loaded collision data.
[16:26:55] *********************
[16:26:55]   ColAndreas Loaded
[16:26:55]    v1.4.0
[16:26:55] *********************
[16:26:55]   Loaded.
[16:26:55]  Loading plugin: log-plugin
[16:26:55]  >> plugin.log: v0.4 successfully loaded.
[16:26:55]   Loaded.
[16:26:55]  Loading plugin: pawn-memory
[16:26:55] ========================
[16:26:55] = Memory access plugin =
[16:26:55] =       Made by BigETI =
[16:26:55] = Loaded!              =
[16:26:55] ========================
[16:26:55]   Loaded.
[16:26:55]  Loading plugin: FCNPC-DL
[16:26:55]   Failed.
[16:26:55]  Loaded 12 plugins.

[16:26:55] 
[16:26:55] Filterscripts
[16:26:55] ---------------
[16:26:55]   Loading filterscript 'SAOI_FileManager.amx'...
[16:26:55]   Unable to load filterscript 'SAOI_FileManager.amx'.
[16:26:55]   Loaded 0 filterscripts.

[16:26:55] [debug] Run time error 19: "File or function is not found"
[16:26:55] [debug]  FCNPC_GetPluginVersion
[16:26:55] [debug]  FCNPC_IsValid
[16:26:55] [debug]  FCNPC_GetPosition
[16:26:55] [debug]  FCNPC_StartPlayingPlayback
[16:26:55] [debug]  FCNPC_Create
[16:26:55] [debug]  FCNPC_Spawn
[16:26:55] [debug]  FCNPC_PutInVehicle
[16:26:55] [debug]  FCNPC_Destroy
[16:26:55] [debug]  FCNPC_SetAngle
[16:26:55] [debug]  FCNPC_GetAngle
[16:26:55] [debug]  FCNPC_EnterVehicle
[16:26:55] [debug]  FCNPC_ExitVehicle
[16:26:55] [debug]  FCNPC_GoTo
[16:26:55] [debug] Run time error 19: "File or function is not found"
[16:26:55] [debug]  FCNPC_GetPluginVersion
[16:26:55] [debug]  FCNPC_IsValid
[16:26:55] [debug]  FCNPC_GetPosition
[16:26:55] [debug]  FCNPC_StartPlayingPlayback
[16:26:55] [debug]  FCNPC_Create
[16:26:55] [debug]  FCNPC_Spawn
[16:26:55] [debug]  FCNPC_PutInVehicle
[16:26:55] [debug]  FCNPC_Destroy
[16:26:55] [debug]  FCNPC_SetAngle
[16:26:55] [debug]  FCNPC_GetAngle
[16:26:55] [debug]  FCNPC_EnterVehicle
[16:26:55] [debug]  FCNPC_ExitVehicle
[16:26:55] [debug]  FCNPC_GoTo
[16:26:55] Script[gamemodes/main.amx]: Run time error 19: "File or function is not found"
[16:26:55] Number of vehicle models: 0

I have tried to switch the position of plugins,it still the same. no error pop-up at all or anything

r1ght00 commented 5 years ago

The rc2 loaded properly,while the rc3 are not. what is the reason? @ziggi

ziggi commented 5 years ago

@r1ght00 I got some issues with building for older version of VC runtime. So, now I make builds with vc2015 and everything looks like it is working good. Anyway, did the crash disappear with 2.0.0? Can you check with latest RC?

r1ght00 commented 5 years ago

@ziggi I haven't received the same error since the FCNPC_Spawn always crashed my server https://forum.sa-mp.com/showthread.php?t=662213 , I made a thread about it.

ziggi commented 5 years ago

First of all, since I got banned on the forum, it would be better to report about bugs here.

Check with the latest RC and show me fcnpc-crashlog file.

r1ght00 commented 5 years ago

There's no fcnpc-crashlog file.

EDIT:There you go,I tested it with citizen fs in FCNPC files. @ziggi

=========================== FCNPC Exception Handler ============================
Address: 0x586edf69

Registers:
EAX: 0x0 - EBX: 0x2555544 - ECX: 0x116d12d0 - EDX: 0x586d6712
ESI: 0xb2 - EDI: 0x116d12d0 - EBP: 0x19faf0 - ESP: 0x19faec

Stack:
0x0: 0xb2 - 0x4: 0x19fc30 - 0x8: 0x586fd278 - 0xC: 0xb2 - 0x10: 0xc33d88ee - 0x14: 0xb2
0x18: 0x116d12d0 - 0x1C: 0x2 - 0x20: 0x7fffffff

Information:
  System: Windows
  SA-MP: 0.3.DL R1
  FCNPC: 2.0.0

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x466550
  FUNC_CPlayer__Kill: 0x485020
  FUNC_CPlayer__EnterVehicle: 0x485670
  FUNC_CPlayer__ExitVehicle: 0x485790
  FUNC_CPlayer__SpawnForWorld: 0x487730
  FUNC_GetVehicleModelInfo: 0x4892a0
  FUNC_CConsole__GetIntVariable: 0x490c80
  FUNC_ClientJoin_RPC: 0x497ef0

Pointers:
  VAR_ServerAuthentication: 0x4fc470
  VAR_NetVersion: 0xfde

Offsets:
  OFFSET_RemoteSystemManager: 0x33c
  OFFSET_RemoteSystemSize: 0xcb8
  OFFSET_RemoteSystem__ConnectMode: 0xcb0
  OFFSET_RemoteSystem__Unknown: 0xcb5

Callbacks:
  FUNC_CGameMode__OnPlayerGiveDamage: 0x46f050
  FUNC_CGameMode__OnPlayerTakeDamage: 0x46efd0
  FUNC_CGameMode__OnPlayerWeaponShot: 0x46f640
  FUNC_CGameMode__OnPlayerStreamIn: 0x46ebc0
  FUNC_CGameMode__OnPlayerStreamOut: 0x46ec30
  FUNC_CGameMode__OnGameModeExit: 0x46da90
=========================== FCNPC Exception Handler ============================
[23:47:16] [npc:join] Masinis_01 has joined the server (49:127.0.0.1)
[23:47:19] [debug] Server crashed while executing main.amx
[23:47:19] [debug] AMX backtrace:
[23:47:19] [debug] #0 native FCNPC_Spawn () from FCNPC-DL.DLL
[23:47:19] [debug] #1 001c896c in public NPC_Connect () at npc.pwn:115
[23:47:20] [debug] Native backtrace:
[23:47:20] [debug] #0 5890df69 in ?? () from plugins\FCNPC-DL.DLL
[23:47:20] [debug] #1 5891d278 in ?? () from plugins\FCNPC-DL.DLL
[23:47:20] [debug] #2 5891e051 in ?? () from plugins\FCNPC-DL.DLL
[23:47:20] [debug] #3 5893debe in ?? () from plugins\FCNPC-DL.DLL
[23:47:20] [debug] #4 004010b6 in ?? () from samp-server.exe
[23:47:20] [debug] #5 5941d82a in ?? () from plugins\crashdetect.DLL
[23:47:20] [debug] #6 59424fe8 in ?? () from plugins\crashdetect.DLL
[23:47:20] [debug] #7 5941a1a7 in ?? () from plugins\crashdetect.DLL
[23:47:20] [debug] #8 5941d87a in ?? () from plugins\crashdetect.DLL
[23:47:20] [debug] #9 58bf3374 in ?? () from plugins\streamer.DLL
[23:47:20] [debug] #10 004833f8 in ?? () from samp-server.exe
[23:47:20] [debug] #11 00496b0a in ?? () from samp-server.exe
[23:47:20] [debug] #12 00492cab in ?? () from samp-server.exe
[23:47:20] [debug] #13 004a1d61 in ?? () from samp-server.exe
[23:47:20] [debug] #14 004a1d71 in ?? () from samp-server.exe
[23:47:20] [debug] Registers:
[23:47:20] [debug] EAX: 00000000 EBX: 00000001 ECX: 13a54e78 EDX: 588f6712
[23:47:20] [debug] ESI: 0000003d EDI: 13a54e78 EBP: 004a1d61 ESP: 0019fe98
[23:47:20] [debug] EIP: 004a1d71 EFLAGS: 00010287
[23:47:20] [debug] Stack:
[23:47:20] [debug] ESP+00000000: 004b1e20 0019ff70 004b1a1c ffffffff
[23:47:20] [debug] ESP+00000020: 00000094 00000006 00000002 000023f0
[23:47:20] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+000000c0: 00000000 00000000 c0000005 00000000
[23:47:20] [debug] ESP+000000e0: 004c0790 00000000 0019ff94 75a73744
[23:47:20] [debug] ESP+00000100: 7711a064 7ffde000 d5e28d38 00000000
[23:47:20] [debug] ESP+00000120: 00000000 00000000 d5e28d38 0019ffa0
[23:47:20] [debug] ESP+00000140: 00000000 0019ffec 7711a02f ffffffff
[23:47:20] [debug] ESP+00000160: 7ffde000 00000000 78746341 00000020
[23:47:20] [debug] ESP+00000180: 00000020 00000000 00000014 00000001
[23:47:20] [debug] ESP+000001a0: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+000001c0: 00000044 000002e0 00000264 00000000
[23:47:20] [debug] ESP+000001e0: 0000034e 00000000 2d59495b 000008e0
[23:47:20] [debug] ESP+00000200: 32ceeacd 00000c1c 00000042 00000c60
[23:47:20] [debug] ESP+00000220: 0000005e 00000ffc 0000036e 00000000
[23:47:20] [debug] ESP+00000240: 0000039e 00000010 00000009 000000ec
[23:47:20] [debug] ESP+00000260: 00000001 00000002 0000179c 000007a0
[23:47:20] [debug] ESP+00000280: 00000001 00000004 00002dc8 00000314
[23:47:20] [debug] ESP+000002a0: 00000002 00000006 00003174 000000cc
[23:47:20] [debug] ESP+000002c0: 00000001 00000009 00003330 00000028
[23:47:20] [debug] ESP+000002e0: 00000001 64487353 0000002c 00000001
[23:47:20] [debug] ESP+00000300: 00000001 000015e8 0000002c 0000005e
[23:47:20] [debug] ESP+00000320: 00000000 00000000 00000000 00000000
[23:47:20] [debug] ESP+00000340: 00000038 00000000 003a0043 0057005c
[23:47:20] [debug] ESP+00000360: 006e0069 00780053 005c0073 00000000
[23:47:20] [debug] ESP+00000380: 00000264 00000001 f33271ba 000003c8
[23:47:20] [debug] ESP+000003a0: 2d59495b 00000764 00000032 00000798
[23:47:20] [debug] ESP+000003c0: 00000042 00000ae4 0000033c 00000004
[23:47:20] [debug] ESP+000003e0: 0000036e 00000005 b1280544 000011f0
[23:47:20] [debug] Loaded modules:
[23:47:20] [debug] 00400000 - 0051f000 samp-server.exe
[23:47:20] [debug] 770c0000 - 77239000 ntdll.dll
[23:47:20] [debug] 75a60000 - 75b50000 KERNEL32.DLL
[23:47:20] [debug] 75ff0000 - 76166000 KERNELBASE.dll
[23:47:20] [debug] 70870000 - 70881000 aswhookx.dll
[23:47:20] [debug] 74480000 - 7583f000 SHELL32.dll
[23:47:20] [debug] 74200000 - 742be000 msvcrt.dll
[23:47:20] [debug] 76ac0000 - 76f9d000 windows.storage.dll
[23:47:20] [debug] 76350000 - 7650a000 combase.dll
[23:47:20] [debug] 75f40000 - 75fec000 RPCRT4.dll
[23:47:20] [debug] 741d0000 - 741ee000 SspiCli.dll
[23:47:20] [debug] 741c0000 - 741ca000 CRYPTBASE.dll
[23:47:20] [debug] 74160000 - 741b9000 bcryptPrimitives.dll
[23:47:20] [debug] 758f0000 - 75933000 sechost.dll
[23:47:20] [debug] 76fa0000 - 7701b000 advapi32.dll
[23:47:20] [debug] 76850000 - 76894000 shlwapi.dll
[23:47:20] [debug] 75b50000 - 75c9d000 GDI32.dll
[23:47:20] [debug] 76210000 - 76350000 USER32.dll
[23:47:20] [debug] 76960000 - 7696c000 kernel.appcore.dll
[23:47:20] [debug] 75860000 - 758ed000 shcore.dll
[23:47:20] [debug] 76800000 - 76844000 powrprof.dll
[23:47:20] [debug] 759e0000 - 759ef000 profapi.dll
[23:47:20] [debug] 73da0000 - 73da8000 WSOCK32.dll
[23:47:20] [debug] 75e80000 - 75edc000 WS2_32.dll
[23:47:20] [debug] 770b0000 - 770b7000 NSI.dll
[23:47:20] [debug] 71e60000 - 71e84000 WINMM.dll
[23:47:20] [debug] 71d80000 - 71da3000 WINMMBASE.dll
[23:47:20] [debug] 76170000 - 761a6000 cfgmgr32.dll
[23:47:20] [debug] 71b90000 - 71bb1000 DEVOBJ.dll
[23:47:20] [debug] 76970000 - 7699b000 IMM32.DLL
[23:47:20] [debug] 769a0000 - 76ac0000 MSCTF.dll
[23:47:20] [debug] 59400000 - 59451000 crashdetect.DLL
[23:47:21] [debug] 58f10000 - 58f79000 MSVCP100.dll
[23:47:21] [debug] 58e50000 - 58f0f000 MSVCR100.dll
[23:47:21] [debug] 58df0000 - 58e48000 pawnraknet.DLL
[23:47:21] [debug] 10000000 - 100a5000 YSF_DL.DLL
[23:47:21] [debug] 75cf0000 - 75dda000 ole32.dll
[23:47:21] [debug] 75de0000 - 75e72000 OLEAUT32.dll
[23:47:21] [debug] 58d80000 - 58ded000 MSVCP140.dll
[23:47:21] [debug] 625b0000 - 625c4000 VCRUNTIME140.dll
[23:47:21] [debug] 73e10000 - 73eec000 ucrtbase.dll
[23:47:21] [debug] 59820000 - 5985b000 SKY.DLL
[23:47:21] [debug] 75a50000 - 75a56000 PSAPI.DLL
[23:47:21] [debug] 58d30000 - 58d7e000 mysql.DLL
[23:47:21] [debug] 5a030000 - 5a04c000 log-core.dll
[23:47:21] [debug] 58c60000 - 58d2d000 libmariadb.dll
[23:47:21] [debug] 76510000 - 76685000 CRYPT32.dll
[23:47:21] [debug] 742c0000 - 742ce000 MSASN1.dll
[23:47:21] [debug] 6fb20000 - 6fb2a000 Secur32.dll
[23:47:21] [debug] 6e6b0000 - 6e6c2000 napinsp.dll
[23:47:21] [debug] 6e690000 - 6e6a6000 pnrpnsp.dll
[23:47:21] [debug] 702e0000 - 702f3000 NLAapi.dll
[23:47:21] [debug] 70570000 - 705be000 mswsock.dll
[23:47:21] [debug] 73760000 - 737e4000 DNSAPI.dll
[23:47:21] [debug] 6fb30000 - 6fb3b000 winrnr.dll
[23:47:21] [debug] 70520000 - 70528000 rasadhlp.dll
[23:47:21] [debug] 003d0000 - 003de000 sscanf.DLL
[23:47:21] [debug] 58bf0000 - 58c57000 streamer.DLL
[23:47:21] [debug] 58ba0000 - 58bea000 irc.DLL
[23:47:21] [debug] 59670000 - 59699000 chrono.DLL
[23:47:21] [debug] 588f0000 - 58b94000 FCNPC-DL.DLL
[23:47:21] [debug] 595c0000 - 595d1000 log-plugin.DLL
[23:47:21] [debug] 69e50000 - 69e5a000 pawn-memory.DLL
[23:47:21] [debug] 738a0000 - 738d0000 IPHLPAPI.DLL
[23:47:21] [debug] 73750000 - 73758000 WINNSI.DLL
[23:47:21] [debug] 6a410000 - 6a456000 fwpuclnt.dll
[23:47:21] [debug] 73230000 - 7324b000 bcrypt.dll
[23:47:21] [debug] 77020000 - 770a2000 clbcatq.dll
[23:47:21] [debug] 73250000 - 73263000 cryptsp.dll
[23:47:21] [debug] 73200000 - 7322f000 rsaenh.dll

the code.

function NPC_Connect()
{
    new npcid;
    npcid = FCNPC_Create("Masinis_01");
    g_NPCForTrain[0] = npcid;
    g_NPCStatus[0] = 0;
    FCNPC_Spawn(npcid, 61, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCTrain[0], 0);
    npcid = FCNPC_Create("Masinis_02");
    g_NPCForTrain[1] = npcid;
    g_NPCStatus[1] = 1;
    FCNPC_Spawn(npcid, 61, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCTrain[1], 0);
    npcid = FCNPC_Create("Masinis_03");
    g_NPCForTrain[2] = npcid;
    g_NPCStatus[2] = 2;
    FCNPC_Spawn(npcid, 61, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCTrain[2], 0);
    npcid = FCNPC_Create("Pilot_01");
    g_NPCForPlane[0] = npcid;
    g_NPCStatus[3] = 0;
    FCNPC_Spawn(npcid, 61, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCPlane[0], 0);
    npcid = FCNPC_Create("Pilot_02");
    g_NPCForPlane[1] = npcid;
    g_NPCStatus[4] = 1;
    FCNPC_Spawn(npcid, 62, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCPlane[1], 0);
    npcid = FCNPC_Create("Pilot_03");
    g_NPCForPlane[2] = npcid;
    g_NPCStatus[5] = 2;
    FCNPC_Spawn(npcid, 62, 0.0, 0.0, 0.0);
    FCNPC_PutInVehicle(npcid, g_NPCPlane[2], 0);
    return 1;
}  
NegativeIQ commented 5 years ago

Can you please try to move spawn and put in vehicle into a timer? 100ms should be more then enough...