NullMember / godot-rtmidi

The Unlicense
8 stars 1 forks source link

Godot auto-closes and broken when try add MidiIn/MidiOut node on Ubuntu 24.04 LTS #4

Open italomcs opened 1 month ago

italomcs commented 1 month ago

Screencast from 2024-06-01 11-03-34.webm

When I try to add the MidiIn/MidiOut node, the project auto-closes and broken, making it impossible to open again.

My system: Godot 4.2.2stable Captura de tela de 2024-06-01 11-24-04

NullMember commented 1 month ago

It's somewhat known issue but I've not expected that to crash Godot. I wrote that this issue is known in readme. Can you try to instantiate midiin from script? If it's also crash Godot I'll look into it.

italomcs commented 1 month ago

I noticed that godot broken even without try to add MiniIn/MidiOut node. It broke when i add godot-rtmidi in addons folder and try reopen project for the second time.

But i try to instantiate MiniIn/MidiOut from script before reopen project and appear this error:

Captura de tela de 2024-06-02 12-06-01

NullMember commented 1 month ago

I don't have access to Linux PC but tried using WSL. I can confirm godot-rtmidi crashes godot. Here is what I get:

OpenGL API 4.1 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 - Compatibility - Using Device: Microsoft - D3D12 (Intel(R) UHD Graphics 630)

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)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org
WARNING: Could not set V-Sync mode. V-Sync is not supported.
     at: set_use_vsync (platform/linuxbsd/x11/gl_manager_x11.cpp:374)
OpenGL API 4.1 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 - Compatibility - Using Device: Microsoft - D3D12 (Intel(R) UHD Graphics 630)

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)
terminate called after throwing an instance of 'RtMidiError'
  what():  RtMidiIn: no compiled API support found ... critical error!!

I'm going to compile godot-rtmidi from source in WSL instead of using CI artefact. Let's see if it solve the problem

NullMember commented 1 month ago

I've re-uploaded the latest release with a recompiled Linux binary. Can you try it out? Even if it works, we still need to catch exceptions thrown by RtMidi to ensure it doesn't crash Godot. However, I'd like to know if it functions correctly now.

italomcs commented 1 month ago

Godot doesn't crash but this error appears and rtmidi doesn't work.

godot_rtmidi002_test4_bug_error

-Can't open dynamic library: /home/italo/Downloads/GodotTests/rtmidi002_4Test/addons/godot-rtmidi/lib/Linux-x86_64/libgodot_rtmidi.so. Error: libjack.so.0: cannot open shared object file: No such file or directory.

-core/extension/gdextension.cpp:719 - GDExtension dynamic library not found: /home/italo/Downloads/GodotTests/rtmidi002_4Test/addons/godot-rtmidi/lib/Linux-x86_64/libgodot_rtmidi.so

-Failed loading resource: res://addons/godot-rtmidi/godot_rtmidi.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

NullMember commented 1 month ago

godot-rtmidi_alsa.zip

Can you try out this one? I've compiled for alsa only.

Edit: Also sorry for temporary solutions. I don't have time these days to develop proper solution.

italomcs commented 1 month ago

I tested godot-rtmidi_alsa and it works! (It sent and received messages normally).

But this errors appear when i add script with MidiIn/MidiOut class.

Captura de tela de 2024-06-03 11-22-26

-modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MidiIn" not found.

-res://scripts/MidiInTest.gd:3 - Compile Error: Identifier not found: MidiIn