Invalid Pointer Operation - After Printing PDF?

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.

Main Form
Call Modal Form to show record
Pint PDF

But closing Modal Form sometimes causes Invalid Pointer Operation. 

    ViewSO       := TViewSO.Create( nil );
      try
      ViewSO.ShowModal;
    finally
      ViewSO.Free;     // is this causing a pointer error in 10.2???
    end;

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;
    try
      //
      //  printing stuff
      //
    finally

      p.Free;


    end;


Any ideas why this might be happening?

Thanks
Trevor



Hi, 


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


Run application 

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

procedure TObject.FreeInstance;
begin
  CleanupInstance;
  _FreeMem(Pointer(Self));
end;


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  

Hi, 


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.

Hi


I have actually reproduced this problem with a very simple project this morning. What is the best way to send it to you?



Hi, 


You can send the project to support@tmssoftware.com

Hi 


I sent the project on Friday, did you receive it?

Thanks
Trevor

Hi, 


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.