Page 1 of 1
Crash when Loading a PDF File as an Asset (linked to an APK)
Posted: Tue Aug 28, 2018 11:33 pm
by PEB
My Android app (made with the Hollywood APK Compiler) crashes when I use
pdf.OpenDocument() to load a PDF linked as an asset using
GetAsset().
Re: Crash when Loading a PDF File as an Asset (linked to an APK)
Posted: Wed Aug 29, 2018 11:35 pm
by PEB
A related question (possibly a work-around):
Is there a way to link a PDF file to an executable with a preprocessor command, such as
@FILE?
Re: Crash when Loading a PDF File as an Asset (linked to an APK)
Posted: Thu Aug 30, 2018 10:06 pm
by airsoftsoftwair
Thanks for the report, I'll check what's wrong there.
As for a workaround, you could try something like this:
Code: Select all
@FILE 1, "test.pdf"
data$ = ReadBytes(1)
vfile$ = DefineVirtualFileFromString(data$, "test.pdf")
pdf.OpenDocument(1, vfile$)
data$ = Nil
vfile$ = Nil
I haven't tested it but it should work... if it doesn't file another bug report
Re: Crash when Loading a PDF File as an Asset (linked to an APK)
Posted: Fri Aug 31, 2018 2:02 am
by PEB
Thanks! (That work-around works perfectly.)
Re: Crash when Loading a PDF File as an Asset (linked to an APK)
Posted: Thu Jan 10, 2019 6:28 pm
by airsoftsoftwair
Code: Select all
- Fix [Android]: Querying file attributes on an asset or using DOSBase.FStat() on it led to a crash