ziggi / FCNPC

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

Linux Server Crash #292

Closed Revalto closed 11 months ago

Revalto commented 11 months ago
=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 4725eb4d from f77814a8

Backtrace:
  #0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerCallbackEiP9siginfo_tPv+0x126) [0xf77726e6]
  #1 in linux-gate.so.1(__kernel_rt_sigreturn+0) [0xf7f6c570]
  #2 in plugins/FCNPC.so(_ZN7CServer24IsMovePathfindingEnabledEi+0x8) [0xf77814a8]
  #3 in plugins/FCNPC.so(_ZN11CPlayerData18SetMovePathfindingEi+0x2d) [0xf777dcfd]
  #4 in plugins/FCNPC.so(_ZN11CPlayerData4GoToERK7CVectoriiifbffj+0x1ca) [0xf777df5a]
  #5 in plugins/FCNPC.so(_ZN8CNatives10FCNPC_GoToEP6tagAMXPi+0x11f) [0xf7785a5f]
  #6 in ./samp-srv() [0x80950e4]
  #7 in plugins/crashdetect.so(_ZN11CrashDetect10OnCallbackEiPiS0_+0x478) [0xf792d168]
  #8 in plugins/crashdetect.so(+0x202ab) [0xf79302ab]

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

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 ============================
ziggi commented 11 months ago

You pass something wrong in pathfinding argument of GoTo function. Use one of these: https://github.com/ziggi/FCNPC/blob/0827d2e86e2a06d5ec396a9296715b14c995a19c/sampsvr_files/FCNPC.inc#L54-L57

Revalto commented 11 months ago

Вы передаете что-то неправильное в аргументе функции. Используйте один из следующих вариантов:pathfinding``GoTo

https://github.com/ziggi/FCNPC/blob/0827d2e86e2a06d5ec396a9296715b14c995a19c/sampsvr_files/FCNPC.inc#L54-L57

I also noticed that when I call the FCNPC_Create function, FCNPC_OnCreate is not called. Although on the old version of the plugin everything works fine. I had to call it manually. But somehow everything started to work unstably.

I tried to catch it through crashdetect, but so far it doesn't show anything. There is only FCNPC error log

Re:

#define FCNPC_MOVE_PATHFINDING_AUTO (-1)
#define FCNPC_MOVE_PATHFINDING_NONE (0)
#define FCNPC_MOVE_PATHFINDING_Z (1)
#define FCNPC_MOVE_PATHFINDING_RAYCAST (2)

I don't have it used anywhere in my project

ziggi commented 11 months ago

Ты используешь какие-то Filterscripts? FCNPC.inc последней версии? Ну и показывай код, который вызывает этот краш (FCNPC_GoTo).

Revalto commented 11 months ago

Я кажись понял в чем проблема. Я обновлялся с версии где еще использовался bool:UseMapAndreas = false, сейчас попробую исправить. Если что, отпишусь. Спасибо за помощь!

Revalto commented 11 months ago

Ты используешь какие-то Filterscripts? FCNPC.inc последней версии? Ну и показывай код, который вызывает этот краш (FCNPC_GoTo).

Так и должно быть при FCNPC_OnWeaponShot ?

[31/07 23:12:40] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:41] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:42] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:42] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:43] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:44] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:45] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:46] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:47] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:47] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:48] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:49] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:50] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:51] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:52] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:53] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:53] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:54] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:55] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:56] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:57] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:58] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:59] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:12:59] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:00] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:01] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:02] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:03] FCNPC_OnWeaponShot npcid: 50, weaponid: 0, hittype: 1, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:04] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:04] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00
[31/07 23:13:05] FCNPC_OnWeaponShot npcid: 50, weaponid: 65535, hittype: 0, hitid: 25, x: 0.00, y: 0.00, z: 0.00

Не валидное значение оружия, не валидные координаты hitid тоже невалидный

ziggi commented 11 months ago

Без кода не знаю

Revalto commented 11 months ago

Без кода не знаю

Ошибка была найдена. Накосячил один из разработчиков в проекте. Спасибо за отклик)