Bug 31512

Summary: Crash when exporting to pdf
Product: libspectre Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: Carlos Garcia Campos <carlosgc>
Status: RESOLVED FIXED QA Contact: Carlos Garcia Campos <carlosgc>
Severity: normal    
Priority: medium CC: mkasik
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: the said file
allocate at least 1 page in doc->pages

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.