Bug 66774 - crash when shutting down without any modules loaded
Summary: crash when shutting down without any modules loaded
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-10 14:13 UTC by Pierre Ossman
Modified: 2017-04-27 06:22 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pierre Ossman 2013-07-10 14:13:43 UTC
If all the modules given fail to load, the daemon will try to shut down and crash when trying to clean up:

E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.
E: [pulseaudio] xmalloc.c: Assertion 'size > 0' failed at pulse/xmalloc.c:62, function pa_xmalloc(). Aborting.

Easily fixed with this patch:

Index: src/pulsecore/module.c
===================================================================
--- src/pulsecore/module.c	(revision 27650)
+++ src/pulsecore/module.c	(working copy)
@@ -217,6 +217,9 @@
     pa_assert(c);
     pa_assert(c->modules);
 
+    if (pa_idxset_isempty(c->modules))
+        return;
+
     /* Unload modules in reverse order by default */
     indices = pa_xnew(uint32_t, pa_idxset_size(c->modules));
     i = 0;


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.