mod-audio / mod-host

LV2 host for Jack controllable via socket or command line
GNU General Public License v3.0
107 stars 55 forks source link

mod-host (as a jack module) seems to crash when loading "fluidplug pianos" #87

Closed jofemodo closed 1 month ago

jofemodo commented 1 month ago

Hi falk!

Long time without contacting you. I hope everything is going nicely from your side!

When running mod-host (latest version from repo) with mod-ui (zynthian fork), mod-host seems to crash generating this output in the jackd log:

Sep 23 22:19:41 zynthian jackd[854]: No jack_get_descriptor entry-point for mod-host
Sep 23 22:19:48 zynthian jackd[854]: fluidsynth: warning: No preset found on channel 9 [bank=128 prog=0]
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSplitsType'
Sep 23 22:20:40 zynthian jackd[854]: g_param_spec_enum: assertion 'G_TYPE_IS_ENUM (enum_type)' failed
Sep 23 22:20:40 zynthian jackd[854]: ipatch_type_install_property: assertion 'G_IS_PARAM_SPEC(prop_spec)' failed
Sep 23 22:20:40 zynthian jackd[854]: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSF2GenType'
Sep 23 22:20:40 zynthian jackd[854]: cannot retrieve class for invalid (unclassed) type '<invalid>'
Sep 23 22:20:40 zynthian jackd[854]: file ./libinstpatch/IpatchSF2Gen.c: line 152 (_ipatch_sf2_gen_init): assertion `enum_class != NULL' failed.
Sep 23 22:20:40 zynthian jackd[854]: g_type_class_unref: assertion 'g_class != NULL' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSample'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchItem'
Sep 23 22:20:40 zynthian jackd[854]: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSF2GenItem'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchItem'
Sep 23 22:20:40 zynthian jackd[854]: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSF2ModItem'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchItem'
Sep 23 22:20:40 zynthian jackd[854]: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchSF2VoiceCache'
Sep 23 22:20:40 zynthian jackd[854]: cannot retrieve class for invalid (unclassed) type '<invalid>'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchItem'
Sep 23 22:20:40 zynthian jackd[854]: g_type_register_static: assertion 'parent_type > 0' failed
Sep 23 22:20:40 zynthian jackd[854]: g_type_register_static: assertion 'parent_type > 0' failed
Sep 23 22:20:40 zynthian jackd[854]: g_once_init_leave: assertion 'result != 0' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot retrieve class for invalid (unclassed) type '<invalid>'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchItem'
Sep 23 22:20:40 zynthian jackd[854]: g_type_register_static: assertion 'parent_type > 0' failed
Sep 23 22:20:40 zynthian jackd[854]: cannot retrieve class for invalid (unclassed) type '<invalid>'
Sep 23 22:20:40 zynthian jackd[854]: cannot register existing type 'IpatchConverter'
Sep 23 22:20:40 zynthian jackd[854]: cannot retrieve class for invalid (unclassed) type '<invalid>'

After this, mod-host seems to be dead.

System:

I tested recent and older mod-host versions too and the issue is also there, so probably is the plugin that is not working as expected, or some of the linked libraries (libfluidsynth?). It happens when loading "fluidplug piano" LV2, when you load the plugin after having removed it. I mean, the second time you load it. First time doesn't fail.

I understand you can't control that all plugins work as expected, but perhaps you could do something to avoid crashing the entire mod-host?

All the best,

falkTX commented 1 month ago

that is obviously an issue with the plugin, plugins run in-process so nothing to do here, report the issue to the plugin devs and let them fix it.

jofemodo commented 1 month ago

OK. If i understand well, there is no way of preventing mod-host to crash when a plugin breaks things beyond some point, right? I mean, there is no "perfect isolation" between mod-host and the plugins it run, right?

Thanks for clarifying.

falkTX commented 1 month ago

correct. plugins are shared libraries, if those crash there is nothing the main app can do. typically hosts spawn plugins in bridges to prevent them crashing the whole thing, but this is not a design for mod-host

jofemodo commented 1 month ago

Understood! Thanks for clarifying!