pdf.GetBookmarks and stack overflow
Posted: Sat Jul 13, 2019 11:33 am
I get stack overflow error when trying to get bookmarks from some PDF files.
For example with this PDF: PDFReference.pdf
And this code:
This happens on both MorphOS and Windows, and increasing stack in shell didn't seem to help on MorphOS.
For some reason, disabling Hollywood's internal error handling lets me to continue with RNOPDF and I get the document opened by reloading it after the initial error, but I'm not sure why it works then and is it safe to do that? Weird thing is that I haven't been able to reproduce the error skipping with a simple script yet, it always exits even if I disable the error handling..... why on earth it does work with my bigger program?
For example with this PDF: PDFReference.pdf
And this code:
Code: Select all
@REQUIRE "polybios", {Version=1, Revision=1}
pdf.OpenDocument(1, "PDFReference.pdf")
t=pdf.GetBookmarks(1)
For some reason, disabling Hollywood's internal error handling lets me to continue with RNOPDF and I get the document opened by reloading it after the initial error, but I'm not sure why it works then and is it safe to do that? Weird thing is that I haven't been able to reproduce the error skipping with a simple script yet, it always exits even if I disable the error handling..... why on earth it does work with my bigger program?