View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004776 | ardour | bugs | public | 2012-03-17 11:23 | 2020-04-19 20:16 |
| Reporter | nick | Assigned To | paul | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.0-beta3 | ||||
| Summary | 0004776: Ardour doesn't validate that the symbols specified in lv2 preset ttl files | ||||
| Description | At lv2_plugin.cc:741 there is the following call: set_parameter(_port_indices[lilv_node_as_string(symbol)], lilv_node_as_float(value)); The symbol is read from a ttl preset file. If that file contains reference to a port that doesn't exist then the [] operator on the map will insert that value and return 0, which is almost certainly an invalid port (since it's probably an output port for the plugin). This causes, for example, Calf Monosynth to segfault, as some of its presets contain a reference to "Filter" instead of "filter". While this is a bug with the preset file, Ardour should probably at least validate that the specified port exists in the _port_indices array and simply ignore symbols that are not there. | ||||
| Additional Information | Attached is a simple patch that ignores invalid port symbols. | ||||
| Tags | No tags attached. | ||||
|
2012-03-17 11:23
|
lv2preset.patch (959 bytes)
Index: libs/ardour/lv2_plugin.cc
===================================================================
--- libs/ardour/lv2_plugin.cc (revision 11705)
+++ libs/ardour/lv2_plugin.cc (working copy)
@@ -723,6 +723,8 @@
{
Plugin::load_preset(r);
+ std::map<std::string,uint32_t>::iterator it;
+
LilvNode* lv2_port = lilv_new_uri(_world.world, LILV_NS_LV2 "port");
LilvNode* lv2_symbol = lilv_new_uri(_world.world, LILV_NS_LV2 "symbol");
LilvNode* oldpset_value = lilv_new_uri(_world.world, NS_OLDPSET "value");
@@ -738,8 +740,9 @@
value = get_value(_world.world, port, oldpset_value);
}
if (value && lilv_node_is_float(value)) {
- set_parameter(_port_indices[lilv_node_as_string(symbol)],
- lilv_node_as_float(value));
+ it = _port_indices.find(lilv_node_as_string(symbol));
+ if (it != _port_indices.end())
+ set_parameter(it->second,lilv_node_as_float(value));
}
}
lilv_nodes_free(ports);
|
|
|
committed in rev 11719. thanks! |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-03-17 11:23 | nick | New Issue | |
| 2012-03-17 11:23 | nick | File Added: lv2preset.patch | |
| 2012-03-17 12:29 | paul | cost | => 0.00 |
| 2012-03-17 12:29 | paul | Note Added: 0012946 | |
| 2012-03-17 12:29 | paul | Status | new => resolved |
| 2012-03-17 12:29 | paul | Resolution | open => fixed |
| 2012-03-17 12:29 | paul | Assigned To | => paul |
| 2020-04-19 20:16 | system | Note Added: 0022996 | |
| 2020-04-19 20:16 | system | Status | resolved => closed |