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 349826 - GTK+ produces invalid PDF on amd64
GTK+ produces invalid PDF on amd64
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-08-03 19:02 UTC by Armin Burgmeier
Modified: 2006-08-07 22:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
PDF file generated on amd64 with Font "Sans 12" (8.17 KB, application/pdf)
2006-08-05 20:11 UTC, Armin Burgmeier
Details
gdb backtrace of the failed assertion shown in comment #4 (8.01 KB, application/octet-stream)
2006-08-05 20:21 UTC, Armin Burgmeier
Details

Description Armin Burgmeier 2006-08-03 19:02:13 UTC
When executing test/print-editor on amd64 and printing to PDF, the resulting PDF seems to be sometimes invalid, depending on the selected font. The default "Sans 12" leads to a PDF that evince complains about by printing "Error: failed to load truetype font" to the terminal and only showing an empty page. Same with "Verdana". However, some less-standard fonts like "Rudelsberg" seem to work.

Unfortunately, I have no printer installed on linux, so I cannot test whether really printing the pages works correctly. The problem seems not to appear on 32-bit systems.
Comment 1 Jonathon Jongsma 2006-08-03 19:15:17 UTC
(For reference, this bug report grew out of wrapping the new printing API in gtkmm.  See Bug #347857 for background)
Comment 2 Matthias Clasen 2006-08-05 19:00:00 UTC
Any chance you could attach an example of a "bad" pdf file ?
Comment 3 Armin Burgmeier 2006-08-05 20:11:31 UTC
Created attachment 70276 [details]
PDF file generated on amd64 with Font "Sans 12"

I typed "Foobar" into the editor textview and printed it to PDF using the default font (Sans 12). evince fails to display it.
Comment 4 Armin Burgmeier 2006-08-05 20:18:54 UTC
I also noted that sometimes when trying to print, the test application either runs into an endless loop (CPU jumps to 100%, window does not respond anymore) or terminates with the following message:

lt-print-editor: cairo-array.c:206: _cairo_array_index: Assertion `0 <= index && index < array->num_elements' failed.

However, this behaviour is not reproducible.
Comment 5 Armin Burgmeier 2006-08-05 20:21:46 UTC
Created attachment 70277 [details]
gdb backtrace of the failed assertion shown in comment #4

Managed to get a gdb backtrace of that failed assertion.
Comment 6 Armin Burgmeier 2006-08-05 21:22:11 UTC
I just noticed a known cairo amd64-and-PDF-related problem in the cairo ROADMAP for cairo 1.2.2 (http://gitweb.freedesktop.org/?p=cairo;a=blob;f=ROADMAP#l58) that seems not to be filed in the cairo bugtracker. The referenced mailing list thread is not entirely accessible in the archives (I cannot see the mail content from Carl Worth's mails, but just the PGP signature), but I guess this might be closed if it's really a cairo bug.
Comment 7 Behdad Esfahbod 2006-08-06 05:57:55 UTC
Yes, we plan to track and fix this for the upcoming 1.2.2 release.
Comment 8 Behdad Esfahbod 2006-08-06 20:05:24 UTC
Armin, can you check out the patch in:

  http://lists.freedesktop.org/archives/cairo/2006-August/007550.html

and see if that fixes the problem?  You need the latest cairo from git master to apply that patch.

Thanks,
Comment 9 Armin Burgmeier 2006-08-06 20:47:52 UTC
Yes, the patch works flawlessly.
Comment 10 Jonathon Jongsma 2006-08-07 18:36:47 UTC
I can confirm that the latest version of cairo (which includes the patch) seems to fix this issue for me as well.  I assume we can probably close this bug now.
Comment 11 Behdad Esfahbod 2006-08-07 22:11:43 UTC
Thanks.