Discussion:
[gs-bugs] [Bug 698711] - Ghostscript - Converting this PDF to PNG fails for big resolutions
b***@artifex.com
2017-10-29 21:34:35 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698711

Bug ID: 698711
Summary: Converting this PDF to PNG fails for big resolutions
Product: Ghostscript
Version: 9.22
Hardware: PC
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: Images
Assignee: ***@artifex.com
Reporter: ***@bitm.sg
QA Contact: gs-***@ghostscript.com
Word Size: ---

Created attachment 14428
--> http://bugs.ghostscript.com/attachment.cgi?id=14428&action=edit
Problematic PDF

Command: gswin64c.exe -sDEVICE=pngalpha -sOutputFile=test.png -dBATCH -dNOPAUSE
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r600 grid.pdf

This command fails silently and reports this Error in the Windows Event Log:


=====
Faulting application name: gswin64c.exe, version: 0.0.0.0, time stamp:
0x59d4fcd4
Faulting module name: gsdll64.dll, version: 0.0.0.0, time stamp: 0x59d4fcd2
Exception code: 0xc0000005
Fault offset: 0x000000000031ccd4
Faulting process id: 0xa5c
Faulting application start time: 0x01d350d6a2cffa87
Faulting application path: C:\temp\gswin64c.exe
Faulting module path: C:\temp\gsdll64.dll
Report Id: 07dc3307-bcca-11e7-ba58-00ac6834e9fb
=====


If you go for a slightly lower resolution (-r500) it works. I had no problem
rendering a different PDF document into PNG files that are over 100000x100000
pixels (-r3000) but this PDF just fails silently.

The problem is not limited to png but also (at least) happens with the jpeg
device.

Watching in Task Manager shows no disk space or memory shortage. The Error is
present in 9.20 too.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-30 08:36:40 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698711

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |WORKSFORME

--- Comment #1 from Ken Sharp <***@artifex.com> ---
(In reply to ghostscript from comment #0)
Created attachment 14428 [details]
Problematic PDF
Command: gswin64c.exe -sDEVICE=pngalpha -sOutputFile=test.png -dBATCH
-dNOPAUSE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r600 grid.pdf
=====
0x59d4fcd4
Faulting module name: gsdll64.dll, version: 0.0.0.0, time stamp: 0x59d4fcd2
Exception code: 0xc0000005
Fault offset: 0x000000000031ccd4
Faulting process id: 0xa5c
Faulting application start time: 0x01d350d6a2cffa87
Faulting application path: C:\temp\gswin64c.exe
Faulting module path: C:\temp\gsdll64.dll
Report Id: 07dc3307-bcca-11e7-ba58-00ac6834e9fb
=====
This is a Windows crash report, Exception code: 0xc000005 is an access
violation; an attempt to read from an invalid memory location.

Ordinarily this would result in a crash dialog on Windows, if it doesn't then
that's because you have configured your system not to do so. If you don't want
that, then you'll need to reconfigure your Windows installation, there's no
possible way for a crashing application to tell you its going to crash.


I've tried the exact command line given, using the release 64-bit 9.22, on a
64-bit Windows 7 installation and the file runs to completion without problem.
It does take a long time, but that's simply because the original file has a
huge media size (63.3x45.6 inches, approximately 1.6x1.1 metres).

I then tried the released 32-bit executable, the current HEAD 64-bit debug
executable and the current HEAD 32-bit debug executable.

All ran to completion without error producing a 50MB PNG file.

This does not necessarily mean there is not a problem in Ghostscript, if there
is an unallocated memory read going on it may be that on a given system that is
from an invalid location, whereas on other systems it is not invalid (merely
incorrect). However lacking a means to reproduce the problem makes it
impossible to fix.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-31 00:24:14 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698711

--- Comment #2 from ***@bitm.sg ---
I can't exactly tell why it is not working either. The 9.22 Version fails on
Windows but on the same machine, the cygwin version (9.19) works fine.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-31 09:19:00 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698711

Chris Liddell (chrisl) <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@artifex.com

--- Comment #3 from Chris Liddell (chrisl) <***@artifex.com> ---
Running this under Linux using valgrind and address sanitizer shows no issues.

Again, this doesn't mean no problem exists (platform specific code is minimal,
but could still be where the issue lies), but it points towards a problem
outside the Ghostscript source and, more importantly, cuts off another route to
reproduce/debug the problem.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...