View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006829 | ardour | bugs | public | 2016-03-19 19:23 | 2020-09-28 16:08 |
| Reporter | ventosus | Assigned To | paul | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | reopened | ||
| Platform | any | OS | any | OS Version | any |
| Product Version | 4.7 | ||||
| Summary | 0006829: Fix crash with lv2:Parameter of Variant:STRING | ||||
| Description | Ardour crashes if a plugin defines an lv2:Parameter of type atom:String in its *.ttl. | ||||
| Steps To Reproduce | Define an lv2:Parameter of type atom:String in plugin's *.ttl and Ardour will crash when trying to build the general UI. esp:sc_synth_name_0 a lv2:Parameter ; rdfs:label "Synth Name 0" ; rdfs:range atom:String . [...] patch:writable esp:sc_synth_name_0 ; [...] | ||||
| Additional Information | Patch attached: Add checks to only handle supported variant types in 'build_control_ui'. | ||||
| Tags | No tags attached. | ||||
|
|
0001-Fix-crash-with-lv2-Parameter-of-Variant-STRING.patch (1,466 bytes)
From faea223b5c610bb7bf6f8a087e05e8f4c545e3b8 Mon Sep 17 00:00:00 2001
From: Hanspeter Portner <dev@open-music-kontrollers.ch>
Date: Sat, 19 Mar 2016 20:14:50 +0100
Subject: [PATCH] Fix crash with lv2:Parameter of Variant:STRING
Add checks for supported variant types in 'build_control_ui'.
---
gtk2_ardour/generic_pluginui.cc | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index ef2de43..1990d38 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -685,6 +685,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
return control_ui;
}
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE) {
+
+ /* unsupported variant */
+ return control_ui;
+ }
+
/* create the controller */
if (mcontrol) {
@@ -739,6 +746,14 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else if (!is_input) {
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
+ desc.datatype != Variant::BOOL) {
+
+ /* unsupported variant */
+ return control_ui;
+ }
+
control_ui->display = manage (new EventBox);
control_ui->display->set_name ("ParameterValueDisplay");
--
2.7.3
|
|
|
update: still crashing in 5.5 |
|
|
Any chance you could generate an updated version of this patch? I'd like (finally) apply it ... |
|
|
0001-Add-checks-for-supported-variant-types.patch (1,522 bytes)
From 325cee4121343b11e6f1c16dad2058d5ec26ee06 Mon Sep 17 00:00:00 2001
From: Hanspeter Portner <dev@open-music-kontrollers.ch>
Date: Tue, 20 Dec 2016 09:12:38 +0100
Subject: [PATCH] Add checks for supported variant types
Add checks for supported variant types in 'build_control_ui'.
---
gtk2_ardour/generic_pluginui.cc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 066aa95fa..d5b3a5f89 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -702,6 +702,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
return control_ui;
}
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
+ desc.datatype != Variant::BOOL) {
+ /* unsupported variant type */
+ return control_ui;
+ }
+
assert(mcontrol);
/* See if there any named values for our input value */
@@ -864,6 +871,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else {
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
+ desc.datatype != Variant::BOOL) {
+ /* unsupported variant type */
+ return control_ui;
+ }
+
control_ui->display = manage (new EventBox);
control_ui->display->set_name ("ParameterValueDisplay");
--
2.11.0
|
|
|
Updated patch attached. http://open-music-kontrollers.ch/lv2/espressivo#sc_out may be used as testing case. [1] https://dl.open-music-kontrollers.ch/espressivo.lv2/unstable/ |
|
|
committed as 00ed7c81d32 thanks! |
|
|
This patch breaks generic GUIs for plugins across more than just LV2. I have reverted it in master. |
|
|
0001-Add-checks-for-supported-variant-types-2nd-try.patch (1,605 bytes)
From 1bfab7b1fa2d692137f25d45aa0827636dc20743 Mon Sep 17 00:00:00 2001
From: Hanspeter Portner <dev@open-music-kontrollers.ch>
Date: Tue, 20 Dec 2016 09:12:38 +0100
Subject: [PATCH] Add checks for supported variant types, 2nd try
Add checks for supported variant types in 'build_control_ui'.
---
gtk2_ardour/generic_pluginui.cc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 066aa95fa..611a3c81a 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -702,6 +702,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
return control_ui;
}
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
+ desc.datatype != Variant::BOOL && desc.datatype != Variant::NOTHING) {
+ /* unsupported variant type */
+ return control_ui;
+ }
+
assert(mcontrol);
/* See if there any named values for our input value */
@@ -864,6 +871,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else {
+ if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
+ desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
+ desc.datatype != Variant::BOOL && desc.datatype != Variant::NOTHING) {
+ /* unsupported variant type */
+ return control_ui;
+ }
+
control_ui->display = manage (new EventBox);
control_ui->display->set_name ("ParameterValueDisplay");
--
2.11.0
|
|
|
2nd try. I somehow missed that control ports are of type Variant::NOTHING, I wrongly assumed they were of type Variant::FLOAT. |
|
|
seems fixed, sorry, totally forgot about it. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-03-19 19:23 | ventosus | New Issue | |
| 2016-03-19 19:23 | ventosus | File Added: 0001-Fix-crash-with-lv2-Parameter-of-Variant-STRING.patch | |
| 2016-12-09 13:18 | ventosus | Note Added: 0019134 | |
| 2016-12-19 23:02 | paul | Note Added: 0019187 | |
| 2016-12-20 08:31 | ventosus | File Added: 0001-Add-checks-for-supported-variant-types.patch | |
| 2016-12-20 08:39 | ventosus | Note Added: 0019193 | |
| 2016-12-20 09:08 | paul | Note Added: 0019194 | |
| 2016-12-20 09:08 | paul | Status | new => resolved |
| 2016-12-20 09:08 | paul | Resolution | open => fixed |
| 2016-12-20 09:08 | paul | Assigned To | => paul |
| 2016-12-20 13:01 | paul | Note Added: 0019197 | |
| 2016-12-20 13:01 | paul | Status | resolved => feedback |
| 2016-12-20 13:01 | paul | Resolution | fixed => reopened |
| 2016-12-20 18:08 | ventosus | File Added: 0001-Add-checks-for-supported-variant-types-2nd-try.patch | |
| 2016-12-20 18:10 | ventosus | Note Added: 0019203 | |
| 2016-12-20 18:10 | ventosus | Status | feedback => assigned |
| 2020-09-28 16:08 | ventosus | Status | assigned => closed |
| 2020-09-28 16:08 | ventosus | Note Added: 0025071 |