View Issue Details

IDProjectCategoryView StatusLast Update
0005974ardourbugspublic2014-10-08 17:20
Reporteroswaldm Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0005974: Valgrind reports some issues
DescriptionI had a crash on startup every time I used a certain session (git commit ab22a06ec7cc0027caffe521e7a53fc12379570c), so I did a valgrind session to research the crash.

Finally, it turned out that the crash was inside the Calf Spectrum Analyzer, so it was not Ardours fault. But on the way I also found some small issues, which I fixed:
 - some uninitialised variables used in if's
 - a mismatched delete/free

Nothing fancy, but I thought it might be worth to have them in the repository. I hope this is ok, I attached a patchfile, maybe someone could review it (should be quite quick).
Additional InformationAffected commit: ab22a06ec7cc0027caffe521e7a53fc12379570c
TagsNo tags attached.

Activities

2014-10-03 13:55

 

fixes.patch (1,609 bytes)   
diff --git a/gtk2_ardour/meterbridge.cc b/gtk2_ardour/meterbridge.cc
index 4d2a0c7..65657c3 100644
--- a/gtk2_ardour/meterbridge.cc
+++ b/gtk2_ardour/meterbridge.cc
@@ -408,7 +408,7 @@ Meterbridge::on_scroll()
 	ARDOUR::MeterType mt_right = _mt_right;
 
 	for (unsigned int i = 0; i < _metrics.size(); ++i) {
-		int sx, dx, dy;
+		int sx, dx = 0, dy = 0;
 		int mm = _metrics[i]->get_metric_mode();
 		sx = (mm & 2) ? _metrics[i]->get_width() : 0;
 
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index cb72162..d004d08 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -99,6 +99,7 @@ static const uint32_t midi_port_color = 0x960909FF; //Red
 ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processor> p, Width w)
 	: _button (ArdourButton::led_default_elements)
 	, _position (PreFader)
+	, _position_num(0)
 	, _parent (parent)
 	, _processor (p)
 	, _width (w)
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 82564eb..507d6fe 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -81,6 +81,7 @@ AudioEngine::AudioEngine ()
 	, _latency_flush_frames (0)
 	, _latency_signal_latency (0)
 	, _stopped_for_latency (false)
+	, _started_for_latency (false)
 	, _in_destructor (false)
 {
 	g_atomic_int_set (&m_meter_exit, 0);
diff --git a/libs/midi++2/parser.cc b/libs/midi++2/parser.cc
index 2f6b508..f707925 100644
--- a/libs/midi++2/parser.cc
+++ b/libs/midi++2/parser.cc
@@ -132,7 +132,7 @@ Parser::Parser ()
 Parser::~Parser ()
 
 {
-	delete msgbuf;
+	free(msgbuf);
 }
 
 void
fixes.patch (1,609 bytes)   

x42

2014-10-08 17:20

administrator   ~0015911

rebased and applied as 3.5-3263-gaac3ca5
(https://github.com/Ardour/ardour/commit/aac3ca5521)
Thanks.

Issue History

Date Modified Username Field Change
2014-10-03 13:55 oswaldm New Issue
2014-10-03 13:55 oswaldm File Added: fixes.patch
2014-10-08 17:20 x42 Note Added: 0015911
2014-10-08 17:20 x42 Status new => closed
2014-10-08 17:20 x42 Resolution open => fixed