Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid destination object - unhelpful error offsets reported #268

Open
asciim0 opened this issue Aug 16, 2017 · 4 comments
Open

Invalid destination object - unhelpful error offsets reported #268

asciim0 opened this issue Aug 16, 2017 · 4 comments
Labels
bug A product defect that needs fixing P3 Low priority bugs

Comments

@asciim0
Copy link
Contributor

asciim0 commented Aug 16, 2017

Dev Effort

1D

Description

The attached file sample.pdf fails validation with the repeated error message:

ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640
ErrorMessage: edu.harvard.hul.ois.jhove.module.pdf.PdfInvalidException: Invalid destination object
Offset: 965640

First of all, it doesn't make much sense that the error message is repeated.
Furthermore, is it possible that the error is a bug? Neither can I find an object starting at Offset 965640, nor do I see an object being pointed to at that offset in either of the crossreference tables. I assume that the validation error is actually a JHOVE bug. Could you please check this? I have several files with the same buggy behavior, all coming from the same producer.

sample.pdf

@david-russo
Copy link
Member

david-russo commented Aug 16, 2017

After looking into the file, they do appear to be valid error messages... if opaque ones. The document is using some link annotations which point to named destinations (in this case "WEBend-a1" and "WEBend-a2") that don't appear in the document's destination index (its Name Dictionary), and so can't be resolved.

At a guess, I'd say they are the superscript numbers by the authors' names, which are clickable but don't navigate anywhere. The message is repeated seven times because JHOVE found seven different instances of the problem. The message could be a bit more specific — and changes to that effect are currently awaiting integration into the next release — but what is misleading is the offset, which you'd rightly expect to point to each instance.

@asciim0
Copy link
Contributor Author

asciim0 commented Aug 17, 2017

Thanks a lot for the analysis! With your pointer I found the annotations and could reproduce. Makes sense.

Would the correct offset reported be that of the Name Dictionary or that of the /Dests entry with the invalid objects? I'd assume the later - but the reported offset seems to be far off then?
And did I understand correctly that this bug should stay open to fix the offset reporting?

@david-russo
Copy link
Member

david-russo commented Aug 18, 2017

If the error was reported based purely on an analysis of the Name Dictionary, then I'd think the offset of the offending dictionary would be appropriate, but since the error is discovered and reported for each instance, I'd expect the offset to point to each instance.

I think it's worth keeping this issue open, it being a good example of the problem. I've been wanting more helpful offsets since I started using JHOVE myself.

@david-russo david-russo changed the title Invalid destination object - pointer / offset cannot be found in file Invalid destination object - unhelpful error offsets reported Aug 18, 2017
@ghost ghost added bug A product defect that needs fixing P3 Low priority bugs labels Feb 28, 2019
@ghost ghost added this to the Hack week initiation milestone Feb 28, 2019
rgfeldman added a commit to rgfeldman/jhove that referenced this issue Apr 10, 2019
@carlwilson carlwilson modified the milestones: Hackathon tasks , OPF Hackathon 2023 Tasks Jun 21, 2023
@carlwilson carlwilson removed this from the OPF Hackathon 2023 Tasks milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing P3 Low priority bugs
Projects
Status: No status
Development

No branches or pull requests

5 participants