microsoft / perfview

PerfView is a CPU and memory performance-analysis tool
http://channel9.msdn.com/Series/PerfView-Tutorial
MIT License
4.06k stars 696 forks source link

Since 3.1.6 PerfView never quits #1957

Closed rauhs closed 7 months ago

rauhs commented 7 months ago

Had this since 3.1.6 (3.1.5 is OK):

I start perfview. I quit (Pressing "X" top right).

It closes, but the process doesn't quit. It stays open in the task manager.

It's just staying forever at:

UnsafeNativeMethods.GetMessageW()
Dispatcher.GetMessage()
Dispatcher.PushFrameImpl()
Application.RunDispatcher()
Application.RunInternal()
App.DoMainForGui()
App.DoMain()
App.Main()

Possibly related: 0a090aff1e36c81cf1bc2297c0fe53e187d0db67?

cincuranet commented 7 months ago

Confirmed. I can replicate it (even on recently released 3.1.7).

The 0a090af seems like a good suspect. On the other hand it fixed stability when running tests, so I don't want to just revert it. Let me see what we can do about it.

brianrob commented 7 months ago

Yeah, this is my fault - I missed that this call to Exit was in product code and not test code. I'm wondering if we can detect that we're running under test.

cincuranet commented 7 months ago

@brianrob No problem. I missed it as well. #1960 is an as clean as I can think of attempt to solve it.