1
votes

I have this weird problem. I'm writing a GUI app in Qt and I have a crash during a drag and drop operation. If I run this app in a debugger, then when this crash occurs and the app breaks into the debugger, the mouse cursor gets stuck in "drag and drop mode" and I can't click on anything until the app is killed. How can i get around that?

2

2 Answers

3
votes

Your app crashes in a GUI thread. Try to move the operations you are doing there to a new thread.

On your DragDrop event:

  1. start a new thread doing your job
  2. return from your event without waiting for results
0
votes

I have the same issue.

I found that when a breakpoint was hit when mouse is dragging or mouseDown, GUI will get stuck and mouse will become unable to response.

For example: A. Drag&Drop 1) Eclipse SWT: create Drag and Drop for a control 2) set breakpoint within dragging

B. Mouse Down & Mouse Up 1) use mouse down / mouse up to implement behavior of Drag&Drop 2) set breakpoint to dragging action/mouse moving

The mouse will stuck when breakpoint occurred, no matter which DnD happened. To get mouse back, I'll need to use CTRL+ALT+F1 and use command to kill my process.

Perhaps working in VM or remote desktop can get rid of it.