Chuckleberry-Finn / pz-shops

GNU Affero General Public License v3.0
1 stars 4 forks source link

Error merging money #16

Closed eI1on closed 1 year ago

eI1on commented 1 year ago

Whenever I merge money in my inventory I get this error, but the money is merged with the correct modData and display name. image

ERROR: General     , 1692508753947> 264,687,598> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor1013.invoke.
ERROR: General     , 1692508753947> 264,687,598> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedMethodAccessor1013.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
        at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:198)
        at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:188)
        at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
        at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
        at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
        at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
        at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
        at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
        at zombie.ui.UIElement.onMouseUp(UIElement.java:1228)
        at zombie.ui.UIElement.onMouseUp(UIElement.java:1183)
        at zombie.ui.UIManager.update(UIManager.java:816)
        at zombie.GameWindow.logic(GameWindow.java:262)
        at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
        at zombie.GameWindow.frameStep(GameWindow.java:765)
        at zombie.GameWindow.run_ez(GameWindow.java:667)
        at zombie.GameWindow.mainThread(GameWindow.java:495)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException
        at zombie.network.GameClient.addToItemRemoveSendBuffer(GameClient.java:4580)
        at zombie.inventory.ItemContainer.removeItemOnServer(ItemContainer.java:631)
        ... 21 more
LOG  : General     , 1692508757400> 264,691,051> ERROR: addToItemRemoveSendBuffer parent=zombie.characters.IsoPlayer@72908674 item=zombie.inventory.types.ComboItem@498e5d97
LOG  : General     , 1692508757400> 264,691,052> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: removeItemOnServer
function: safelyRemoveMoney -- file: shop-wallet.lua line # 58 | MOD: Shops and Traders
function: onMouseUp -- file: shop-wallet.lua line # 303 | MOD: Shops and Traders
eI1on commented 1 year ago

The issue seems to be here: https://github.com/Chuckleberry-Finn/pz-shops/blob/72762b4ac4d698589b00c2e05137af93f6da2247/Contents/mods/pz-shops/media/lua/client/shop-wallet.lua#L303

Chuckleberry-Finn commented 1 year ago

I will look into it, the behavior is successful/works as expected otherwise?