Bug 334159

Summary: kdm crashes when no DesktopNames is set
Product: kdm Reporter: Andrea Scarpino <scarpino>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: grave CC: arthur, cfeck, dilfridge, faure, hrvoje.senjan, martinsteuer, phani00
Priority: NOR    
Version: 4.11.9   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=509158
Latest Commit: Version Fixed In: 4.11.10

Description Andrea Scarpino 2014-04-30 21:14:33 UTC
Seems that KDM cannot run any DE/WM except Plasma, Gnome-Shell, XFCE and LXDE.

I fear this has been caused by http://quickgit.kde.org/?p=kde-workspace.git&a=commit&h=e7ce8adc506068491c8545a1990992267598bd33

See https://bugs.archlinux.org/task/40149 for more. Please ask if you need more info.
Comment 1 Andreas K. Huettel 2014-05-01 21:50:01 UTC
Andrea is right about the code region where the problem occurs, it's indeed in the lines added in above commit.

Program terminated with signal 11, Segmentation fault.                                                                                            
#0  0x000000000040d849 in startClient (pid=pid@entry=0x7ffffe8756a8)                                                                              
    at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/client.c:1813                                                             
1813    /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/client.c: Datei oder Verzeichnis nicht gefunden.                         
(gdb) bt                                                                                                                                          
#0  0x000000000040d849 in startClient (pid=pid@entry=0x7ffffe8756a8)                                                                              
    at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/client.c:1813                                                             
#1  0x0000000000418756 in manageSession () at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/session.c:630
#2  0x0000000000411509 in startDisplayP2 (d=0x1545460) at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/dm.c:1500
#3  0x0000000000416d4f in startServerSuccess () at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/server.c:141
#4  0x0000000000408a13 in mainLoop () at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/dm.c:1289
#5  main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kdm-4.11.9/work/kdm-4.11.9/kdm/backend/dm.c:314
Comment 2 Andreas K. Huettel 2014-05-01 22:08:19 UTC
... and reverting the commit from comment 0 makes the crash go away.
Comment 3 David Faure 2014-05-02 08:10:01 UTC
Oops. Damn C code ;-)

This should fix it: http://www.davidfaure.fr/2014/client.c.diff
Comment 4 David Faure 2014-05-02 08:28:25 UTC
Git commit e1724800ecf3c6a7035dfa7bcaa50b2a8f48688f by David Faure.
Committed on 02/05/2014 at 08:26.
Pushed by dfaure into branch 'KDE/4.11'.

Fix crash when DesktopNames isn't set
FIXED-IN: 4.11.10

M  +7    -5    kdm/backend/client.c

http://commits.kde.org/kde-workspace/e1724800ecf3c6a7035dfa7bcaa50b2a8f48688f
Comment 5 Jekyll Wu 2014-05-17 15:44:58 UTC
*** Bug 334721 has been marked as a duplicate of this bug. ***