Quick Follow Up
Issue is with Optimisation
Previously I used Optimization 2, this now generated the error; using Optimisation 0 or 1 is OK, 2 +3 gives the error and 4 now works when previously it did not.
So If anyone else gets similar; suggest checking/ changing Optimisation Level.
Addition
On further testing my apps no longer work reliabily with even Optimisation 1, when i have this set my applications generates an error when it is closed. (pointer being freed was not allocated). The close routine of the app does not manually free anything.
Setting Optimisation 0 ( No optimization) then the app runs fine, and closes without throwing an error.
Compiling the same with FPC 47919 and Lazarus 64169 No error with 0,1,2.