View Issue Details

IDProjectCategoryView StatusLast Update
0004794ardourbugspublic2020-04-19 20:16
Reporternick Assigned Tocth103  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Target Version3.0 
Summary0004794: In L2PluginUI::write_to_ui, the suil instance is not checked to be valid
Descriptionwrite_to_ui can be called from an update_timeout, which can happen after just after a ui is destroyed. If so the suil instance in the LV2PluginUI will be NULL, which causes suil_instance_port_event to segfault.

A simple NULL check seems to fix the problem in my testing, although perhaps this should be caught higher up and the event should never be triggered.

Patch attached.
Additional InformationThe session needs to be playing for this to occur, and I sometimes have to open and close the plugin a few times to trigger it, as it's a race condition on the port write and ui close.
TagsNo tags attached.

Activities

2012-03-27 15:13

 

suil_instance_check.patch (575 bytes)   
Index: gtk2_ardour/lv2_plugin_ui.cc
===================================================================
--- gtk2_ardour/lv2_plugin_ui.cc	(revision 11757)
+++ gtk2_ardour/lv2_plugin_ui.cc	(working copy)
@@ -68,8 +68,9 @@
                          const void* buffer)
 {
 	LV2PluginUI* me = (LV2PluginUI*)controller;
-	suil_instance_port_event((SuilInstance*)me->_inst,
-	                         port_index, buffer_size, format, buffer);
+	if (me->_inst)
+	        suil_instance_port_event((SuilInstance*)me->_inst,
+					 port_index, buffer_size, format, buffer);
 }
 
 void
suil_instance_check.patch (575 bytes)   

cth103

2012-03-27 21:08

administrator   ~0013043

Patch applied to SVN 11764. Thanks!

system

2020-04-19 20:16

developer   ~0023006

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.

Issue History

Date Modified Username Field Change
2012-03-27 15:13 nick New Issue
2012-03-27 15:13 nick File Added: suil_instance_check.patch
2012-03-27 18:03 cth103 cost => 0.00
2012-03-27 18:03 cth103 Target Version => 3.0 beta4
2012-03-27 21:08 cth103 Note Added: 0013043
2012-03-27 21:08 cth103 Status new => resolved
2012-03-27 21:08 cth103 Resolution open => fixed
2012-03-27 21:08 cth103 Assigned To => cth103
2012-05-23 15:08 cth103 Target Version 3.0 beta4 => 3.0
2020-04-19 20:16 system Note Added: 0023006
2020-04-19 20:16 system Status resolved => closed