Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 277018

Summary: app-misc/workrave-1.9.0 crashes when sound is disabled
Product: Gentoo Linux Reporter: Maik Nijhuis <manyac>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: new nosoundplayer patch

Description Maik Nijhuis 2009-07-08 10:51:04 UTC
Workrave-1.9.0 gives a segmentation fault when it is installed with these USE flags: dbus nls xml -arts -debug -distribution -gnome -kde


Reproducible: Always




After adding debug info and running workrave in gdb, I found the problem. With my USE flags, sound is disabled in workrave, so the 'driver' variable in frontend/common/src/SoundPlayer.cc becomes NULL. However, this pointer is dereferenced in the SoundPlayer::sync_settings() function.

Probably my settings, set by workrave-1.8.5, cause the crash: The settings indicate workrave has to use sound, but since sound is disabled at compile time, initialization crashes. Still, the application shouldn't crash with incorrect settings, it should ignore them.

After adding a simple check at the beginning of the function, I can start workrave again. However, if I set the sound settings to "Use Sound card" or "Use built-in speaker" workrave crashes again. But at least this patch gives me a working workrave, in which I can change the sound setting to "No Sound".
Comment 1 Maik Nijhuis 2009-07-08 10:52:35 UTC
Created attachment 197161 [details, diff]
new nosoundplayer patch
Comment 2 Maik Nijhuis 2009-07-08 12:44:22 UTC
I figured out my settings do not cause the crash. I tried running the unpatched version, with proper settings (sound off), but it still crashes.
Comment 3 Maik Nijhuis 2009-07-08 12:56:53 UTC

*** This bug has been marked as a duplicate of bug 253637 ***