After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 390042 - Custom paper size crashes GtkPrint/cups
Custom paper size crashes GtkPrint/cups
Status: RESOLVED DUPLICATE of bug 359537
Product: gtk+
Classification: Platform
Component: Printing
2.10.x
Other Linux
: Normal blocker
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-12-27 15:57 UTC by albrecht.dress
Modified: 2006-12-27 17:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description albrecht.dress 2006-12-27 15:57:04 UTC
I added GtkPrint support to balsa and get a reproducible crash in the cups backend when a custom paper size is selected/set.

To reproduce
- use the code snipplet below;
- in the page setup dialogue, create a custom paper size, e.g. "A4 with my margins" and select it;
- the application will crash in gtk_print_operation_run() with the following backtrace:

Program received signal SIGSEGV, Segmentation fault.

Thread 805560960 (LWP 9832)

  • #0 strncpy
    from /lib/tls/libc.so.6
  • #1 cups_printer_get_options
    at gtkprintbackendcups.c line 2206


The application does /not/ crash if a standard paper size (e.g. A4) is used.


System Details:
===============
gnome 2.16.2.1 (garnome)
gtk+ 2.10.6
cups 1.2.7
libc 2.3.4


Reproduce:
==========
The following code snipplet will crash in gtk_print_operation_run() if a custom paper size is selected:

<snip>
GtkPageSetup *page_setup;
GtkPrintSettings *settings = gtk_print_settings_new();
GtkPrintOperation *print;

page_setup = gtk_print_run_page_setup_dialog(parent, page_setup, settings);
print = gtk_print_operation_new();
gtk_print_operation_set_n_pages(print, 1);
gtk_print_operation_set_unit(print, GTK_UNIT_POINTS);
gtk_print_operation_set_use_full_page(print, FALSE);
gtk_print_operation_set_print_settings(print, settings);
gtk_print_operation_set_default_page_setup(print, page_setup);
gtk_print_operation_run(print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, NULL);
</snip>
Comment 1 Christian Persch 2006-12-27 17:44:59 UTC

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