iOS App crashes / Xcode shows no backtrace (Paused) - ios

I'm trying to debug a crash (likely memory related) but whenever the app crashes while debugging on iPad device Xcode (4.2) shows Paused with no backtrace for any thread (GDB). Switching to LLDB provides even less -- the app crashes, console shows nothing and Xcode ends debugging.
The crash only occurs after intense use and is likely related to insufficient memory.
I can't find any info related to the crash though. Anyone else experienced this behavior?

Have you set the exception breakpoint?
got to breakpoint editor pane
click on the [+] in the bottom left corner of the pane
choose add exception breakpoint
Now you should see a stacktrace if an exception occurs.

"Appearing after intensive use" indicates to excessive memory usage and memory leaks, and not that not enough memory is available.
Run the application on your device with instruments running and turn on the leaks module to find where you are not freeing allocated memory.

Related

New empty iOS app has dozens of memory leaks

Using the Leaks Instruments tool on a new, from-scratch, one-view iOS app reports 23 leaks. This doesn't seem right — am I missing something? Repeated runs yield different leak counts, from 16 to 35. Steps to reproduce follow this screenshot.
A similar, unanswered question, was posted at Memory leak in login with amazon sample ios app
I'm using Xcode 10.2.1 (10E1001); iOS 12.2 (Simulator & device both show leaks, with or without Reveal activated.)
Create fresh one-view iOS app.
In Scheme > Run/Debug section, enable
Memory Management > Malloc Scribble
Logging > Malloc Stack (Live Allocations Only)
Run Product > Profile (⌘I)
First leak check is green; wait for second one.
Twenty-three new leaks! (As shown above.)
However, apart from Instruments, Debug Navigator disagrees:
Run normal debug session
Click "Debug Memory Graph" at top of Debug area.
Debug Navigator (below) has no purple exclamation marks (leak alerts).
The release notes for Xcode 10.3 say:
Resolved an issue where running an app in iOS 12.2 or later under the Leaks instrument resulted in random numbers of false-positive leaks for every leak check after the first one in a given run
That sounds exactly like this issue. So it was a bug (a Heisenbug?), and now it’s fixed.

my app is crash in xcode, but there is no stacktrace for this exception

this is a simple game running on iphone device, it will crash in some cases.but xcode only display this message:
error: memory read failed for 0xd00000000
there is no stack in the left panel.
i found the value in register pc 0xd00000000, it looks like the base address of this process.
i have add a exception breakpoint in xcode it will not active before crash.
this is the memory usage image, i have test it on iphone x:
so i want to know, how to find the directy reason of this crash? is there any method to break the process when the register change to a special value, in this case, when the pc register change to 0xd00000000, make xcode break.
stackoverflow exception cause this crash, it make my stack memory crashed,so xcode can't get the valid stacktrace of this tread.

Parse iOS framework causing memory crashes

I've used Xcode's zombie debugger and managed to find this flag upon launch:
This crashed the app, and re-recording from Instruments caused the same result. Relaunching the app from the device made the app launch without a crash and subsequent launches from Instruments resulted in normal operation without flags or crashes.
Can anyone make sense of this or advise? I'm getting a number of "heap corruption" crashes in production. The reports are limited to a handful of users, but I'm afraid that number is growing.
It looks like the Parse SDK's latest release notes (1.15.1) addresses this:
-Adds polygonal queries
-Fixes memory leaks related with PFCommandCache
But my crash reports are coming from builds with this SDK version.
The Parse team has responded saying that a fix for this is coming to a new SDK release soon. :)

Intermittent Xamarin.iOS crash with no exception thrown

I have created a Xamarin.Forms barcode scanning app with Android and iOS projects. The Android build appears to run fine, but the iOS build occasionally crashes and I am struggling to pin down the cause, as no crash log is produced and no exception is reported in the application output.
Under heavy load (non-stop barcode scanning) the app crashes after typically 200 or 300 barcodes have been scanned.
I am puzzled how such a crash can occur, leaving absolutely no evidence of its cause. Is there somewhere else I should be looking for the evidence, apart from within Xcode's Devices window? Shouldn't I expect an exception to be reported in the application output, while debugging?
I have implemented logging handlers for AppDomain.CurrentDomain.UnhandledException and TaskScheduler.UnobservedTaskException but they don't appear to be called. Is there some other way I can instrument my code to trap the cause of this crash?
Many thanks for your advice,
Tim
To get some output I always hit the continue button in visual studio debugger. The application stops, and for some reason I can see an exception in the output. Hope this helps.

WKWebView error calling any javascript in iOS 10 while debugging

Fun error that ONLY happens in iOS 10, when debugging on a physical device. It does not happen in the simulator, or when running on the physical device (while not debugging). It also does not happen on an iOS 9 device in any situation...only iOS 10 while debugging and after any javascript call has been executed.
I have a hybrid web app, written in Swift 2.3, after the xwebview loads I call various javascript methods...actually, any in this case. Anyway, after the javascript method has finished I get a malloc error saying I'm trying to free a pointer.
malloc: *** error for object 0x1740b5060: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
So I set the break point...and it never breaks on the breakpoint, it just keeps telling me to set a breakpoint.
If I remove all of my javascript calls, the error never happens. I've tried enabling them one by one, it doesn't matter, they all break after the callback returns.
I've been after this for about 2 weeks, I'm out of extra hair to pull out. At this point I'd love to hear if someone else is seeing the same thing.
It looks like its a safari bug and therefore only appears when you are debugging your webview with safari. In Safari under Develop->Your_Device_Name uncheck "Automatically Show Web Inspector for JSContexts".
This should resolve your issue.

Resources