This year I have re-written our company system using Firemonkey to run on our Macs.
I use the TMS UI Pack in my app and everything was running smoothly in Dephi XE7
I recently upgraded to Tokyo 10.2 and there now seems to be a problem with Invalid Pointer Operation after printing a PDF using the TMS library.
Call Modal Form to show record
But closing Modal Form sometimes causes Invalid Pointer Operation.
ViewSO := TViewSO.Create( nil );
ViewSO.Free; // is this causing a pointer error in 10.2???
I don't do much in the way of object creation, most things are components dropped on to forms. When printing I follow he examples from TMS and they work brilliantly for us
p := TTMSFMXPDFLib.Create;
// printing stuff
Any ideas why this might be happening?
Do you always get the invalid pointer? Which code are you using to print? Can you send us a sample that demonstrates this invalid pointer operation?
I don't always get the invalid pointer, but if I run through the following sequence, it happens every two or three times
Open Record Form / Print PDF / Close Record Form
The Pointer Error happens when I do the .Free on the Record Form.
If I run through debugging, seems Delphi is trying to close something that is already closed - the error is on _FreeMem(Pointer(Self)) in System.pas
I will write a smaller app to see if the problem is still there
It's worth mentioning that I can open and close the form over and over without the problem, so I guess I'm doing something when I print that Tokyo doesn't tolerate that XE7 did!
Open Record Form / Close Record Form
We have investigated this here but are not able to reproduce this. Please send us a simple sample that demonstrates this issue so we can investigate here what is going wrong.
I have actually reproduced this problem with a very simple project this morning. What is the best way to send it to you?
I sent the project on Friday, did you receive it?
Yes we have received your project but we haven't allocated time yet to look in to this.
We'll look in to this as soon as possible.