k-thorat
k-thorat

Reputation: 5123

Crashed: WebThread - EXC_BAD_ACCESS KERN_INVALID_ADDRESS

Since November 8, 2016, we've seen a sudden increase in crashes from WebThread. We don't know what is causing the crash.

We do have web articles and ads in the app. We did not have any App Release. There were no significant changes on the web or ads.

Since crashes are happening on screens without articles, we are thinking it is happening on ads.

Is anyone else seeing this? Any thoughts, ideas, anything?

Stack trace:

Crashed: WebThread
0  WebCore                        0x184b7e47c WTF::HashMap<WTF::String, WebCore::ApplicationCacheGroup*, WTF::StringHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WebCore::ApplicationCacheGroup*> >::remove(WTF::String const&) + 48
1  WebCore                        0x184b7abbc WebCore::ApplicationCacheStorage::cacheGroupDestroyed(WebCore::ApplicationCacheGroup*) + 52
2  WebCore                        0x184b7abbc WebCore::ApplicationCacheStorage::cacheGroupDestroyed(WebCore::ApplicationCacheGroup*) + 52
3  WebCore                        0x184b70628 WebCore::ApplicationCacheGroup::~ApplicationCacheGroup() + 56
4  WebCore                        0x184b70b10 WebCore::ApplicationCacheGroup::~ApplicationCacheGroup() + 12
5  WebCore                        0x184b72334 WebCore::ApplicationCacheGroup::disassociateDocumentLoader(WebCore::DocumentLoader*) + 184
6  WebCore                        0x184a024a0 WebCore::ApplicationCacheHost::~ApplicationCacheHost() + 48
7  WebCore                        0x184a01ad0 WebCore::DocumentLoader::~DocumentLoader() + 168
8  WebKitLegacy                   0x185976ba8 WebDocumentLoaderMac::~WebDocumentLoaderMac() + 84
9  WebCore                        0x184e30a78 WebCore::FrameLoader::detachFromParent() + 324
10 WebKitLegacy                   0x1859e0b08 __29-[WebView(WebPrivate) _close]_block_invoke + 348
11 WebCore                        0x1857842c4 HandleRunSource(void*) + 368
12 CoreFoundation                 0x180ab509c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
13 CoreFoundation                 0x180ab4ab0 __CFRunLoopDoSources0 + 412
14 CoreFoundation                 0x180ab2830 __CFRunLoopRun + 724
15 CoreFoundation                 0x1809dcc50 CFRunLoopRunSpecific + 384
16 WebCore                        0x1849ce108 RunWebThread(void*) + 456
17 libsystem_pthread.dylib        0x180763b28 _pthread_body + 156
18 libsystem_pthread.dylib        0x180763a8c _pthread_body + 154
19 libsystem_pthread.dylib        0x180761028 thread_start + 4

Upvotes: 12

Views: 6156

Answers (3)

k-thorat
k-thorat

Reputation: 5123

Answering my own question to add more details than comment area.
Not marking as answered as I don't have solution.

Unfortunately, we were not able to solve issue. Fortunately, crash rate came down after 2-3 days.

After spending 3 days, we were certain it was related to Google Ads. However, Why crash rate went up and down is still a mystery for us.

Some notes/conclusion:

  • Are we doing something stupid when requesting/handling ads?
    • Possible, but chances are very thin as it was happening to existing stable release.
  • Is this happening to specific ad(s)?
    • crash rate went down because we are not serving that ad(s) anymore?
  • GoogleAds team came to rescue and acted like nothing happen? because... :)
  • Not a new issue - Crashlytics was showing first occurrence of this type of crash was months before.

Upvotes: 2

Jake Samz
Jake Samz

Reputation: 134

Simply put, the crash you are experiencing is because of a memory leak.

A variable or object is trying to access restricted memory, which will result in this crash. My guess is that one of the advertising frameworks/APIs you are using did not handle the iOS 10.1.1 (Build 14B100) update which came out October 31st, 2016. This could be the cuase of your crash.

It also occurred to me that this seems to be happening during some sort of a call to a close/exit function. If so, MAKE SURE you are releasing objects, variables, and anything else that has been assigned memory, properly. If your code or program is releasing everything the correct way, then it is the advertisement framework/API causing your issues.

Cheers!

Upvotes: 0

PDK
PDK

Reputation: 1536

Two branches of ideas two explore:

https://stackoverflow.com/a/32078697/3419541

may be that the user is closing the web view just before it tries to send a delegate callback and it crashes because it doesn't exist.

https://stackoverflow.com/a/31673840/3419541

guessing something is going wrong with the caching of a resource.

Upvotes: 0

Related Questions