defold/extension-spine

Editor crashes on startup with particular spine file

Closed this issue · 5 comments

The attached spine file (images excluded, but should be sufficient for testing) causes the editor to fail to load a project (i.e. crash) if using extension-spine 2.15.0 or later, i.e. it's good in 2.14.5
The file was exported with Spine 4.1.19 so should be compatible.
This prevents us from upgrading to Defold 1.7.1

new_guide.zip

Editor log from 1.7.0 on Mac M1:

2024-04-11 13:46:40.808 129  [JavaFX-Launcher] WARN  javafx - Unsupported JavaFX configuration: classes were loaded from 'unnamed module @62a0b4d9'
2024-04-11 13:46:41.745 1066 [Thread-5] INFO  com.defold.libs.ResourceUnpacker - deleting old unpack dirs from /Users/dri/Library/Application Support/Defold/unpack
2024-04-11 13:46:41.750 1071 [Thread-5] INFO  com.defold.libs.ResourceUnpacker - deleting unpack dir /Users/dri/Library/Application Support/Defold/unpack/b0edf484dd57b331ee109e527e03249787bf3e87
2024-04-11 13:46:41.757 1078 [Thread-5] INFO  com.defold.libs.ResourceUnpacker - Already unpacked for the editor version 9ad2d7834a6adfaedcd902a8e6f9997ed5cbb507
2024-04-11 13:46:41.759 1080 [Thread-5] INFO  com.defold.libs.ResourceUnpacker - defold.unpack.path=/Users/dri/Library/Application Support/Defold/unpack/9ad2d7834a6adfaedcd902a8e6f9997ed5cbb507
2024-04-11 13:46:44.393 3714 [Timer-1] INFO  editor.updater - {:line 303, :message "Checking for updates", :url "https://d.defold.com/editor2/channels/editor-alpha/update-v4.json"}
2024-04-11 13:46:44.637 3958 [Timer-1] INFO  editor.updater - {:line 309, :message "New version found", :sha1 "ecdec42bff4ffde46635964bd0b16561b9498216"}
2024-04-11 13:47:05.194 24515 [clojure-agent-send-off-pool-0] INFO  editor.workspace - {:line 474, :msg "Loading plugin defold-spine/editor/src/spineext.clj"}
2024-04-11 13:47:06.694 26015 [clojure-agent-send-off-pool-0] INFO  editor.workspace - {:line 479, :msg "Loaded plugin defold-spine/editor/src/spineext.clj"}
2024-04-11 13:47:06.695 26016 [clojure-agent-send-off-pool-0] INFO  editor.workspace - {:line 474, :msg "Loading plugin defold-spine/editor/src/spineguiext.clj"}
2024-04-11 13:47:06.932 26253 [clojure-agent-send-off-pool-0] INFO  editor.workspace - {:line 479, :msg "Loaded plugin defold-spine/editor/src/spineguiext.clj"}

Crash report:
java-2024-04-12-100148.ips.zip

The crash appears to be in the recently-added MergeDrawDescs function:

Thread 46 Crashed:: Java: clojure-agent-send-off-pool-7
0   libsystem_kernel.dylib        	       0x19be44764 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x19be7bc28 pthread_kill + 288
2   libsystem_c.dylib             	       0x19bd89ae8 abort + 180
3   libsystem_c.dylib             	       0x19bd88e44 __assert_rtn + 272
4   libSpineExt.dylib             	       0x12563c0ec dmSpine::MergeDrawDescs(dmArray<dmSpine::SpineDrawDesc> const&, dmArray<dmSpine::SpineDrawDesc>&) (.cold.2) + 40
5   libSpineExt.dylib             	       0x125621bd4 dmSpine::MergeDrawDescs(dmArray<dmSpine::SpineDrawDesc> const&, dmArray<dmSpine::SpineDrawDesc>&) + 400
6   libSpineExt.dylib             	       0x1256222cc UpdateVertices(SpineFile*, float) + 376
7   libSpineExt.dylib             	       0x125621eb4 SPINE_LoadFromBuffer + 696

same problem on 1.8.0
but if open with https://github.com/defold/extension-spine/archive/refs/tags/2.14.4.zip, then open, then upgrade extension, fetch libraries, works fine

@Jhonnyg extension-spine 3.1.0 still crashes on the file attached in the first post

@dri-richard ah d'oh, I merged libraries that didn't contain the fix. Gimme a sec and I'll update the libraries again

@dri-richard I released a patch version now, sorry about that!