User-Agent: Mozilla/5.0 (X11; U; Linux i686; fi; rv:1.9b2) Gecko/2007121016 Firefox/3.0b2 Build Identifier: ~ $ gdb xfprint4 GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/bin/xfprint4 [Thread debugging using libthread_db enabled] [New Thread 0xb733d8d0 (LWP 19640)] DBG[printing-system.c:79] load_printing_system(): trying to load printing system module /usr/lib/xfce4/xfprint-plugins/cups_plugin.so DBG[printing-system.c:171] load_printing_system(): printing system module loaded DBG[main.c:167] main(): Printing file: /home/jarda/00_default_vhost.conf Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb733d8d0 (LWP 19640)] 0x08050fa3 in print_dialog_set_printing_system (dlg=0x8199000, ps=0x807a000) at print_dialog.c:409 409 print_dialog.c: No such file or directory. in print_dialog.c (gdb) bt #0 0x08050fa3 in print_dialog_set_printing_system (dlg=0x8199000, ps=0x807a000) at print_dialog.c:409 #1 0x0804fac0 in print_dialog_set_property (object=0x8199000, prop_id=1, value=0xbfc7ba78, pspec=0x81293b8) at print_dialog.c:148 #2 0xb7591232 in object_set_property (object=0x8199000, pspec=0x81293b8, value=0x819fa34, nqueue=0x8190ba0) at gobject.c:697 #3 0xb7591749 in g_object_constructor (type=135874824, n_construct_properties=2, construct_params=0x8084cf0) at gobject.c:1060 #4 0xb7590e45 in IA__g_object_newv (object_type=135874824, n_parameters=1, parameters=0x819fa30) at gobject.c:937 #5 0xb759167d in IA__g_object_new_valist (object_type=135874824, first_property_name=0x8055f3b "printing-system", var_args=0xbfc7bc80 "\230�ǿ�#;�`�I���I�����@�\a\b��ǿ\023�\004\b") at gobject.c:1027 #6 0xb7590993 in IA__g_object_new (object_type=135874824, first_property_name=0x8055f3b "printing-system") at gobject.c:795 #7 0x08051d61 in print_dialog_new (ps=0x807a000, input_file=0x815c720 "/home/jarda/00_default_vhost.conf") at print_dialog.c:662 #8 0x0804ed13 in main (argc=1, argv=0xbfc7be54) at main.c:169 Reproducible: Always Steps to Reproduce: 1. no default printer set in cups 2. run xfprint4 and choose a text file to print 3. see the program segfault Running gentoo.
Created attachment 1500 should fix the bug (untested) If I understand the code correctly it tries to pre-select the default printer, which fails because the default printer structure points to NULL if there is no default printer
Your patch was correct, it has been applied with revision 26588
*** Bug 3214 has been marked as a duplicate of this bug. ***
*** Bug 4044 has been marked as a duplicate of this bug. ***