Bug 688479

Summary: gs-afpl 8.53 generates strange (incorrect) warning about circular references in resource dictionaries
Product: Ghostscript Reporter: Malte Cornils <malte>
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal CC: htl10
Priority: P4    
Version: 8.53   
Hardware: PC   
OS: Linux   
URL: https://sourceforge.net/tracker/?func=detail&atid=439983&aid=1393280&group_id=44509
Customer: Word Size: ---
Attachments: the pdf file in question

Description Malte Cornils 2006-01-02 10:42:30 UTC
Hi, I had reported a PDF which gs-afpl 8.53 complained about to the developer 
of http://multivalent.sf.net/ ; I have added the bug tracking URL above. 
 
We came to the conclusion that gs-afpl generates the warning 
File has circular references in resource dictionaries.  
incorrectly.  
 
I was unable to find any text in the PDF reference manual about multiply 
declared resource references. However, gs-afpl shows this as errors. Maybe you 
could take a look at the bug report? I will gladly assist with further 
explanations and debugging help. 
 
-Malte Cornils
Comment 1 Hin-Tak Leung 2006-01-02 13:33:06 UTC
Created attachment 1904 [details]
the pdf file in question

The pdf file in the original bug report. tried it with gs x86 linux:
==========
 gs
sourceforge.net/tracker/download.php\?group_id=44509\&atid=439983\&file_id=161511\&aid=1393280

AFPL Ghostscript 8.53 (2005-10-20)
Copyright (C) 2005 artofcode LLC, Benicia, CA.	All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
>>showpage, press <return> to continue<<

Page 2
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
   **** File has circular references in resource dictionaries.
>>showpage, press <return> to continue<<


   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> Libpdf for Scribus 1.3.2cvs <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
============
Comment 2 Alex Cherepanov 2007-06-12 19:44:11 UTC
Fix false detection of circular references in the resource chain. Valid PDF
resource references form a directed acyclic graph but the old code was
checking for a tree.

A patch is committed as a rev. 8047.