nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
130 stars 92 forks source link

[Crash] PlayerInventoryGUI - Stack objects in external inventory #1484

Open Christian-Vassallo opened 2 years ago

Christian-Vassallo commented 2 years ago
NWNX Signal Handler:
==============================================================
 NWNX 8193.34 (8f87a8d2b2) has crashed. Fatal error: Segmentation fault (11).
 Please file a bug at https://github.com/nwnxee/unified/issues
==============================================================

  Backtrace:
    /home/bowser/unified/Binaries/NWNX_Core.so(_ZN7NWNXLib8Platform13GetStackTraceB5cxx11Eh+0x66) [0x7fc46e65a4a3]
    /home/bowser/unified/Binaries/NWNX_Core.so(nwnx_signal_handler+0xe0) [0x7fc46e5a8c9a]
    /lib/x86_64-linux-gnu/libc.so.6(<UNKNOWN>) [0x7fc46de18210]
    ./nwserver-linux(_ZN11CNWSMessage21WriteRepositoryUpdateEP10CNWSPlayerP10CNWSObjectP15CItemRepositoryP22CNWSPlayerLUOInventoryhch+0x315) [0x56507011af05]
    ./nwserver-linux(_ZN11CNWSMessage43WriteGameObjUpdate_MajorGUIPanels_InventoryEP10CNWSPlayerP22CNWSPlayerInventoryGUI+0x21c) [0x56507012f72c]
    ./nwserver-linux(_ZN11CNWSMessage33WriteGameObjUpdate_MajorGUIPanelsEP10CNWSPlayer+0x18b) [0x56507013498b]
    ./nwserver-linux(_ZN11CNWSMessage31SendServerToPlayerGameObjUpdateEP10CNWSPlayerj+0x1c0) [0x56507013bf40]
    ./nwserver-linux(_ZN21CServerExoAppInternal32UpdateClientGameObjectsForPlayerEP10CNWSPlayerim+0x197) [0x56507015d317]
    ./nwserver-linux(_ZN21CServerExoAppInternal23UpdateClientGameObjectsEi+0x80) [0x56507015d4f0]
    ./nwserver-linux(_ZN21CServerExoAppInternal8MainLoopEv+0x1c8) [0x56507016c8f8]
    /home/bowser/unified/Binaries/NWNX_Core.so(_ZN7NWNXLib5Hooks12FunctionHook12CallOriginalIiJP21CServerExoAppInternalEEET_DpT0_+0x2c) [0x7fc46e5b70c4]
    /home/bowser/unified/Binaries/NWNX_Core.so(_ZN4Core8NWNXCore23MainLoopInternalHandlerEP21CServerExoAppInternal+0x64) [0x7fc46e5adf42]
    /home/bowser/unified/Binaries/NWNX_Core.so(_ZN7NWNXLib5Hooks12FunctionHook12CallOriginalIiJP21CServerExoAppInternalEEET_DpT0_+0x2c) [0x7fc46e5b70c4]
    /home/bowser/unified/Binaries/NWNX_Util.so(<UNKNOWN>) [0x7fc466b49736]
    /home/bowser/unified/Binaries/NWNX_Util.so(<UNKNOWN>) [0x7fc466b497ac]
    ./nwserver-linux(<UNKNOWN>) [0x56506fee6f45]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fc46ddf90b3]
    ./nwserver-linux(_start+0x2a) [0x56506feeaf0a]

Please go to https://beamdog.atlassian.net/servicedesk/ and report this crash to the Neverwinter Nights bug reporter.

Please describe the conditions within which you crashed, indicate your current game version, and attach the following files:

- The error report file at /home/bowser/.local/share/Neverwinter Nights/nwserver-crash-1645389057.log.

nwserver-crash-1645389057.log

The bug appears when you split something from an inventory (bank or some other PNG) which goes in your inventory. The object appears to be non-usable, up to when you slog/relog.

In case you do not slog/relog, and try to use this object in a forced way, the server crashes.

How to repeat: 1) Put something stack in the PNG inventory (example 99 arrows) inside a container (example a bag) 2) Split them, example 20 3) The 20 will be in your inventory, the 79 in the inventory of the PNG 4) The 20 will be not usable, even not equippable. However, in case you don't have another arrows, the system will take them automatically and try to use them 5) The system will crash

Daztek commented 2 years ago

I get the unusable arrows and can force it to fire them, but I'm not getting a crash myself.

Daztek commented 2 years ago

Ah, got it, had to split two times.

Christian-Vassallo commented 2 years ago

Oh, right. Yep I forgot to mention

TomRotfl commented 2 years ago

This is known afaik, you should be able to crash a server also if you try to sell it. My workaround is hooking the split event, and skip if the item being splitted is not being possessed by the player splitting it.

Christian-Vassallo commented 2 years ago

This is known afaik, you should be able to crash a server also if you try to sell it. My workaround is hooking the split event, and skip if the item being splitted is not being possessed by the player splitting it.

Thank you, nice workaround.