-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When you try to save a PDF ( TPdf.Save() ), which you already opened before in any PDF-reader, everything works fine.
But if the default PDF-reader is a PDF-Creator it could be possible, that the creator prevents the next writing access.
In this case BlitzMax crashes instead of reporting a catchable error.
Here you can see more about the circumstances and how I got the crash:
https://discord.com/channels/613699895139762176/679291789840089108/1432022303000231998
The google gemini suggested to test with a WriteStream(), whether another writing access is possible before using TPdf.Save()
test:TStream = WriteStream("mydoc.pdf")
If test=NULL
Notify "first close the PDF Creator"
' followed by a strategy to continue...
Else
CloseStream test
pdf.Save("mydoc.pdf")
pdf.Free()
OpenUrl path + "mydoc.pdf"
Endif
My suggestion is to also implement this into the PDF module. Better reporting an error message than crashing with
WINDOWS EXCEPTION: EXCEPTION_ACCESS_VIOLATION
Metadata
Metadata
Assignees
Labels
No labels