SwiftExpat / Deputy

Deputy - Delphi IDE Expert
GNU General Public License v3.0
13 stars 3 forks source link

CLOSE option does not work anymore #17

Open PeterPanino opened 1 year ago

PeterPanino commented 1 year ago

Hello SwiftExpat, In the beginning, the Process Manager's CLOSE option did work perfectly. But the CLOSE option no longer works for some time now, and I always have to FORCE TERMINATE my program. How can I find out why the CLOSE option does not work?

Of course, the CLOSE option is enabled: image

SwiftExpat commented 1 year ago

It is likely waiting on the leak window, which can take a long time to generate.
Do you have something that logs on exit in your application? It likely responded to the close message, started shutdown but then generates the leak message. Review the Process Manager history from the IDE, Tools --> SE Deputy --> Process manager You can review the history tab , the process is likely found and a leak window shown.

image

PeterPanino commented 1 year ago

It waits forever: image

How is the leak window supposed to be created? This also happens when I deactivate the leak option: image

SwiftExpat commented 1 year ago

The leak window is created when you add the line to your app, Deputy watches for the window. ReportMemoryLeaksOnShutdown := true;

Is there a second form on the application? Possibly the code is not sending close to the main form, I will have to review and see if I can re-produce.

PeterPanino commented 1 year ago

Yes, the application has multiple forms. On the other hand, with a single-form application, Deputy CLOSES the application without waiting for any "leak window." BTW, I have never seen any "leak window." The feature to wait for a "leak window" is turned OFF anyway. So Deputy shouldn't wait for any "leak window." No " leak window " is shown even when I willingly create a memory leak by not freeing a created object, no "leak window" is shown. So I am not sure what you mean by "leak window."

SwiftExpat commented 1 year ago

I suspect that something changed with the way handles are returned when I try to find the main form window. I will work to produce a minimal sample, I use this function as well but do not experience the problem. Possibly changing the application main form to the second form will help me to re-produce the issue.

Expect a status update around April 15, a previous release has my resources at this point.