viniciusgerevini / godot-aseprite-wizard

Godot Editor plugin to help import Aseprite animations to AnimationPlayers, AnimatedSprites and SpriteFrames.
MIT License
821 stars 42 forks source link

Crash on exit on macOS #137

Closed tanuki-billie closed 4 months ago

tanuki-billie commented 5 months ago

On macOS, upon exiting a Godot project with this addon installed, the editor crashes. Nothing besides the Apple Problem Reporter shows, so I'm not really sure why this happens.

I'm using Godot 4.2.1.stable, Aseprite 1.3.4, Aseprite Wizard 7.3.0, and an M2-based Mac on macOS Sonoma 14.3.1.

tanuki-billie commented 5 months ago

Here's a crash log:

Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Using "default" pen tablet driver...
OpenGL debugging not supported!
Shader 'CanvasSdfShaderGLES3' SHA256: ecd9246ea50aed3c9ae6ae38a153665bb4a1ca39f6546440a1464ad40686d7e4
Shader 'SkeletonShaderGLES3' SHA256: 4f67f97a196a62e0882348bc4ef56e0a921fada3915387471d88d28facb79d55
Shader 'ParticlesShaderGLES3' SHA256: 213e6caf258d9afe3eadc057cc2e8a97610a730d6b8156ad6302cc8deef23af1
Shader 'ParticlesCopyShaderGLES3' SHA256: 552cfb480630394534d65da4691d4b4af461db0b4f0f32dcada3a27d598a7d9b
Shader 'CopyShaderGLES3' SHA256: 15cf5578ce490d9555358ebe8685060b2e8aa58f2929806924b9a3916d1c0ed7
Shader 'CanvasShaderGLES3' SHA256: 9490b769891d802d14e905e75c0342b5f8b4a998d01d3735924a7f16140ef4d3
Shader 'CanvasOcclusionShaderGLES3' SHA256: ee7450e5fcf8132b9a22816a25953177ff5af359b76575d5f9c8b2c1bfc56f39
Shader 'SceneShaderGLES3' SHA256: f52fe4a9d9bc080f1aafafaa321569e1fb85f1089935b739b5bc6d337128f6f1
Shader 'SkyShaderGLES3' SHA256: fa92049ec882a84a8a7f3884710df2a3c35921dc4935442cb7c016f91c5fc376
Shader 'CubemapFilterShaderGLES3' SHA256: 1bbd08bbaf2e8830437e99777f4654ab007595fde48f38869b7f60b9597d3741
OpenGL API 4.1 Metal - 88 - Compatibility - Using Device: Apple - Apple M2
CoreAudio: detected 2 channels
CoreAudio: audio buffer frames: 512 calculated latency: 11ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
2024-03-25 13:22:31.507 Godot[10299:2138849] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
CameraServer: Registered camera FaceTime HD Camera with ID 1 and position 0 at index 0
CORE API HASH: 915626997
EDITOR API HASH: 1313472085
EditorSettings: Load OK!
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
Loaded system CA certificates
EditorSettings: Save OK!
2024-03-25 13:22:33.965 Godot[10299:2138849] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
EditorSettings: Save OK!
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"
ERROR: 2 RID allocations of type 'N5GLES37TextureE' were leaked at exit.
ERROR: Texture with GL ID of 428: leaked 3064 bytes.
   at: ~Utilities (drivers/gles3/storage/utilities.cpp:79)
ERROR: Texture with GL ID of 430: leaked 3064 bytes.
   at: ~Utilities (drivers/gles3/storage/utilities.cpp:79)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.2.1.stable.official (b09f793f564a6c95dc76acc654b390e68441bd01)
Dumping the backtrace. 
[1] 1   libsystem_platform.dylib            0x0000000180cb5a24 _sigtramp + 56
[2] 2   ???                                 0xffff800180bb0494 0x0 + 18446603342675903636
[3] std::__1::recursive_mutex::lock()
[4] Object* ClassDB::creator<ENetConnection>()
[5] Object::can_translate_messages() const
[6] Object* ClassDB::creator<GLTFDocument>()
[7] JSON::get_data() const
[8] RenderSceneBuffersConfiguration::set_texture_mipmap_bias(float)
[9] RendererCompositorRD::_create_current()
[10] RendererCompositorRD::_create_current()
[11] 11  dyld                                0x00000001809050e0 start + 2360
-- END OF BACKTRACE --
================================================================
viniciusgerevini commented 5 months ago

Thanks for the detailed report. I'll try to reproduce it. I haven't seen this happening before, but I haven't ran it on macOS recently.

viniciusgerevini commented 5 months ago

I found the issue. It's missing some cleanup on exit. I'll be releasing the fix in the next version, but if you wan't to fix this locally in the meantime just add this to addons/AsepriteWizard/plugin.gd:

func _exit_tree():
    _disable_plugin()

Thanks for reporting this.