tracy icon indicating copy to clipboard operation
tracy copied to clipboard

No response to close button

Open IvDmNe opened this issue 2 years ago • 3 comments

Profiler GUI application does not respond to close button, stucking forever until Ctrl-C.

System: Ubuntu 20.04, 22.04 Version: v0.9, v0.10 Tried LEGACY = 0 and 1

Capstone v0.4.2 installed from sources in 20.04, installed via apt in 22.04.

I also tried to use it inside docker container, but the behavior is similar.

Did anyone have this issue?

IvDmNe avatar Oct 19 '23 17:10 IvDmNe

This is handled either here:

https://github.com/wolfpld/tracy/blob/af73dba73ec90182e5484d3c67197c25fd1a833e/profiler/src/BackendGlfw.cpp#L139-L155

or here:

https://github.com/wolfpld/tracy/blob/af73dba73ec90182e5484d3c67197c25fd1a833e/profiler/src/BackendWayland.cpp#L750-L754

Use a debugger to verify that it works, and then, when the application is stuck, break with the debugger to see what it is waiting for.

wolfpld avatar Dec 09 '23 13:12 wolfpld

Thank you for response! I tracked down the reason: after pressing close button the updateThread still waits for update from the server.

https://github.com/wolfpld/tracy/blob/d62428c482845031e4ab633e6132dbc26cfe46ca/profiler/src/main.cpp#L320

In my case update server nereid.pl is unable (some inner filters in my company), so connect function stucks for a long time:

https://github.com/wolfpld/tracy/blob/d62428c482845031e4ab633e6132dbc26cfe46ca/public/common/TracySocket.cpp#L182

After 1-2 mins it finally fails and the application can be closed normally.

UPD: @wolfpld Do you think that it is worth to add small timeout (about 1-10 seconds) after creating of the socket to prevent long waiting?

IvDmNe avatar Dec 27 '23 11:12 IvDmNe