diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-03-23 08:28:08 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-03-23 08:28:08 +0000 |
commit | c4392283071bdb6a91f4acee959971a530250973 (patch) | |
tree | 5dd1dde7d433d5847d2bd54b2f52e471e9cba64b /media-sound/pavucontrol | |
parent | old (diff) | |
download | historical-c4392283071bdb6a91f4acee959971a530250973.tar.gz historical-c4392283071bdb6a91f4acee959971a530250973.tar.bz2 historical-c4392283071bdb6a91f4acee959971a530250973.zip |
Fix segmentation fault on startup, bug #530170. https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/73 by jgeboski, thanks a lot.
Package-Manager: portage-2.2.18/cvs/Linux x86_64
RepoMan-Options: --force
Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'media-sound/pavucontrol')
-rw-r--r-- | media-sound/pavucontrol/ChangeLog | 12 | ||||
-rw-r--r-- | media-sound/pavucontrol/Manifest | 33 | ||||
-rw-r--r-- | media-sound/pavucontrol/files/pavucontrol-2.0-fix-startup-crashes.patch | 188 | ||||
-rw-r--r-- | media-sound/pavucontrol/pavucontrol-2.0-r1.ebuild (renamed from media-sound/pavucontrol/pavucontrol-2.0.ebuild) | 11 |
4 files changed, 225 insertions, 19 deletions
diff --git a/media-sound/pavucontrol/ChangeLog b/media-sound/pavucontrol/ChangeLog index 8708653bf5dc..c421da1e5331 100644 --- a/media-sound/pavucontrol/ChangeLog +++ b/media-sound/pavucontrol/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/pavucontrol -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pavucontrol/ChangeLog,v 1.45 2014/08/03 18:32:51 ago Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pavucontrol/ChangeLog,v 1.46 2015/03/23 08:28:06 mgorny Exp $ + +*pavucontrol-2.0-r1 (23 Mar 2015) + + 23 Mar 2015; Michał Górny <mgorny@gentoo.org> + +files/pavucontrol-2.0-fix-startup-crashes.patch, +pavucontrol-2.0-r1.ebuild, + -pavucontrol-2.0.ebuild: + Fix segmentation fault on startup, bug #530170. https://github.com/gentoo + /gentoo-portage-rsync-mirror/pull/73 by jgeboski, thanks a lot. 03 Aug 2014; Agostino Sarubbo <ago@gentoo.org> pavucontrol-2.0.ebuild: Stable for ppc, wrt bug #501702 diff --git a/media-sound/pavucontrol/Manifest b/media-sound/pavucontrol/Manifest index af14c6743091..3093edf89429 100644 --- a/media-sound/pavucontrol/Manifest +++ b/media-sound/pavucontrol/Manifest @@ -1,26 +1,29 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX pavucontrol-2.0-fix-startup-crashes.patch 7437 SHA256 7502d564db65c83b4def1bb59c4cc143f615cb96da36e84a3d18604df1b90467 SHA512 f5cfdc8731867bcda61a38ccd30a91b2dc3e28106bae7300254957e6e1f8fd8806322c9bd90b7bd2f269aa6190203c1b9f545c18bd5b3f11c3f2d6983f114aac WHIRLPOOL cd6eaf1e3e0dc57e1db5326a148e517c08fe7fd2e379b8647cbfffc341f33c8ae2d66528ecd75d2d55dc2dd3b8d54e50b97dbf854849021c54c66ceee25197aa DIST pavucontrol-1.0.tar.xz 179596 SHA256 3dbe2865b6e3a195a8951967d9234f62cd254c30b08bdea1ecf8997b58f68cde SHA512 ff17e452426ff11da9a3215232b4742c88dd84ea3d2f55f8e6e6459f0edbe1323ad4ee8a3403db9a22a72eadae60baa6ecabfa502c005fde4c92ae3bf4aac007 WHIRLPOOL 07f32ee76b44f290eb6ffbf0bf4f9419e3bc26efbef2c54fb0a711d492a0de79300d84181c8fae0f8ada5111931464d199e8b4d9deccd64ee721894a44f7cc0a DIST pavucontrol-2.0.tar.xz 151560 SHA256 22f29dd81b4a1a34ec7bffe9b027aff2a37fc76ccded4539d43a8c126a39470b SHA512 2b5f83f79cf6d7ce94bd836278274acb09824af389f5a7ad7d3977db743d8f9c5def78d8e9dea901a7e05355cfebb060f513cf01997baf546fd2dd2ada0513b1 WHIRLPOOL f85b60363ea30aee976e4e704bddf607b4e18ea9f9041d63acd0dc36183e103435f37c70e3b55b6327b7b1c7291c898b8167742cbcc7c47ebcd83a10f790d33c EBUILD pavucontrol-1.0.ebuild 953 SHA256 75fa8a3e18e202a45459fb2dd11912ee602ddd2bed608e67188718f80c5ea9b5 SHA512 b862ba116873d03f66bb09441044a234cc62052900866b6dba2f89e4819990c38f1db35f1b4d44ba542c145dd823efe52e1e222f24027ba75b6f63f4e716da06 WHIRLPOOL b4f89195768dbd1bf659ab682f02bd3545854527d2621737eee6b11e0eda118e4a58daeb7779e1f04b5e655f8ed06c04cd463e61dcf7ef7453bf32cfe5ce0d03 -EBUILD pavucontrol-2.0.ebuild 934 SHA256 46fb38480f29c48b850ae953be814fdd4e26cc5dd6389ec5ffef493d3578c04f SHA512 97c8242405e3fb65e8ed93e8a3472d4d7906cf169eac18f3c7c3d705ca5a97cfb8d3b6f461d21cda7b1a63a51073176a47f5f92feaf64b287d02db155c78daef WHIRLPOOL 2c7150650d30bf987b502b09ed15670d29490944dc9d923fa3edc0459e426281bc58b3827068309d0414e68a403b04425dfd0cf6da706ef24f054845a67c6281 -MISC ChangeLog 6773 SHA256 bc031a0a9b9bdf50fc2b1b67a75e6aae1b754049056de385d1a033e3f53220a2 SHA512 dbb661fc8ccc2dc07663d5c8b3c35d5bcc41ff9ceb2d58ae5d25d0086aa225303495f773de5a7744a40a9b844059815a7a7cd3a824a49ff7430ded2f652cca9a WHIRLPOOL 0acb5c91ad79e3c369638d60bf55fa7ac682ef2f64de23da8d7fcde0c22ec39a6e14339a38df49b086327480d6c6e2380d70c06d7139fe2ab8fe5091f7201bd7 +EBUILD pavucontrol-2.0-r1.ebuild 1064 SHA256 3a017c70b2783ea33ac8b49bb5357c279b09e1b993a814568e38e1e6db22743d SHA512 89577c2e3f919df0492c23e6332e9ca5f1c2d6ed265c8dd6d24557bbdb040d737a3b5d53e51fe1179359dd7867508f98de49009852efc5d268e7390aa3f355bc WHIRLPOOL 530c3f01c26e551457b9504ec594e612e87bb7c75f8d8f294f68c386996619127ba090866da2faed6fbe079d670c0d600c241db5982daacc76ba2ddb32b20643 +MISC ChangeLog 7111 SHA256 89fed9db2e62b9df7f6257f7b961decdbfe4871b3f0940d451ea1c2592ccd8db SHA512 e25abb794fb18d7fb54f5e8a5b468336bca0a51853f455165c75f8bfbc16e3caf09dbb2d035258f6c4a083a61bf451d581e73782fe994e8d9786bb02b6b6d7ae WHIRLPOOL 2837aee2221b3b7611341ab5b83c26b99c7af1bec1bfa82d317f4ac1ffe6bb3c6888d96b2fbe85f7c6d1330bca6d5b2d65c96815fb49983191aa640d96ca2abc MISC metadata.xml 160 SHA256 6bafe4a5c7b42309f124ebc2a9d78ebe5379aec4dcdc88c0bda2ab79c9851a6b SHA512 f00066790833ce0ac73de2a96f22bc5ba7b9440a8f73749e2ab52f85038a05d3f768fe6ad59b15430b39b3c36163ae60b5e32d0c323326bb9427529c365549b9 WHIRLPOOL 0e3afa7015a86fdd97bcf0aa4d3b0063e87e34fffeb907b1c7c25c3b662849fefa7e45330d5aa697c7d65b24647d0ecefdfeb6b83b27645c12f2afb2c21be423 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJT3oBUAAoJELp701BxlEWftVcP/0WnLAC0K5t5PK6REIuskW3C -BPRXs5dvUlG1Rorm8J6Nxmo3Vd/9LNIdr3EX8rwjvfTCCV25PqHkz9Emp2lc2Ajz -eZV2+Xv4xNAZNjrza02miTdyXiTp+W2NaA1NfuKZWp1D8Y5Sjk1mlqKUbkfjTX4A -SLzrgsiBP85278OEEn5XWFl3dGyoo8tBuTpNv/RGcoa68p66x76phDN1rzJAgQ+x -v9+ZdjzkSLXaqpHeL5pc1ohpDyTnCDZlk1jtP1qJfjHvkKCxfGDaF95Hr1vuVL34 -VFyuJwEGMWv2HJE7G8Skgm3Z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v1wp2lWqv82MD52q5qBFhZb+aqfsoQmzDf+3pfCg50mD +TClCZyRntNjuBqpQAtulTFMLsJO+k/HpWdMHY5bm1tNaxEmucM6umHwpF4KSttCJ +ha+yYlL7n/+5FPHqWIg+Xg4H2cAHnv3SyxCOSyQnW4vhhlvKgHg6QaVHb8Hs4PMk +vPBev5AE5wmhqWXti7bY +=gvtF -----END PGP SIGNATURE----- diff --git a/media-sound/pavucontrol/files/pavucontrol-2.0-fix-startup-crashes.patch b/media-sound/pavucontrol/files/pavucontrol-2.0-fix-startup-crashes.patch new file mode 100644 index 000000000000..0689290b6229 --- /dev/null +++ b/media-sound/pavucontrol/files/pavucontrol-2.0-fix-startup-crashes.patch @@ -0,0 +1,188 @@ +From b2362f2223b1ecc0c92fac9d261d5684f33af06f Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 28 Aug 2014 12:58:05 +0200 +Subject: Reference the widget before returning it from ::create methods + +Widgets (unlike Windows and Dialogs) returned by Gtk::Builder::get_widget* +start owned by the GtkBuilder object, the idea being that they will get +added to a container before the scope of the GtkBuilder object ends, and it +thus automatically gets destroyed. + +But in the various ::create methods in pavucontrol, a pointer to the widget +gets returned, so that it can be added to a cointainer by the caller. +However as soon as the ::create method exits the GtkBuilder object owning +the widget, and thus also the widget gets destroyed, and we end up returning +free-ed memory. + +This commit fixes this by making all ::create methods take a reference on +the widget before returning it, and having all the callers unreference the +widget after adding it to a container. + +https://bugs.freedesktop.org/show_bug.cgi?id=83144 +https://bugzilla.redhat.com/show_bug.cgi?id=1133339 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> + +diff --git a/src/cardwidget.cc b/src/cardwidget.cc +index c79ac6c..28c558d 100644 +--- a/src/cardwidget.cc ++++ b/src/cardwidget.cc +@@ -45,6 +45,7 @@ CardWidget* CardWidget::create() { + CardWidget* w; + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "cardWidget"); + x->get_widget_derived("cardWidget", w); ++ w->reference(); + return w; + } + +diff --git a/src/channelwidget.cc b/src/channelwidget.cc +index 6f59de2..fe94c11 100644 +--- a/src/channelwidget.cc ++++ b/src/channelwidget.cc +@@ -53,6 +53,7 @@ ChannelWidget* ChannelWidget::create() { + x->add_from_file(GLADE_FILE, "adjustment1"); + x->add_from_file(GLADE_FILE, "channelWidget"); + x->get_widget_derived("channelWidget", w); ++ w->reference(); + return w; + } + +diff --git a/src/devicewidget.cc b/src/devicewidget.cc +index 1a148ee..813780f 100644 +--- a/src/devicewidget.cc ++++ b/src/devicewidget.cc +@@ -89,6 +89,7 @@ void DeviceWidget::setChannelMap(const pa_channel_map &m, bool can_decibel) { + snprintf(text, sizeof(text), "<b>%s</b>", pa_channel_position_to_pretty_string(m.map[i])); + cw->channelLabel->set_markup(text); + channelsVBox->pack_start(*cw, false, false, 0); ++ cw->unreference(); + } + channelWidgets[m.channels-1]->last = true; + +diff --git a/src/mainwindow.cc b/src/mainwindow.cc +index 5a42318..5d205fb 100644 +--- a/src/mainwindow.cc ++++ b/src/mainwindow.cc +@@ -300,6 +300,7 @@ void MainWindow::updateCard(const pa_card_info &info) { + else { + cardWidgets[info.index] = w = CardWidget::create(); + cardsVBox->pack_start(*w, false, false, 0); ++ w->unreference(); + w->index = info.index; + is_new = true; + } +@@ -416,6 +417,7 @@ bool MainWindow::updateSink(const pa_sink_info &info) { + sinkWidgets[info.index] = w = SinkWidget::create(this); + w->setChannelMap(info.channel_map, !!(info.flags & PA_SINK_DECIBEL_VOLUME)); + sinksVBox->pack_start(*w, false, false, 0); ++ w->unreference(); + w->index = info.index; + w->monitor_index = info.monitor_source; + is_new = true; +@@ -570,6 +572,7 @@ void MainWindow::updateSource(const pa_source_info &info) { + sourceWidgets[info.index] = w = SourceWidget::create(this); + w->setChannelMap(info.channel_map, !!(info.flags & PA_SOURCE_DECIBEL_VOLUME)); + sourcesVBox->pack_start(*w, false, false, 0); ++ w->unreference(); + w->index = info.index; + is_new = true; + +@@ -686,6 +689,7 @@ void MainWindow::updateSinkInput(const pa_sink_input_info &info) { + sinkInputWidgets[info.index] = w = SinkInputWidget::create(this); + w->setChannelMap(info.channel_map, true); + streamsVBox->pack_start(*w, false, false, 0); ++ w->unreference(); + w->index = info.index; + w->clientIndex = info.client; + is_new = true; +@@ -743,6 +747,7 @@ void MainWindow::updateSourceOutput(const pa_source_output_info &info) { + w->setChannelMap(info.channel_map, true); + #endif + recsVBox->pack_start(*w, false, false, 0); ++ w->unreference(); + w->index = info.index; + w->clientIndex = info.client; + is_new = true; +@@ -838,6 +843,7 @@ bool MainWindow::createEventRoleWidget() { + + eventRoleWidget = RoleWidget::create(); + streamsVBox->pack_start(*eventRoleWidget, false, false, 0); ++ eventRoleWidget->unreference(); + eventRoleWidget->role = "sink-input-by-media-role:event"; + eventRoleWidget->setChannelMap(cm, true); + +diff --git a/src/rolewidget.cc b/src/rolewidget.cc +index fd3196c..db07f92 100644 +--- a/src/rolewidget.cc ++++ b/src/rolewidget.cc +@@ -40,6 +40,7 @@ RoleWidget* RoleWidget::create() { + RoleWidget* w; + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget"); + x->get_widget_derived("streamWidget", w); ++ w->reference(); + return w; + } + +diff --git a/src/sinkinputwidget.cc b/src/sinkinputwidget.cc +index b88b718..5a0ba39 100644 +--- a/src/sinkinputwidget.cc ++++ b/src/sinkinputwidget.cc +@@ -43,6 +43,7 @@ SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) { + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget"); + x->get_widget_derived("streamWidget", w); + w->init(mainWindow); ++ w->reference(); + return w; + } + +diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc +index 7f4902c..f682cf2 100644 +--- a/src/sinkwidget.cc ++++ b/src/sinkwidget.cc +@@ -82,6 +82,7 @@ SinkWidget* SinkWidget::create(MainWindow* mainWindow) { + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget"); + x->get_widget_derived("deviceWidget", w); + w->init(mainWindow, "sink"); ++ w->reference(); + return w; + } + +diff --git a/src/sourceoutputwidget.cc b/src/sourceoutputwidget.cc +index 827c5a8..4d915b0 100644 +--- a/src/sourceoutputwidget.cc ++++ b/src/sourceoutputwidget.cc +@@ -49,6 +49,7 @@ SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) { + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget"); + x->get_widget_derived("streamWidget", w); + w->init(mainWindow); ++ w->reference(); + return w; + } + +diff --git a/src/sourcewidget.cc b/src/sourcewidget.cc +index 5e4ecf0..fde5333 100644 +--- a/src/sourcewidget.cc ++++ b/src/sourcewidget.cc +@@ -35,6 +35,7 @@ SourceWidget* SourceWidget::create(MainWindow* mainWindow) { + Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget"); + x->get_widget_derived("deviceWidget", w); + w->init(mainWindow, "source"); ++ w->reference(); + return w; + } + +diff --git a/src/streamwidget.cc b/src/streamwidget.cc +index 94363ec..e602cce 100644 +--- a/src/streamwidget.cc ++++ b/src/streamwidget.cc +@@ -77,6 +77,7 @@ void StreamWidget::setChannelMap(const pa_channel_map &m, bool can_decibel) { + snprintf(text, sizeof(text), "<b>%s</b>", pa_channel_position_to_pretty_string(m.map[i])); + cw->channelLabel->set_markup(text); + channelsVBox->pack_start(*cw, false, false, 0); ++ cw->unreference(); + } + channelWidgets[m.channels-1]->last = true; + channelWidgets[m.channels-1]->setBaseVolume(PA_VOLUME_NORM); +-- +cgit v0.10.2 + diff --git a/media-sound/pavucontrol/pavucontrol-2.0.ebuild b/media-sound/pavucontrol/pavucontrol-2.0-r1.ebuild index 0898b52542de..28fb116f5a2d 100644 --- a/media-sound/pavucontrol/pavucontrol-2.0.ebuild +++ b/media-sound/pavucontrol/pavucontrol-2.0-r1.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pavucontrol/pavucontrol-2.0.ebuild,v 1.5 2014/08/03 18:32:51 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pavucontrol/pavucontrol-2.0-r1.ebuild,v 1.1 2015/03/23 08:28:06 mgorny Exp $ EAPI=5 +inherit eutils + DESCRIPTION="Pulseaudio Volume Control, GTK based mixer for Pulseaudio" HOMEPAGE="http://freedesktop.org/software/pulseaudio/pavucontrol/" SRC_URI="http://freedesktop.org/software/pulseaudio/${PN}/${P}.tar.xz" @@ -28,6 +30,11 @@ DEPEND="${RDEPEND} ) " +src_prepare() { + # Fix statup crashes (bug #530170) + epatch "${FILESDIR}"/${P}-fix-startup-crashes.patch +} + src_configure() { econf \ --docdir=/usr/share/doc/${PF} \ |