TFormSize crash

When I create a store app, using the desktop bridge, my app crash when I use the TFormSize component. Removing the component resolve the issue. A non-store program also works fine.

Any suggestion what might cause it?
The exception handle cannot catch the exception, it happen the moment the program shut down, a popup with "xxx has stopped working"...

What have you configured for FormSize.SaveName?

Is this a filename that refers to the application EXE folder? If so, it is likely you have a path under \Program Files which is a folder with limited write permissions. I'd suggest to check that and use a folder where your app has full write permissions.

The app is in the Program Files\WindowsAPP folder, where is has write permission, it also create .ini files just fine in that folder, together with other generated data files, just the form.ini (thats what TFormSize will save into the same folder) cannot be created in that folder when I exit the app.

Anyway, I will play with it a little more when time allows.

Hello Günter Kramer and TMS,

we have the same (crash) problem's with TFormSize on Windows 10 Pro only on one client-maschine. Have you found the reason for the crash?

We found that.
On the maschine is TeamViewer installed. In this version TeamViewer expand the system-menu of our application with an additional icon. After closing the window (and writing the TFormSize inifile) the App crash without exception. If we deactivate TeamViewer all is fine!


That's very unclear how this issue could be related to TeamViewer.

Is it also upon saving the settings? In what folder is your app trying to save the settings?

...yes i know!

We save the settings in the user's "app data" path. No problem with other setting-files, user has full write-permission there. The TFormSize.SaveSettings works as expected. The Form.Size etc. are saved in the File. 
The app crash without exception, only the dialog with the progressbar show's up "Die Anwendung XXX funktioniert nicht mehr.". I think it's a problem in the destructor.

I cannot see any problem here. If you suspect the issue is in the destructor, can you set a breakpoint in the component destructor and indicate at what step exactly the AV occurs?

Hello Bruno,

as i say, the error is not reproducible on any of my dev-machines or on other Client-PC's. So, no breakpoint's.
I have try to compile a TestApp for the Client with a logger and logging every single step in my FormClose/Destructor. A good part of my Forms inheriteds from a BaseForm without a .dfm. In this Baseform i create a TFormSize in the Constructor and destroy it in destructor. Work's like a charm for the last 3 Years!
All my Code in the frmBase run's without any AV. Only when TeamViewer (not the normal one i think. It Injects an TeamViewer Icon in the TopRight Corner) is installed and the Form is inherited from tfrmBase, my Programm is crashing in the TFormSize.Free without Exception! The Window's Dialog "Die App XXX funktioniert nicht mehr!" is popping up immidiatly. No Idea what is causing this very hard to find error.

I'm happy that the Client have found Teamviewer as the "EVIL-ONE".

  TfrmBase = class (TForm)
    FormSize : TFormSize;

    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;

constructor TfrmBase.Create(AOwner: TComponent);


destructor TfrmBase.Destroy;

I'm sorry, but I'm also at loss here to understand what possible Teamviewer is doing that interferes. The code is TFormSize is really simple, it's simply saving to INI file or registry, so not anything complex.

Yes i have inspected the code in TFormsize and there is nothing special "thing" that can cause this crash. But when i remove TFormsize from tfrmBase or/and TeamViewer from the ClientMaschine all is fine. I try to get RemoteAccess to the ClientMaschine or further investigation and come back to you.

...hello again, just for your information.

I think the problem with TeamViewer is not new! See:

Another Client have the same problem with TeamViewer and it disapear after disabling the QuickConnect-Button on TeamViewer. Problem is, i can't get this button on my machine? The option is enabled but no TeamViewer-Button.

Have you contacted TeamViewer about this? I really do not have insight on what exactly TeamViewer is doing with this.