Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when calling LV2's extension_data() #10

Open
x42 opened this issue Jun 4, 2017 · 0 comments
Open

Crash when calling LV2's extension_data() #10

x42 opened this issue Jun 4, 2017 · 0 comments

Comments

@x42
Copy link

x42 commented Jun 4, 2017

#0  0x00007ffff693246d in lilv_instance_get_extension_data (instance=0x18cb5890, uri=0x7ffff6a8e788 "http://harrisonconsoles.com/lv2/inlinedisplay#interface")
---Type <return> to continue, or q <return> to quit---
    at /home/ardour/linux-x86_64-v5/gtk/inst/include/lilv-0/lilv/lilv.h:1719
#1  0x00007ffff6938306 in ARDOUR::LV2Plugin::extension_data (this=0x18c9aca0, uri=0x7ffff6a8e788 "http://harrisonconsoles.com/lv2/inlinedisplay#interface")
    at ../libs/ardour/lv2_plugin.cc:1217
#2  0x00007ffff6934a05 in ARDOUR::LV2Plugin::init (this=0x18c9aca0, c_plugin=0x7e03620, rate=48000) at ../libs/ardour/lv2_plugin.cc:547
#3  0x00007ffff6933802 in ARDOUR::LV2Plugin::LV2Plugin (this=0x18c9aca0, engine=..., session=..., c_plugin=0x7e03620, rate=48000) at ../libs/ardour/lv2_plugin.cc:344
#4  0x00007ffff6943aa2 in ARDOUR::LV2PluginInfo::load (this=0x9558220, session=...) at ../libs/ardour/lv2_plugin.cc:3297
#5  0x00007ffff66d5bb3 in ARDOUR::find_plugin (session=..., identifier="http://portalmod.com/plugins/caps/AutoFilter", type=ARDOUR::LV2)
    at ../libs/ardour/plugin.cc:224
#6  0x00007ffff66eb5fc in ARDOUR::PluginInsert::set_state (this=0x18c90be0, node=..., version=3002) at ../libs/ardour/plugin_insert.cc:2490
#7  0x00007ffff677f2e4 in ARDOUR::Route::set_processor_state (this=0x18ba8ea0, node=...) at ../libs/ardour/route.cc:2884
#8  0x00007ffff677c426 in ARDOUR::Route::set_state (this=0x18ba8ea0, node=..., version=3002) at ../libs/ardour/route.cc:2490
#9  0x00007ffff691ba95 in ARDOUR::Track::set_state (this=0x18ba8ea0, node=..., version=3002) at ../libs/ardour/track.cc:125
#10 0x00007ffff66651c9 in ARDOUR::MidiTrack::set_state (this=0x18ba8ea0, node=..., version=3002) at ../libs/ardour/midi_track.cc:177
#11 0x00007ffff686f120 in ARDOUR::Session::XMLRouteFactory (this=0x305bd80, node=..., version=3002) at ../libs/ardour/session_state.cc:1745
#12 0x00007ffff686ea61 in ARDOUR::Session::load_routes (this=0x305bd80, node=..., version=3002) at ../libs/ardour/session_state.cc:1693
#13 0x00007ffff686db1d in ARDOUR::Session::set_state (this=0x305bd80, node=..., version=3002) at ../libs/ardour/session_state.cc:1593
#14 0x00007ffff6864167 in ARDOUR::Session::post_engine_init (this=0x305bd80) at ../libs/ardour/session_state.cc:287
#15 0x00007ffff67c0af6 in ARDOUR::Session::Session (this=0x305bd80, eng=..., fullpath="/media/hd/audio/cramned", snapshot_name="cramned", bus_profile=0x0, 
    mix_template="") at ../libs/ardour/session.cc:415
#16 0x0000000000734d7e in ARDOUR_UI::load_session (this=0x1b78680, path="/media/hd/audio/cramned", snap_name="cramned", mix_template="")
    at ../gtk2_ardour/ardour_ui.cc:3637
#17 0x000000000073450a in ARDOUR_UI::get_session_parameters (this=0x1b78680, quit_on_cancel=false, should_be_new=false, load_template="")
    at ../gtk2_ardour/ardour_ui.cc:3564
#18 0x0000000000729703 in ARDOUR_UI::starting (this=0x1b78680) at ../gtk2_ardour/ardour_ui.cc:1268
#19 0x00007ffff74f18d2 in Gtkmm2ext::UI::run (this=0x1b78680, old_receiver=...) at ../libs/gtkmm2ext/gtk_ui.cc:280
#20 0x0000000000c5c73c in main (argc=1, argv=0x7fffffffcd18) at ../gtk2_ardour/main.cc:413

(gdb) print _plugin_uri
$1 = 0x9562e50 "http://portalmod.com/plugins/caps/AutoFilter"

best guess: it's due to plugins/*/interface.cc returning a pointer to the Descriptor instance without static_cast<> to a LV2_Descriptor struct (and also no extern "C").

static const Descriptor<AutoFilter> lv2_descriptor(CAPS_URI "AutoFilter");
return i == 0 ? &lv2_descriptor : 0;

where Descriptor is-a DescriptorStub which is defined as

class DescriptorStub : public LADSPA_Descriptor, public LV2_Descriptor

The plugin host casts that pointer to a LV2_Descriptor without knowing about the Descriptor.

falkTX pushed a commit that referenced this issue Jun 26, 2017
Reported in #10
Need to test if if fixes the issue or not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant