Summary: | Cannot render any .ps or .eps | ||
---|---|---|---|
Product: | libspectre | Reporter: | Daniel Macks <dmacks> |
Component: | general | Assignee: | Carlos Garcia Campos <carlosgc> |
Status: | RESOLVED MOVED | QA Contact: | Carlos Garcia Campos <carlosgc> |
Severity: | blocker | ||
Priority: | medium | CC: | ajacoutot |
Version: | unspecified | ||
Hardware: | PowerPC | ||
OS: | Mac OS X (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Daniel Macks
2008-11-30 18:04:08 UTC
Alright this is ridiculous...4 months with a serious bug and not even a response of where to look or how to help solve it? I upgraded libgs to 8.64 and now spectre-test crashes outright with both .pdf and .ps that look fine in other viewers: Testing libspectre version: 0.2.2 process 15493: spectre_document_load: assertion `document != NULL' failed (spectre-document.c:57) Rendering document Bus error crash.log has: PID: 15408 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000000b Thread 0 Crashed: 0 libspectre.1.dylib 0x00031a9c spectre_presize + 28 (spectre-device.c:72) 1 libgs.8.64.dylib 0x0117ba38 display_open + 296 2 libgs.8.64.dylib 0x012eb8b8 gs_opendevice + 72 3 libgs.8.64.dylib 0x01080fe0 display_set_callback + 240 4 libgs.8.64.dylib 0x0107dcac gs_main_init2 + 428 5 libgs.8.64.dylib 0x01080614 gs_main_init_with_args + 724 6 libspectre.1.dylib 0x000310d4 spectre_gs_run + 20 (spectre-gs.c:190) 7 libspectre.1.dylib 0x00031f4c spectre_device_render + 748 (spectre-device.c:255) 8 libspectre.1.dylib 0x000325cc spectre_page_render + 220 (spectre-page.c:164) 9 libspectre.1.dylib 0x0003084c spectre_document_render_full + 252 (spectre-document.c:338) 10 libspectre.1.dylib 0x000308fc spectre_document_render + 124 (spectre-document.c:355) 11 spectre-test 0x00002b5c main + 188 (spectre-test.c:219) 12 spectre-test 0x000027dc _start + 760 13 spectre-test 0x000024e0 start + 48 (In reply to comment #1) > Alright this is ridiculous...4 months with a serious bug and not even a > response of where to look or how to help solve it? I'm sorry, but I have been quite busy, I have this bug in my TODO list, so I haven't forgotten it. It's not easy to fix since it's not reproducible for me, and I don't have a Mac OSX to try with. > I upgraded libgs to 8.64 and > now spectre-test crashes outright with both .pdf and .ps that look fine in > other viewers: spectre is not supposed to open PDF files, it should crash anyway, though. > Testing libspectre version: 0.2.2 > process 15493: spectre_document_load: assertion `document != NULL' failed > (spectre-document.c:57) > Rendering document > Bus error > > crash.log has: > > PID: 15408 > Thread: 0 > > Exception: EXC_BAD_ACCESS (0x0001) > Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000000b > > Thread 0 Crashed: > 0 libspectre.1.dylib 0x00031a9c spectre_presize + 28 (spectre-device.c:72) > 1 libgs.8.64.dylib 0x0117ba38 display_open + 296 > 2 libgs.8.64.dylib 0x012eb8b8 gs_opendevice + 72 > 3 libgs.8.64.dylib 0x01080fe0 display_set_callback + 240 > 4 libgs.8.64.dylib 0x0107dcac gs_main_init2 + 428 > 5 libgs.8.64.dylib 0x01080614 gs_main_init_with_args + 724 > 6 libspectre.1.dylib 0x000310d4 spectre_gs_run + 20 (spectre-gs.c:190) > 7 libspectre.1.dylib 0x00031f4c spectre_device_render + 748 > (spectre-device.c:255) > 8 libspectre.1.dylib 0x000325cc spectre_page_render + 220 > (spectre-page.c:164) > 9 libspectre.1.dylib 0x0003084c spectre_document_render_full + 252 > (spectre-document.c:338) > 10 libspectre.1.dylib 0x000308fc spectre_document_render + 124 > (spectre-document.c:355) > 11 spectre-test 0x00002b5c main + 188 (spectre-test.c:219) > 12 spectre-test 0x000027dc _start + 760 > 13 spectre-test 0x000024e0 start + 48 > I'll look at it as soon as I find some time. (In reply to comment #2) > > I upgraded libgs to 8.64 and > > now spectre-test crashes outright with both .pdf and .ps that look fine in > > other viewers: > > spectre is not supposed to open PDF files, it should crash anyway, though. hmm, I meant it *shouldn't* crash anyway. > I'll look at it as soon as I find some time. > I'm sorry but I don't know what's the problem. Have you tried rendering ps documents directly with gs? 'gs myfile.ps' renders fine, 'spectre-test myfile.ps' crashes. I tried applying the git patches after 0.2.2, didn't help. I'm on a powerpc machine...will ask my Intel-Mac friends to try it, rule in/out some endianness problem. I'm having the exact same issue under OpenBSD-current (i386). $ echo foobar > test $ a2ps test -o test.ps [test (plain): 1 page on 1 sheet] [Total: 1 page on 1 sheet] saved into the file `test.ps' $ ./spectre-test test.ps Testing libspectre version: 0.2.2 process 19062: spectre_document_load: assertion `document != NULL' failed (spectre-document.c:57) Rendering document fatal internal error -100Error rendering document: render error Rendering document at 2x fatal internal error -100Error rendering document at 2x: render error GPL Ghostscript 8.63: **** Could not open the file (null)/output.pdf . fatal internal error -100Error exporting document as pdf: exporter error Error exporting document as ps: exporter error Error saving document as (null)/document-copy.ps: save error GPL Ghostscript 8.63: **** Could not open the file (null)/document-copy.pdf . fatal internal error -100Error saving document as (null)/document-copy.pdf: save error Document format: PS-Adobe-3.0 Postscript language level: 0 Encapsulated PostScript: No Number of pages: 1 Title: test Creator: a2ps version 4.14 For: Antoine Jacoutot Creation date: Sun Aug 16 15:43:03 2009 Document Orientation: Landscape Page 0 Page label: 1 Page size: 595 x 842 Page orientation: Landscape fatal internal error -100Error rendering page 0: render error Rendering page 0 slice 198, 280, 198, 280 fatal internal error -100Error rendering page slice 198, 280, 198, 280: render error Rendering page 0 in a4 page fatal internal error -100Error rendering page in a4 page: render error fatal internal error -100Error rendering page 0 at rotation 0: render error fatal internal error -100Error rendering page 1 at rotation 90: render error fatal internal error -100Error rendering page 2 at rotation 180: render error fatal internal error -100Error rendering page 3 at rotation 270: render error For info, "gs test.ps" works without issue. (In reply to comment #5) I forgot to mention that the error comes from: success = spectre_gs_run (gs, n_args, args); <...> if (!success) { spectre_gs_free (gs); return SPECTRE_STATUS_RENDER_ERROR; } (line 255 of libspectre/spectre-device.c) Note that it is a major issue since no PS file can be render on neither MacOS X nor OpenBSD :-( So I guess running libspectre on something else than Linux on x86 is of no interest... I'm looking forward to seeing this bug fixed, but I don't have the hw/sw required to reproduce the issue. Any help is greatly appreciated. (In reply to comment #8) > I'm looking forward to seeing this bug fixed, but I don't have the hw/sw > required to reproduce the issue. Any help is greatly appreciated. Commit 077182e1fe53131d7c88cc1a0f278403e60bdc32 fixed my issue under OpenBSD, thank you very very much! On a side note, I wonder if adding a check to make sure ghostcript was compiled with the "display" device wouldn't be nice... since I got trapped by this ;-) Daniel, could you check whether it is fixed for you too? if not, could you check your ghostscript is compiled with display device support? Applying that patch does not help: same crash (bus error with same trace) as in Comment #1. Oops, hit submit before finished responding:( My libgs-8.64 is ./configured with --disable-gtk --disable-cups. I really don't know anything about gs...is there something I have to do to enable support for the "display" device, or some way I can check that it's actually built into my lib? (In reply to comment #12) > Oops, hit submit before finished responding:( > > My libgs-8.64 is ./configured with --disable-gtk --disable-cups. I really don't > know anything about gs...is there something I have to do to enable support for > the "display" device, or some way I can check that it's actually built into my > lib? Yes, you need to configure with --enable-gtk If you want to know which devices are compiled in, yo can run: gs -? Daniel, is this still reproducible for you? did you check you have gs built with display device enabled? (Not sure where my response went.) Even with --enable-gtk, I still get the same results. For some reason, display device is forced disabled (explicitly, without explanation in the configure scripts) on darwin regardless of any other settings. I have no idea why (there is no comment anywhere *why* building display support is disabled even if x11 is available). I tried patching to un-disable it and it still did not give a display device--I'll follow up with gs upstream. But for now, this makes spectre hopeless on darwin:( Will update if I learn anything further or it gets fixed. Mean time, Comment #9 has an important idea: checking for this situation or at least not-crashing now that it's recognizeable failure mode. Best would be a runtime error message (since sys-admin could disable this feature in gs not realizing its importance) about gs not being able to be launched. libspectre-0.2.7's spectre-test and parser-test seem to work now on OS X 10.6 (intel; Apple discontinued powerpc hardware a few years ago). One major help was browsing the test/*.c sources to realize that the programs needed a second parameter--is a directory where intermediate and final output files go. Without that, there are lots of write errors and actions skipped, but no indication that it is a usage error rather than an actual testing problem. Would be useful if their main() checked that argv[2] is a writable directory. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/libspectre/libspectre/issues/29. |
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.