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 361876 - gedit crashes on zh_CN.GB18030 when print out pdf in a localized directory
gedit crashes on zh_CN.GB18030 when print out pdf in a localized directory
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: general
CVS
Other Solaris
: Normal critical
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2006-10-13 06:14 UTC by Takao Fujiwara
Modified: 2006-11-10 09:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Example file to be tested (3.00 KB, application/x-compressed-tar)
2006-10-13 06:16 UTC, Takao Fujiwara
  Details
Patch for libgnomeprint/gnome-print-job.c (596 bytes, patch)
2006-10-13 06:16 UTC, Takao Fujiwara
accepted-commit_now Details | Review

Description Takao Fujiwara 2006-10-13 06:14:50 UTC
gedit crashes during pdf print because job->priv->num_affines = 0.

To reproduce:
1. Invoke gedit on zh_CN.GB18030
2. Input Ctrl + P and launch the print dialog.
3. choose to print to a pdf file,and choose a directory to save the pdf file which containing multibyte character;
4.click "print" button to generate the pdf file;

the gedit crash

I can reproduce this on Solaris 11 and Fedora Core 5.
It's also related with bug 324150

I'm attaching the patch.
Comment 1 Takao Fujiwara 2006-10-13 06:16:02 UTC
Created attachment 74613 [details]
Example file to be tested
Comment 2 Takao Fujiwara 2006-10-13 06:16:52 UTC
Created attachment 74614 [details] [review]
Patch for libgnomeprint/gnome-print-job.c

Attached the patch.
Comment 3 Jody Goldberg 2006-11-09 14:26:44 UTC
Comment on attachment 74614 [details] [review]
Patch for libgnomeprint/gnome-print-job.c

Good idea.  num_affines is a gint.  Let's use
if (num_affines >= 1)
Comment 4 Kjartan Maraas 2006-11-10 09:06:50 UTC
modified the conditional and commited.