Debugging breakpoints that occur while QComboBox popup is open.
-
This is an issue that has plagued me for a while. If I am using the debugger and I hit a breakpoint while a combobox popup is open, it essentially freezes all input of my desktop. This probably has something to do with how the popup listens in modal mode?
I have this happen on multiple Linux Mint based machines, and am not sure it if it happens on Windows or Mac. My only solution so far has been to use ctrl+alt+f1 to go into a virtual console where I kill the application's process.
Does anyone else experience this and have a better solution? This makes certain things unable to be debugged for me.
-
And why do you set breakpoints into this code? :)
-
@presstab
Yes, I absolutely have always experienced this. However, it is not (just) a Qt issue, it happens e.g. just from debugging a native Windows combobox. It's to do with the way the dropdown works, and you'll see others questions about this behaviour elsewhere on the web. Depressingly, it also happens under Linux, where you would really hope it would not....I have always had to completely reboot the host machine when this happens. I didn't know about ctrl+alt+f1, I will try to remember that next time, and see if it works from my Linux VM under Windows.
Solution? Assuming your debugger supports it, do not place break points in combobox code, make them trace points. Or manage without them at all. Nice? No. Preferable to getting stuck and rebooting? Yes!
-
@Christian-Ehrlicher said in Debugging breakpoints that occur while QComboBox popup is open.:
And why do you set breakpoints into this code? :)
Multithreaded application with breakpoints in a different thread. Can cause this situation if you happen to have a combobox open while the other thread hits a breakpoint. Also happens if you have signals connected to the combobox that can be triggered before the popup closes. There are really a lot of scenarios that this can happen, while still having full separation of model and view.
-
@aha_1980 said in Debugging breakpoints that occur while QComboBox popup is open.:
Hi @presstab ,
no, I've never heard or seen this.
Which Qt and Creator version?
Does it happen with a minimal example too?
Regards
I am currently running Qt 5.12.6 with gcc 64 bit for Qt and QtCreator 4.8.1. I will try a minimalist example an try to confirm that it is an issue there as well.