Looking for local crashlog when device was tethered to Xcode - ios

Question:
When iOS device is tethered to Xcode and crashed after building (app loaded in, was not a crash ON build), where is the crash log saved to?
Here's my predicament with some context:
I pulled a user's crashlog of EXC_BAD_ACCESS for my app. I symbolicated and I've narrowed it down to get a rough idea but now I'm trying to re-create the issue via building in Xcode to my iOS device (not simulator). Normally the app does not crash on load in (this crash isn't easy to replicate) but I've been able to have the app crash consistently with Address Sanitizer enabled, and it always crashed and points to a line in a thread with an men address -- not anything I don't already have from previous debugging.
However, one time I had a crash occur where it highlighted what func was called as well as every func called in the stack trace and what file this was all occurring in. In haste I hit build again in Xcode before I saved the output however... and now I cannot replicate.
The crashlog wasn't saved locally to my iOS device as I was still tethered to Xcode, and I checked ~Library/Logs/CrashReporter/MobileDevice but that did not contain them either.
I need find where Xcode would've saved these logs on my mac (if it did at all)?

Typically all the crash dumps are stored in Settings -> Privacy -> Diagnostics & Usage -> Diagnostics & Usage Data
Scroll down the list and find the crash file with your app name.
This link might be helpful - https://developer.apple.com/library/content/qa/qa1747/_index.html

Related

How to find the place where the iOS code crashes using Firebase ? (when you can't reproduce the bug)

I'm using Firebase to get information about crashes of users of my application. Most of the crashes has no any useful information about code or place where it happens. All stack-trace and threads shows "Missing" text. Also I can't reproduce these crashes at my PC.
That crash is on Mac OS application, not iOS. My point of view is to look at that doc, (see "Build Your App With Symbol Information"). But may be on Mac OS apps that feature is not available.
https://developer.apple.com/documentation/xcode/building_your_app_to_include_debugging_information
What can I do to find the place it crashes ? See attached screenshot

Why crash log couldn't be found

I have an app and under some circumstance the app crashes.It has crashed couple of times.But I am not able to find the crash log.
I opened Xcode -> Window -> Devices & Simulators ->View Device logs - The device
I am not seeing any crash logs over there for the Time it crashed.
Any ideas please
It has happened to me before.
Just delete the old crash logs and let the crash happen and you can easily find the crash log.
I would suggest you to use the following option to check for the crash logs in iOS device itself as its easy and quick to do.(depending on the OS version the below selection process will change)
Settings -> Privacy -> Diagnostic & Usage -> Diagnostic and Usage Data
Just connect the iOS device to a machine and sync it with iTunes then all the crash logs that you saw in Diagnostic and usage Data will not be there any more and it'll be in the machine.
Next time when the crash happens you can see the crash log
under Diagnostic and Usage Data
you can click on the any particular crash log and share it via mail
you can sync it with iTunes and find it in OSx at ~/Library/Logs/CrashReporter/MobileDevice/
you can go to Xcode->Devices and Simulators -> View Device Logs

Xcode 9 crashing when running split view app on iPhone

After working just fine on both iPhone and iPad for a month, my Xcode 9 app has consistently started crashing causing me the following fatal problem: When I build & run it on an iPhone (simulator or device) Xcode completes loading the app and then crashes too fast for me to copy/paste the error from the debugger. When I run on iPad it works fine leading me to believe this is a result of something related to the split master/detail view.
If I use either an exception breakpoint or an "all C++ exceptions" it will stop at the AppDelegate class and crash if I hit play. If I use only an "all Objective-C exceptions" it will crash as before.
In the debug view hierarchy I get the following errors as well:
Error: Unable to capture view hierarchy.
Details: Log Title: Data source expression execution failure.
Log Details: error evaluating expression “(id)
[[(Class)objc_getClass("DBGTargetHub") sharedHub]
performRequestWithRequestInBase64:#"...
Log Method: -[DBGDataSourceConnectionLibViewDebugger
_executeLLDBExpression:forRequest:onPotentialThread:iteration:]
_block_invoke_2
Method: -[DBGViewDebugger updateDebugHierarchy]_block_invoke_2
I have tested other apps and this issue is unique to the app I am working on. Any ideas or debugging tips for how to proceed? I might just have to redo this whole project again if I can't even find the root cause of this! Appreciate any help.
Quick solution: Reset Simulator Device
I managed to resolve the above issue thanks to some serious digging. First, to resolve the instantaneous crash problem, I set a breakpoint at every line in the app delegate. That allowed me to narrow the error to a memory handling problem. From there I started running the code on one of each device available, and realized the crash only occurred on devices I had used earlier in development. Resetting those devices solved the problem.
The core issue here is that when you clean/rebuild your xcode program, it updates the app code on the device, but not necessarily the data model information. So when I changed my data model by including new data and renaming old data it was not properly updated.

HockeySDK Warning - How to test crash reporting?

I got this warning when running my application with HockeyApp integration:
[HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
Crash reports are not sent and no alert is displayed when opening the app again.
Any one have any idea how to resolve this issue?
This has very simple reasons:
If you are running the app with Xcode attached, your app is connected to lldb, Xcode's debugger. When lldb is attached, it will of course do its job as a debugger and catch any exception or crash that occurs. This means that the crash can never reach the HockeyApp SDK or any other crash reporting SDK while lldb is attached at the same time.
The solution is also pretty simple. If you just want to make sure the SDK is integrated properly and will catch crashes, do the following:
Do a quick "Build & Run" to install the current version of the app on the simulator or device.
Click the "Stop" button in Xcode to stop the debugging session.
Manually start the app on the device or simulator by tapping or clicking the app icon.
Cause a crash.
Restart the app. Now the HockeySDK should process the crash report and show a dialog to approve crash log sending.
One thing to keep in mind: Make sure to not make the app crash immediately after app start as this would not give the SDK enough time to process and send the crash report before crashing again.
Hockey app sdk by default does not send report when a debugger is attached. There is nothing wrong with this.
It will send report when a archive build that release to ur tester cause a crash. I personally think this should and remain as this because you are trying to track crashes from your tester not when you are developing.

IOS App crashes, but there is no crash log available

I am starting my App from XCode and with a specific behaviour it just disconnects and the app disappears from my IPAD screens.
So I guess the app crashes.
Now my question. Where Do I get this crashlog ? I already looked into
Window -> Devices -> choose my Ipad -> "View Device Logs" . But I cant see any actual crash log. I have some from earlier times, but my actual doesn't show up.
How do I get a crashlog ?
check if you have enabled Share with app developers option in settings. Privacy -> Analytics -> Share with App Developers.Xcode was not showing crash logs, enabling this helped me
You need to look at the device console under windows, devices in Xcode.
Its possibly saying something about code signing, bundle id's or missing libraries.
Try to delete the crash logs from "earlier times".
You have maximum amount of saved crash logs, and if you passed it - you won't see the new crash logs

Resources