Debugging in Xcode, NSOpenPanel crashing on quicklook.loadplugin
| Originator: | gngrwzrd | ||
| Number: | rdar://11685851 | Date Originated: | 06/17/2012 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 4.4 |
| Classification: | Serious Bug | Reproducible: | Always |
17-Jun-2012 04:22 PM aaron Smith: Summary: I've hit a strange issue with Xcode / Mountain Lion that is really a productivity killer. My application uses NSOpenPanel to select files and folders. Whenever I run the application from Xcode using GDB or LLDB, if I trigger the NSOpenPanel it crashes while loading quicklook plugins. Steps to Reproduce: In my case all I do is run my application from Xcode, trigger the NSOpenPanel and it crashes. Expected Results: No crashing, should display open panel correctly Actual Results: Crashing Regression: Notes: I've attached a screenshot of the thread states in Xcode, there's a good stack trace there. The other thing I could really use is a way to fix this locally so I can continue developing my application. Please look into this and get back to me. Is there a way to clear some kind of quick look cache? What is causing this? 17-Jun-2012 04:22 PM aaron Smith: 'Screen Shot 2012-06-17 at 4.18.09 PM.png' was successfully uploaded 17-Jun-2012 07:41 PM aaron Smith: Attached is an Xcode project that causes the crash on 10.8, 10.7, in Xcode 4.4 and 4.3. I really have no idea what it could be, it seems there's something stale in the project that is causing the crashes. I've tried it on three computers and it crashes on all of them. I've fixed my problem by re-creating the project and copying all the files over. With no code changes the new project is working fine. So it leads me to believe there's something with the xcode project. Steps to reproduce: 1. Open QuickCaf.xcodeproj 2. Build and run the application 3. Press the "Add Files..." button in the toolbar You should see a crash which starts with _QLLoadPluginAtURL, or possibly if you get a good stack trace you'd see the crash in __cxa_throw. Please note that this is for your eyes only to hopefully demonstrate the bug. Thanks 17-Jun-2012 07:41 PM aaron Smith: 'QuickCaf.zip' was successfully uploaded
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!
As discovered by Andy Lee on the cocoa-dev mailing list on 5 Aug 2012, the problem is that Xcode is breaking on a C++ exception. This isn't actually an error - clicking "continue" in the debugger will do so without error. To fix this, change your "catch-all" breakpoint to break only on Objective-C exceptions, not "All Exceptions". Please update the radar with Apple with this new information. It seems to be breaking in the Security framework, but this should now be easily reproducible for Apple.