Bug 695012 - AI files with Spot Color Gradients just spin
Summary: AI files with Spot Color Gradients just spin
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 9.10
Hardware: PC Windows 7
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 13:55 UTC by Andrew Cormier
Modified: 2014-02-05 23:54 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Spot Color Gradiant AI file (243.04 KB, application/postscript)
2014-02-04 13:55 UTC, Andrew Cormier
Details
After 10 minutes of waiting it's still sitting like this. (155.45 KB, image/png)
2014-02-05 11:15 UTC, Andrew Cormier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cormier 2014-02-04 13:55:29 UTC
Created attachment 10668 [details]
Spot Color Gradiant AI file

I was directed to you guys to report this bug.  Essentially if you try to open or convert the attached file.  It just spins and never fails or returns anything.  I've pin pointed the issue to spot gradients specifically.

I was directed to report the bug to you guys after Magick.NET reproced the issue and found it was in the underlying ghostscript methods (https://magick.codeplex.com/discussions/528909).

Thank You in advance,
Andrew Cormier
Comment 1 Ken Sharp 2014-02-05 00:49:43 UTC
In the absence of a command line to reproduce the problem I opened the file using the default (display) device

gswin32 <filename>

The file opens and renders perfectly well. Note that this is a PDF file, despite the extension.

I retested using the released 9.10 binaries, both 32-bit and 64-bit and the file still renders correctly. If there is a problem here it must be related to the specific configuration used, which we haven't been supplied with.
Comment 2 Andrew Cormier 2014-02-05 10:43:07 UTC
I was able to get the actual command being run by Magick.NET.


"C:/Program Files (x86)/gs/gs9.10/bin/gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pamcmyk32 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dUseCIEColor -sOutputFile=output 37cf370d-6523-45ae-9839-858c592d5460.ai

Thank You,
Andrew Cormier
Comment 3 James Cloos 2014-02-05 10:56:18 UTC
Try using the pngalpha device.  Somthing like:

gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=37.pngalpha 37cf370d-6523-45ae-9839-858c592d5460.ai

The other png devices take seconds; pngalpha takes minutes.  Or more?
Comment 4 Andrew Cormier 2014-02-05 11:15:08 UTC
Created attachment 10671 [details]
After 10 minutes of waiting it's still sitting like this.

James, thanks for the response.  Even using the command you gave me it still just hangs when executing gswind64c and never completes.  I'm attaching another screenshot of what happens when I run that command.

Command:

"C:\Program Files\gs\gs9.10\bin\gswin64c.exe" -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=37.pngalpha 37cf370d-6523-45ae-9839-858c592d5460.ai

Thank You,
Andrew Cormier
Comment 5 James Cloos 2014-02-05 12:03:35 UTC
@andrew: my “try using” was intended as an example, using gs rather than libgs, showing the spin you reported.

My test of that command line is still going after an hour.  Attaching gdb breaks in pdf14_copy_alpha_color() inside this loop, which has since fixed in master (commit abd38464f9b058502c9491873ff7f01f00c406d7):

for (k = 0; k < num_comp; ++i) {}

The eight commits since then which touched gdevp14.c may also matter for this file.

I suspect master would handle this file,device tuple correctly.
Comment 6 James Cloos 2014-02-05 12:25:47 UTC
Master does complete that ai file properly, with each of the pngalpha and pamcmyk32 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 command lines.

And it looks like that typo fixed in commit abd38464f9b058502c9491873ff7f01f00c406d7 was the issue.
Comment 7 Ken Sharp 2014-02-05 23:54:20 UTC
Since this works on current code, I'm moving it back to WORKSFORME.