Jump to content

Calling addVehicle() results in invocation exception, vehicle despawns when player leaves cell


ethanwdp

Recommended Posts

I'm not sure if this is a bug with LuaManager or if I'm doing something wrong, but calling addVehicle spits out an invocation error on 41.21. The vehicle seems to be spawned correctly, but it disappears when the player leaves the cell. On Build 40 neither the error nor the despawning occurs.

 

Code to replicate the error:

addVehicle("Base.SmallCar") -- spawns a Chevalier Dart

The error:

Quote

LOG  : General, 1575119689371> ERROR4!!!
LOG  : General, 1575119689375>
LOG  : General, 1575119689379> -----------------------------------------
LOG  : General, 1575119689383> STACK TRACE
LOG  : General, 1575119689386> -----------------------------------------
LOG  : General, 1575119689390> Callframe at: addVehicle
LOG  : General, 1575119689394> function: stdin -- file: objects.lua line # 1
LOG  : General, 1575119689398> function: runLua -- file: LuaInterpreter.lua line # 192
LOG  : General, 1575119689402> function: onMouseUp -- file: ISButton.lua line # 55
ERROR: General, 1575119689406> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method).
ERROR: General, 1575119689410> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:186)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1006)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:167)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1942)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1744)
    at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
    at zombie.ui.UIElement.onMouseUp(UIElement.java:1137)
    at zombie.ui.UIElement.onMouseUp(UIElement.java:1091)
    at zombie.ui.UIManager.update(UIManager.java:767)
    at zombie.GameWindow.logic(GameWindow.java:234)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:673)
    at zombie.GameWindow.run_ez(GameWindow.java:594)
    at zombie.GameWindow.mainThread(GameWindow.java:460)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at zombie.vehicles.BaseVehicle.save(BaseVehicle.java:2456)
    at zombie.vehicles.VehiclesDB.addVehicleInt(VehiclesDB.java:1036)
    at zombie.vehicles.VehiclesDB.addVehicle(VehiclesDB.java:899)
    at zombie.Lua.LuaManager$GlobalObject.addVehicle(LuaManager.java:5950)
    ... 22 more

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...