#434 lxsession segfault if desktop environment not specified

closed-fixed
nobody
None
5
2012-12-28
2012-12-18
Paul Donohue
No

lxsession crashes if it is run without the '-e' option to specify the desktop environment:

lxsession[24319]: segfault at 0 ip 00007fac984db6d6 sp 00007fffe89a3f38 error 4 in libc-2.15.so[7fac9839e000+1b5000]

(gdb) where
#0 __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:213
#1 0x000000000041cba9 in launch_autostart_file (kf=0x26c8ca0, desktop_id=<optimized out>,
desktop_file=<optimized out>) at ../xdg-autostart/xdg-autostart.c:198
#2 launch_autostart_file (desktop_id=<optimized out>, desktop_file=<optimized out>, kf=0x26c8ca0)
at ../xdg-autostart/xdg-autostart.c:178
#3 0x00007f2396a50090 in g_hash_table_foreach () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x000000000041cd68 in xdg_autostart (de_name_arg=0x0) at ../xdg-autostart/xdg-autostart.c:309
#5 0x00000000004074ed in lxsession_main_main (args=0x7fffb3173ca8, args_length1=1) at main.c:991
#6 0x00007f239645d76d in __libc_start_main (main=0x406a00 <main>, argc=3, ubp_av=0x7fffb3173ca8,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffb3173c98) at libc-start.c:226
#7 0x0000000000406a49 in _start ()

This happens because main.vala only prints a warning if desktop_environnement is null - it does not actually fall back to "LXDE" like the warning message says it will. The attached patch fixes the problem.

Discussion

  • Paul Donohue
    Paul Donohue
    2012-12-18

    Set desktop_environnement to "LXDE" if it is null.

     
    Attachments
  • gilir
    gilir
    2012-12-27

    Good catch, apply in git, thanks for the patch.

     
  • Paul Donohue
    Paul Donohue
    2012-12-28

    • status: open --> closed-fixed