Xcode stops in the wrong thread on hitting a breakpoint

Originator:iamleeg
Number:rdar://14032387 Date Originated:31-May-2013 11:09 AM
Status:Open Resolved:
Product:Developer Tools Product Version:4.6.2/4H1003
Classification:UI/Usability Reproducible:Sometimes
 
Summary:
Sometimes, and I don't know what conditions cause this, on meeting a breakpoint in a background thread, Xcode stops in the main thread showing a stop on EXC_BREAKPOINT (usually in __CFRunLoopServiceMachPort, though I think this is a red herring and the main thread just happens to be waiting in a trap there a lot). The thread that should have stopped can be inspected in the debugger, but the app will not continue properly on the 'cont' command.

Steps to Reproduce:
Unfortunately, I don't know. Xcode just sometimes gets this wrong. In the condition that motivated me to report this, I had set up a conditional breakpoint and when the app met this breakpoint, Xcode would stop in the main thread.

Expected Results:
Xcode should stop at my breakpoint, and the debugger commands should all work including 'cont'.

Actual Results:
Xcode stops in a different thread, and the 'cont' command doesn't work because the app has "crashed" due to the breakpoint exception. Even switching thread before typing 'cont' doesn't help.

Regression:
This is a regression since introducing the lldb debugger. If I switch my run scheme to use gdb, the debugger works as expected on the same breakpoint.

Notes:
Provide additional information, such as references to related problems, workarounds and relevant attachments.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!