I was working on a horror-themed game for a game jam. I had the game finished and went to bundle the project and unfortunately got the message “java.lang.NullPointerException: Unknown”. I struggled to hunt down the issue for about an hour and missed the deadline for the jam (no biggie).
I was able to narrow down the issue to a spinescene within the player character (and possibly elsewhere).
I checked the uploaded settings and they are correct. I’ve also used them in previous projects without encountering this error. This error was occurring on the previous version of the engine and the newest release (the one requiring the dependency for spine).
I was able to duplicate the project and have uploaded it here: spinescene_issue_recreated.zip (8.2 MB) Note Ignore the strange colors of the character. I’m using a material to dynamically recolor it during runtime.
Any feedback would be helpful as I am completely lost!
Are you sure you uploaded the correct test project / fully saved before uploading? It looks like it opens to a generic scene instead of one with a spine scene.
Yes, this is the right project. I just double checked it on my end. The spine-scene is under main->characters. The problem isn’t running the game locally, it’s doing a specific build. I get the error doing project->build HTML 5. With my other project I got the same error doing project->bundle Windows App / HTML 5 App.
This is the message I see whenever I attempt to do project->build HTML5:
2021-10-24 15:31:04.620 134758 [JavaFX Application Thread] ERROR editor.error-reporting - {:line 110}
java.lang.NullPointerException: null
at com.dynamo.bob.pipeline.SpineSceneUtil.loadSkin(SpineSceneUtil.java:681)
at com.dynamo.bob.pipeline.SpineSceneUtil.loadJson(SpineSceneUtil.java:965)
at com.dynamo.bob.pipeline.SpineSceneBuilder.build(SpineSceneBuilder.java:413)
at com.dynamo.bob.Project.runTasks(Project.java:1322)
at com.dynamo.bob.Project.doBuild(Project.java:1125)
at com.dynamo.bob.Project.build(Project.java:574)
at editor.pipeline.bob$run_commands_BANG_$fn__37409.invoke(bob.clj:140)
at editor.pipeline.bob$run_commands_BANG_.invokeStatic(bob.clj:139)
at editor.pipeline.bob$bob_build_BANG_.invokeStatic(bob.clj:181)
at editor.disk$async_bob_build_BANG_$fn__38432$fn__38435$fn__38436.invoke(disk.clj:217)
at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
It works for me when building for Windows however. No error. I see the green character after adding it to the main collection. But bundling does not work for Windows either.
Is it the same error as mentioned in this thread? But the same error message is no longer being surfaced. Could you test their solutions and see if it helps?
I am getting this same issue, but I have no spine enabled. Bundling html5 or just building html5 is giving me the same error. It was working before I updated. Is there a way of downgrading?
Thank you! That ended up being the issue. I had to go in and manually copy/paste the attachments from the default skin to the new skin. I’ve used spine for projects before and have not had to do this. Did I miss an option while exporting from Spine?
Yup! Looks to be the same error. I wasn’t able to fix it in the same way. I had to manually copy/paste the JSON attachments within the skin to get it working again. I’ve used spine before for projects and have not had to do this. Did I just miss an option in spine while exporting or something?
It’s probably just an oversight with the old Spine runtime. The official Spine runtime is being worked on now that Spine is an external native extension so it means up to date version of Spine can be used and exporting without any gotchas should be possible.