Bug 31512 - Crash when exporting to pdf
Summary: Crash when exporting to pdf
Status: RESOLVED FIXED
Alias: None
Product: libspectre
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Carlos Garcia Campos
QA Contact: Carlos Garcia Campos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 12:33 UTC by Albert Astals Cid
Modified: 2012-08-07 23:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
the said file (1.19 KB, application/postscript)
2010-11-09 12:34 UTC, Albert Astals Cid
Details
allocate at least 1 page in doc->pages (1.13 KB, patch)
2010-11-24 06:56 UTC, Marek Kasik
Details | Splinter Review

Description Albert Astals Cid 2010-11-09 12:33:34 UTC
Calling spectre_document_save_to_pdf on this document crashes because doc->pages is null spectre_exporter_pdf_do_page
Comment 1 Albert Astals Cid 2010-11-09 12:34:22 UTC
Created attachment 40165 [details]
the said file
Comment 2 Marek Kasik 2010-11-24 06:56:29 UTC
Created attachment 40547 [details] [review]
allocate at least 1 page in doc->pages

I came across the same problem here:
https://bugzilla.redhat.com/show_bug.cgi?id=656426 (together with reproducer and backtrace)

The problem there is that there is no %%Pages: or %%Page: in the eps file. hence it doesn't allocate a page in doc->pages in psscan().

The question is whether to check it in the spectre_exporter_pdf_do_page() or allocate at least 1 page in psscan() (as in the attached patch).

Marek
Comment 3 Carlos Garcia Campos 2010-12-04 07:16:51 UTC
Pushed to git master. Thanks!
Comment 4 Albert Astals Cid 2012-08-07 23:00:22 UTC
Carlos can you release 0.2.7? I got again this crash.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.