GNOME Bugzilla – Bug 698642
g-c-c crashes with SIGSEGV when adding a printer
Last modified: 2013-04-24 13:57:38 UTC
Created attachment 242199 [details] gdb gnome-control-center - combined backtrace GNOME Control Center crashes with a segmentation fault when selecting a printer from the list of available printers and clicking on "Add". Sometimes the crash occurs in magazine_chain_pop_head, sometimes it's g_slist_copy_deep. A gdb backtrace with both cases is attached. Setup: --- Arch Linux x86_64 glib2 2.36.1-1 gnome-control-center 3.8.1 gtk3 3.8.1-1
Hi Andreas, thank you for this report. Does it crash during addition of a local USB printer or a network printer? What model is it? Regards Marek
(In reply to comment #0) > Created an attachment (id=242199) [details] > gdb gnome-control-center - combined backtrace > > GNOME Control Center crashes with a segmentation fault when selecting a printer > from the list of available printers and clicking on "Add". Sometimes the crash > occurs in magazine_chain_pop_head, sometimes it's g_slist_copy_deep. A gdb > backtrace with both cases is attached. That smells like a memory corruption issues, which would be best debugged by running the application under valgrind. Running: G_SLICE=always-malloc valgrind --tool=memcheck gnome-control-center printers and reproducing the problem should help.
Created attachment 242254 [details] valgrind gnome-control-center printers
Hi, @Marek It crashes during addition of any printer. In my case, I tried both a network printer (Epson Stylus Office BX600FW) and a virtual PDF printer. I have run g-c-c in valgrind as suggested and have attached the log to this report.
Do you have system-config-printer installed? If not, please ask the Arch Linux maintainers to have gnome-control-center depend on it for the Add Printer feature to work correctly.
That was it! Installing system-config-printer solved the crash issues. I have opened a ticket on Arch Linux bug tracking system to add this package as a dependency of gnome-control-center. Thanks for your help everyone.
Thanks Andreas. I'm going to go ahead and close this bug now.
Even then, we shouldn't be crashing.
Created attachment 242316 [details] [review] don't crash without system-config-printer Hi, thank you for the info. The problem is in handling of error during addition of new printer. Attached patch fixes the problem. It also applies to 3.6. Regards Marek
Review of attachment 242316 [details] [review]: Looks good.
Comment on attachment 242316 [details] [review] don't crash without system-config-printer Thank you for the review. I've pushed the patch to gnome-3-6, gnome-3-8 and master.