Search results for

“LLDB crash”

30,529 results found

Post

Replies

Boosts

Views

Activity

Reply to Name shared breakpoints
Hi, After taking a closer look, this appears to be a bug in Xcode. Could you please file a feedback describing your usage and the results you're getting, and share the feedback number here ? As a workaround, you could use Xcode's console debugger to create named breakpoints by doing: Show all the breakpoints. (lldb) breakpoint list Add a name to one of the breakpoint in the list. (lldb) breakpoint name add -N <breakpoint-name> <breakpoint-id> Unfortunately, the breakpoints named on the console debugger won't show up in Xcode's Breakpoint Navigator. To list your newly named breakpoints, you can do: Print the named breakpoints list. (lldb) breakpoint name list One benefit of using the console debugger is that you can have all the lldb commands to create and name your breakpoints saved to a file contained in your Xcode project. This lldbinit file can then be checked into your version control system of choice (i.e. git) but more importantly, you can use it in the Sc
Jun ’20
Reply to Bypass ASLR for debugging purposes
I would like to add something: When we debug a program with lldb, it seems base address is always 0x100000000 on macOS Sonoma (Apple Silicon). So if lldb is able to force a target program's base address, we might have a way to do that too ? And is there a way to disable ASLR for a specific binary when compiling it on macOS ? Thanks
Topic: Privacy & Security SubTopic: General Tags:
Oct ’23
Reply to macOS Xcode debugging: can I single-step just one thread while another thread runs free?
I don’t think you can do this from the Xcode GUI but in LLDB you can use the -m option to determine whether other threads will run. In the LLDB prompt, type help thread step-in (or help thread step-over) for more info. This should work at the LLDB prompt in Xcode’s console panel. Be aware that many parts of macOS are multi-threaded and so the this-thread option may well hang if you call into framework code. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’21
Reply to Crash log and symbolication when using Xcode Cloud
If I archive only using Xcode Cloud (with the option to include symbol enabled), can the Xcode Organizer show symbolicated crash logs for app builds that are more than 30 days old (the archive availability window)? For example, a crash for an app version released 6 months ago. This is where you should treat Xcode Cloud as separate from what happens after you submit a build to App Store Connect. Xcode Cloud can do an archive your app, and then additionally submit that build to the App Store according to options you configure. You could do both of those at your desk as well, with the same options. So if you ask Xcode Cloud to upload your build to the App Store with symbols, you'll get automatically symbolicated crash reports in Xcode Organizer, the same way as if you submitted the build to the App Store by archiving at desk in Xcode and submitting from your desk, with the option to include symbols enabled. After this point of submitting to the App Store, you're then in the world of su
Jun ’25
PreviewShell crashes and breaks the preview canvas
Since the first beta of Xcode 16, randomly when editing a SwiftUI view a crash report opens with the message PreviewShell quit unexpectedly. After that, annoyingly often the canvas fails to reload correctly, and shows this broken thing: The only way to get it working again is to restart Xcode, but it happens so often that it really impacts productivity. Does this happen to anyone else? If so, have you found a solution? I've already filed a report (FB14876223)
9
0
3.5k
Aug ’24
fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
I have no idea what to do. I am building a weather app. I created a variable with the url and I know the url works but I need the data for the place the user types into the text field. So I concatenate my UITextField in the correct place in the url and I get this error in the log.fatal error: unexpectedly found nil while unwrapping an Optional value(lldb) here is my code:import UIKitclass ViewController: UIViewController { @IBOutlet weak var textfield1: UITextField! @IBOutlet weak var outputlbl: UILabel! @IBAction func findtheweather(sender: UIButton) { let url = NSURL(string: http://www.weather-forecast.com/locations/ + textfield1.text! + /forecasts/latest)! let task = NSURLSession.sharedSession().dataTaskWithURL(url) { (data, response, error) -> Void in if let urlcontent = data { let webcontent = NSString(data: urlcontent, encoding: NSUTF8StringEncoding) let websitearray = webcontent!.componentsSeparatedByString(3 Day Weather Forecast Summary:</b><span class=read-more-small><span
1
0
1.8k
Jun ’16
lldb cannot po string anymore (worked last week)
Latest Xcode 7.3 (7D1002)Since yesterday I got the same bug as described here:http://stackoverflow.com/questions/24125539/xcode-lldb-print-statements-fail-nsundomanagerhttp://www.openradar.me/search?query=15890965except that it even happens with NSString variables: po someString error: instance method 'URLEncodedString' has incompatible result types in different translation units ('void *' vs. 'NSString *') error: instance method 'URLDecodedString' has incompatible result types in different translation units ('void *' vs. 'NSString *') note: instance method 'URLEncodedString' also declared here note: instance method 'URLDecodedString' also declared here error: 2 errors parsing expressionI found a workaround for local variables (even though this problem is different):http://lists.apple.com/archives/xcode-users/2014/May/msg00088.htmlctrl-click on variable in local variables list and choose “print description” Printing description of someString: ipadwhich helps a little but cannot print more complex com
0
0
790
May ’16
Reply to LLDB and environment variables in Xcode
Xcode doesn't pass these environment variables to lldb when it runs it, nor does it preprocess the .lldbinit files to insert these variables. We don't pass them to lldb as there's too much chance one of them really wouldn't be appropriate for lldb and cause hard to diagnose problems. And since .lldbinit files can contain arbitrary user expressions, preprocessing can also cause problems. Instead, the suggested way to do this is to make a target specific lldbinit file - as you have done - and in that file bring in all the .py files you need using command script import --relative-to-command-file ./my_python_files/my_python_file.py That allows you to give the paths to all your python files relative to the target-specific .lldbinit file without having to know where any of them actually are. Note, the same option exists for sourcing other files of lldb commands using command source.
Nov ’25
Reply to crash report _NSThreadPerformPerform
Thank you. I was able to successfully reproduce printing the UIKit applicationWillTerminate: selector in my modified test app.My test app crash report shows the x1 register had an address of:0x0000000190bef16dThe test app crash report also shows the load address of UIKit:0x1900ad000 - 0x190e3afff UIKit arm64 <7ef942f43c3e3e4aa6cec127b68ecbab> /System/Library/Frameworks/UIKit.framework/UIKitIn the debugger, the image list shows the base address of UIKit as:[ 6] 7EF942F4-3C3E-3E4A-A6CE-C127B68ECBAB 0x00000001900ad000 /Users/andrewshort/Library/Developer/Xcode/iOS DeviceSupport/10.1.1 (14B100)/Symbols/System/Library/Frameworks/UIKit.framework/UIKitOf course the UUIDs match up since this is just a test app that I'm intentionally crashing. So, now I calculate the offset of x1 from the crash report base address:(lldb) p/x 0x0000000190bef16d-0x1900ad000 (long) $0 = 0x0000000000b4216dNote that 0x0000000000b4216d is the same value you got!and add that to your new base
Nov ’16
Reply to What is required to register for CoreWLAN events?
Sorry I was printing the localizedDescription of the error which isn't helpful at all. 😟So, this is what I Catch:(lldb) po errorError Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.airportd was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.airportd was invalidated.}(lldb) po error.localizedDescriptionCouldn’t communicate with a helper application.
Apr ’18
CFNetwork crash in iOS 11
We have an app that is working just fine in iOS 10, but crashes in iOS 11.I am currently trying to trace the problem, but the first crash is here; CFDataRef bodyData = CFHTTPMessageCopyBody( message ); CFHTTPMessageSetBody( newMessage, bodyData ); CFRelease( bodyData ); bodyData = NULL;It seems that I get a nil value from the CFHTTPMessageCopyBody in iOS 11, but not in iOS 10;From debugger;iOS 11(lldb) po message<CFHTTPMessageRef 0x1c417fbc0(0x1c417fbd0)> { GET request, url /873769144/sec/ENCRYPTED_Television*******_240516_1.mp4 -- http:/ (lldb) po bodyData<nil>(lldb) po newMessage<CFHTTPMessageRef 0x1c4360840(0x1c4360850)> { GET request, url http:/ ****iOS 10(lldb) po message<CFHTTPMessageRef 0x170173a40(0x170173a50)> { GET request, url /771278348/sec/ENCRYPTED_Television_**********_240516_1.mp4 -- http:/ (lldb) po bodyData<>(lldb) po newMessage<CFHTTPMessageRef 0x170173b00(0x170173b10)> { GET request,
1
0
2.6k
Oct ’17
Reply to Sandboxed App crashes at Startup in _libsecinit_appsandbox.cold
Ok, that was it!!! Thanks! One more question before I close out this thread: Should I be able to debug Sandboxed applications using LLDB? Right now, if I lldb the sandboxed app it dies instantly with: error: process exited with status -1 (lost connection) Thanks!
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Name shared breakpoints
Hi, After taking a closer look, this appears to be a bug in Xcode. Could you please file a feedback describing your usage and the results you're getting, and share the feedback number here ? As a workaround, you could use Xcode's console debugger to create named breakpoints by doing: Show all the breakpoints. (lldb) breakpoint list Add a name to one of the breakpoint in the list. (lldb) breakpoint name add -N <breakpoint-name> <breakpoint-id> Unfortunately, the breakpoints named on the console debugger won't show up in Xcode's Breakpoint Navigator. To list your newly named breakpoints, you can do: Print the named breakpoints list. (lldb) breakpoint name list One benefit of using the console debugger is that you can have all the lldb commands to create and name your breakpoints saved to a file contained in your Xcode project. This lldbinit file can then be checked into your version control system of choice (i.e. git) but more importantly, you can use it in the Sc
Replies
Boosts
Views
Activity
Jun ’20
Reply to Bypass ASLR for debugging purposes
I would like to add something: When we debug a program with lldb, it seems base address is always 0x100000000 on macOS Sonoma (Apple Silicon). So if lldb is able to force a target program's base address, we might have a way to do that too ? And is there a way to disable ASLR for a specific binary when compiling it on macOS ? Thanks
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to macOS Xcode debugging: can I single-step just one thread while another thread runs free?
I don’t think you can do this from the Xcode GUI but in LLDB you can use the -m option to determine whether other threads will run. In the LLDB prompt, type help thread step-in (or help thread step-over) for more info. This should work at the LLDB prompt in Xcode’s console panel. Be aware that many parts of macOS are multi-threaded and so the this-thread option may well hang if you call into framework code. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
xcode crashes after mac os Big sur update
I downloaded new mac os big sur developer beta and Xcode has started crashing. when I open Xcode, it says xcode quit unexpectedly while using the libMainThreadChecker.dylib plug-in. my Xcode version is 10.3 and it was working perfectly fine on catalina
Replies
14
Boosts
0
Views
13k
Activity
Jun ’20
Reply to Crash log and symbolication when using Xcode Cloud
If I archive only using Xcode Cloud (with the option to include symbol enabled), can the Xcode Organizer show symbolicated crash logs for app builds that are more than 30 days old (the archive availability window)? For example, a crash for an app version released 6 months ago. This is where you should treat Xcode Cloud as separate from what happens after you submit a build to App Store Connect. Xcode Cloud can do an archive your app, and then additionally submit that build to the App Store according to options you configure. You could do both of those at your desk as well, with the same options. So if you ask Xcode Cloud to upload your build to the App Store with symbols, you'll get automatically symbolicated crash reports in Xcode Organizer, the same way as if you submitted the build to the App Store by archiving at desk in Xcode and submitting from your desk, with the option to include symbols enabled. After this point of submitting to the App Store, you're then in the world of su
Replies
Boosts
Views
Activity
Jun ’25
PreviewShell crashes and breaks the preview canvas
Since the first beta of Xcode 16, randomly when editing a SwiftUI view a crash report opens with the message PreviewShell quit unexpectedly. After that, annoyingly often the canvas fails to reload correctly, and shows this broken thing: The only way to get it working again is to restart Xcode, but it happens so often that it really impacts productivity. Does this happen to anyone else? If so, have you found a solution? I've already filed a report (FB14876223)
Replies
9
Boosts
0
Views
3.5k
Activity
Aug ’24
fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
I have no idea what to do. I am building a weather app. I created a variable with the url and I know the url works but I need the data for the place the user types into the text field. So I concatenate my UITextField in the correct place in the url and I get this error in the log.fatal error: unexpectedly found nil while unwrapping an Optional value(lldb) here is my code:import UIKitclass ViewController: UIViewController { @IBOutlet weak var textfield1: UITextField! @IBOutlet weak var outputlbl: UILabel! @IBAction func findtheweather(sender: UIButton) { let url = NSURL(string: http://www.weather-forecast.com/locations/ + textfield1.text! + /forecasts/latest)! let task = NSURLSession.sharedSession().dataTaskWithURL(url) { (data, response, error) -> Void in if let urlcontent = data { let webcontent = NSString(data: urlcontent, encoding: NSUTF8StringEncoding) let websitearray = webcontent!.componentsSeparatedByString(3 Day Weather Forecast Summary:</b><span class=read-more-small><span
Replies
1
Boosts
0
Views
1.8k
Activity
Jun ’16
Reply to Xcode 14.2+: lldb-rpc-server has crashed.
Can confirm that lldb works as expected from a 13.2.1 install with latest Xcode.
Replies
Boosts
Views
Activity
Apr ’23
lldb cannot po string anymore (worked last week)
Latest Xcode 7.3 (7D1002)Since yesterday I got the same bug as described here:http://stackoverflow.com/questions/24125539/xcode-lldb-print-statements-fail-nsundomanagerhttp://www.openradar.me/search?query=15890965except that it even happens with NSString variables: po someString error: instance method 'URLEncodedString' has incompatible result types in different translation units ('void *' vs. 'NSString *') error: instance method 'URLDecodedString' has incompatible result types in different translation units ('void *' vs. 'NSString *') note: instance method 'URLEncodedString' also declared here note: instance method 'URLDecodedString' also declared here error: 2 errors parsing expressionI found a workaround for local variables (even though this problem is different):http://lists.apple.com/archives/xcode-users/2014/May/msg00088.htmlctrl-click on variable in local variables list and choose “print description” Printing description of someString: ipadwhich helps a little but cannot print more complex com
Replies
0
Boosts
0
Views
790
Activity
May ’16
Reply to LLDB and environment variables in Xcode
Xcode doesn't pass these environment variables to lldb when it runs it, nor does it preprocess the .lldbinit files to insert these variables. We don't pass them to lldb as there's too much chance one of them really wouldn't be appropriate for lldb and cause hard to diagnose problems. And since .lldbinit files can contain arbitrary user expressions, preprocessing can also cause problems. Instead, the suggested way to do this is to make a target specific lldbinit file - as you have done - and in that file bring in all the .py files you need using command script import --relative-to-command-file ./my_python_files/my_python_file.py That allows you to give the paths to all your python files relative to the target-specific .lldbinit file without having to know where any of them actually are. Note, the same option exists for sourcing other files of lldb commands using command source.
Replies
Boosts
Views
Activity
Nov ’25
Reply to XCode 7 debugger breakpoints not being triggered in sub-projects
Are the breakpoints being set? What does:(lldb) break list -vin the Debugger console say? If the breakpoints show up but are marked pending that means there was something wrong with how they were specified. If that is true, what happens if you try to set them by hand in the console. I.e.:(lldb) break set -f <FILENAME> -l <LINENUMBER>
Replies
Boosts
Views
Activity
Oct ’15
Reply to crash report _NSThreadPerformPerform
Thank you. I was able to successfully reproduce printing the UIKit applicationWillTerminate: selector in my modified test app.My test app crash report shows the x1 register had an address of:0x0000000190bef16dThe test app crash report also shows the load address of UIKit:0x1900ad000 - 0x190e3afff UIKit arm64 <7ef942f43c3e3e4aa6cec127b68ecbab> /System/Library/Frameworks/UIKit.framework/UIKitIn the debugger, the image list shows the base address of UIKit as:[ 6] 7EF942F4-3C3E-3E4A-A6CE-C127B68ECBAB 0x00000001900ad000 /Users/andrewshort/Library/Developer/Xcode/iOS DeviceSupport/10.1.1 (14B100)/Symbols/System/Library/Frameworks/UIKit.framework/UIKitOf course the UUIDs match up since this is just a test app that I'm intentionally crashing. So, now I calculate the offset of x1 from the crash report base address:(lldb) p/x 0x0000000190bef16d-0x1900ad000 (long) $0 = 0x0000000000b4216dNote that 0x0000000000b4216d is the same value you got!and add that to your new base
Replies
Boosts
Views
Activity
Nov ’16
Reply to What is required to register for CoreWLAN events?
Sorry I was printing the localizedDescription of the error which isn't helpful at all. 😟So, this is what I Catch:(lldb) po errorError Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.airportd was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.airportd was invalidated.}(lldb) po error.localizedDescriptionCouldn’t communicate with a helper application.
Replies
Boosts
Views
Activity
Apr ’18
CFNetwork crash in iOS 11
We have an app that is working just fine in iOS 10, but crashes in iOS 11.I am currently trying to trace the problem, but the first crash is here; CFDataRef bodyData = CFHTTPMessageCopyBody( message ); CFHTTPMessageSetBody( newMessage, bodyData ); CFRelease( bodyData ); bodyData = NULL;It seems that I get a nil value from the CFHTTPMessageCopyBody in iOS 11, but not in iOS 10;From debugger;iOS 11(lldb) po message<CFHTTPMessageRef 0x1c417fbc0(0x1c417fbd0)> { GET request, url /873769144/sec/ENCRYPTED_Television*******_240516_1.mp4 -- http:/ (lldb) po bodyData<nil>(lldb) po newMessage<CFHTTPMessageRef 0x1c4360840(0x1c4360850)> { GET request, url http:/ ****iOS 10(lldb) po message<CFHTTPMessageRef 0x170173a40(0x170173a50)> { GET request, url /771278348/sec/ENCRYPTED_Television_**********_240516_1.mp4 -- http:/ (lldb) po bodyData<>(lldb) po newMessage<CFHTTPMessageRef 0x170173b00(0x170173b10)> { GET request,
Replies
1
Boosts
0
Views
2.6k
Activity
Oct ’17