UIWebView webCore crashes in iOS7.1 (example: www.latimes.com) - ios

I have being seeing crashes in my iOS app, when opening LA Times (www.latimes.com). The crash happens in WebCore somewhere and I have no clue where. Profiling with both "Zombie" or "leaks" do not return anything for this "EXE_BAD_ADDRESS" error.
I also checked with a small, bare UIWebView app and I could reproduce the effects.
Right now, I see this happening only with LA times, but I am not sure if there are other sites as well.
Can someone check on and guide me in what could be the possible error/source for this crash?
EDIT: I have added a small UIWebView project demonstrating this bug at
github
EDIT 2: The app (include the demo at github) works perfectly fine on iOS 7.0, but crashes in iOS 7.1 ... seems a recent bug with iOS 7.1. I have issued a bug report to Apple and will keep updated.
Thanks in advance,
Nikhil

I happened to bump into that same issue with one of my apps in iOS>7.0 only.
It seems to be a sync issue which can be fixed by creating the webview from the main thread only.
As a fix I just wrapped my UIWebView creation in a dispatch_sync(dispatch_get_main_queue(), ^{ ... });
And it solved the problem.
Of course if your code is running on the main thread you shouldn't wrap it this way ;)

Related

Admob crashes in ios13 but works on ios14

So I have a number of apps that were working fine. Just recently I tried some of them out on an earlier iOS (13.5) in the simulator and they ALL crash when I load the advert (interstitial.load or banner.load). They were ALL working on earlier simulators previously (some of them are a few years old so iOS 14 didn't even exist).
The error is:
Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
I don't understand what this means but there is no other context so Ive been struggling to understand what the issue is. It always stops at the .load line.
I am using app tracking transparency but have tried removing it and still get the same behaviour.
Has anyone else experienced this??
I don't know if its on real devices or just the simulators...(I don't have a real device with an old iOS to test it on).
Ive a feeling it might be to do with all the new privacy stuff that's flying around.
Thanks for any help.

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.

iOS crash below iOS9.3 with SIGSEGV, different Crash Log

Many crashes happened below the iOS9.3 (which means devices with iOS10 are OK)..
The crash logs seem to show that it's not a problem about API that can only be used below iOS 9.3 .
But I have no idea about the crash logs. ( I'm sorry ...for I just start to study iOS development for only 2 month )
Could you please help me analyze the crash logs ?
Really Thanks !
crash log 1
crash log 2
AXE_BAD_ACCESS - this is problem with memory. One of function tried to use variable which already released. I think you need to check use your TableView and cells for this table.
Also to find problem with memory you can try to use zombies
Used to have the similar strange crashes in my app. And only in production, when testing from TestFlight. Building on device with ios 9 caused no problems.
Maybe it sounds strange, but try to convert all images you use in app to images with included sRGB color profile. For me it helped.

Xcode 8 - Memory debugger doesn't work

I'm using Xcode 8 with Swift 3 to develop my app, but I noticed the Memory Debugger isn't working for some reason. Here the screenshot :
Do you know why? Is there something new I missed?
I had the idea to check if NSZombie was enabled and yes, it was. Disable it make everything works.

IOS report crash

I'm using crittercism to get the crash report from my ipad app.
What i need is to check if the app was crashed last time loaded at startup.
I'm using the CrittercismDelegate that contains crittercismDidCrashOnLastLoad on the appDelegate of my app but it seems does not work !!
any example/suggestions on this ?
this is Rob, one of the co-founders of Crittercism. That's a known bug that we're releasing a fix for early next week!
We will be adding some more info on our support page shortly:
https://www.crittercism.com/developers/feedback

Resources