Skip to content

Instantly share code, notes, and snippets.

@spatrickapps
Created August 28, 2016 15:24
Show Gist options
  • Save spatrickapps/e935d4f1bd1e86d04f02dbd53201d9ff to your computer and use it in GitHub Desktop.
Save spatrickapps/e935d4f1bd1e86d04f02dbd53201d9ff to your computer and use it in GitHub Desktop.
keeps crashing on ios 9.0.2 and some others.
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x183151b90 0x183138000 + 0x19b90 // objc_msgSend + 0x10
1 + UVD.dylib 0x107bde4bc 0x107bd4000 + 0xa4bc // Logos hook for -[WKWebView(_ungrouped) videoPlayingDidChange:](WKWebView*, objc_selector*, NSNotification*) + 0xa0
2 CoreFoundation 0x183a7cdfc 0x1839b0000 + 0xccdfc // __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 0x14
3 CoreFoundation 0x183a7c61c 0x1839b0000 + 0xcc61c // _CFXRegistrationPost + 0x18c
4 CoreFoundation 0x183a7c39c 0x1839b0000 + 0xcc39c // ___CFXNotificationPost_block_invoke + 0x3c
5 CoreFoundation 0x183ae5414 0x1839b0000 + 0x135414 // -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 0x5fc
6 CoreFoundation 0x1839ba6c8 0x1839b0000 + 0xa6c8 // _CFXNotificationPost + 0x170
7 CoreFoundation 0x1839dd0ec 0x1839b0000 + 0x2d0ec // CFNotificationCenterPostNotification + 0x78
8 CoreMedia 0x185e7420c 0x185e58000 + 0x1c20c // CMNotificationCenterPostNotification + 0x7c
9 MediaToolbox 0x189a7a870 0x189a64000 + 0x16870 // playerremote_postNotification + 0x26c
10 MediaToolbox 0x189a7c41c 0x189a64000 + 0x1841c // playerremote_postNotificationWithPayload + 0x90
11 MediaToolbox 0x189b79d64 0x189a64000 + 0x115d64 // playerremote_fetchNotifications + 0x234
12 MediaToolbox 0x189a79fb4 0x189a64000 + 0x15fb4 // FigPlayerRemoteCallbacksServer_SendNotifyPing + 0x84
13 MediaToolbox 0x189a79f04 0x189a64000 + 0x15f04 // _XSendNotifyPing + 0x38
14 MediaToolbox 0x189a76494 0x189a64000 + 0x12494 // figmoviecallbacks_server + 0x6c
15 MediaToolbox 0x189b79954 0x189a64000 + 0x115954 // fpr_ClientPortDispatchCallBack + 0x10
16 libdispatch.dylib 0x18352bba8 0x183524000 + 0x7ba8 // dispatch_mig_server + 0x1b0
17 libdispatch.dylib 0x18352547c 0x183524000 + 0x147c // _dispatch_client_callout + 0x10
18 libdispatch.dylib 0x18353c090 0x183524000 + 0x18090 // _dispatch_source_latch_and_call + 0x9fc
19 libdispatch.dylib 0x183527970 0x183524000 + 0x3970 // _dispatch_source_invoke + 0x328
20 libdispatch.dylib 0x18352a63c 0x183524000 + 0x663c // _dispatch_main_queue_callback_4CF + 0x1ec
21 CoreFoundation 0x183a90d50 0x1839b0000 + 0xe0d50 // __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 0xc
22 CoreFoundation 0x183a8ebb8 0x1839b0000 + 0xdebb8 // __CFRunLoopRun + 0x65c
23 CoreFoundation 0x1839b8c50 0x1839b0000 + 0x8c50 // CFRunLoopRunSpecific + 0x180
24 GraphicsServices 0x1852a0088 0x185294000 + 0xc088 // GSEventRunModal + 0xb4
25 + BigShotJb.dylib 0x100698e68 0x100694000 + 0x4e68 // Logos hook for -[UIApplication(_ungrouped) _run](UIApplication*, objc_selector*) + 0x1d8
26 UIKit 0x188ca2088 0x188c24000 + 0x7e088 // UIApplicationMain + 0xcc
27 MobileSafari (*) 0x100073ff0 0x100070000 + 0x3ff0 // 0x00003724 + 0x8cc
28 libdyld.dylib 0x1835568b8 0x183554000 + 0x28b8 // start + 0x4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x38bcfae6 0x38bbc000 + 0x13ae6 // objc_msgSend + 0x6
1 WebKit 0x2c38fb0c 0x2c1a3000 + 0x1ecb0c // -[WKWebView initWithFrame:configuration:] + 0xec
2 + UVD.dylib 0x06efaaec 0x06ef6000 + 0x4aec // Logos hook for -[WKWebView(_ungrouped) initWithFrame:configuration:](WKWebView*, objc_selector*, CGRect*, objc_object*) + 0xd8
3 WebUI 0x370fe212 0x370fc000 + 0x2212 // -[WBUFormAutoFillWebView initWithFrame:configuration:] + 0x36
4 MobileSafari (*) 0x0012f9e0 0x00065000 + 0xca9e0 // -[TabDocument _createDocumentViewWithConfiguration:] + 0xeb
5 MobileSafari (*) 0x0012ed82 0x00065000 + 0xc9d82 // -[TabDocument unhibernateWithRelatedWebView:] + 0xe5
6 MobileSafari (*) 0x0006b5aa 0x00065000 + 0x65aa // -[TabController openInitialBlankTabDocumentIfNeeded] + 0x1ed
7 MobileSafari (*) 0x00097110 0x00065000 + 0x32110 // -[BrowserController setupWithURL:launchOptions:] + 0x2b3
8 MobileSafari (*) 0x00076d66 0x00065000 + 0x11d66 // -[Application application:didFinishLaunchingWithOptions:] + 0x661
9 UIKit 0x2b647f6e 0x2b5c3000 + 0x84f6e // -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 0x18a
10 UIKit 0x2b869552 0x2b5c3000 + 0x2a6552 // -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 0xc0e
11 UIKit 0x2b86d3e6 0x2b5c3000 + 0x2aa3e6 // -[UIApplication _runWithMainScene:transitionContext:completion:] + 0x612
12 UIKit 0x2b880370 0x2b5c3000 + 0x2bd370 // __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3181 + 0x24
13 UIKit 0x2b86a90e 0x2b5c3000 + 0x2a790e // -[UIApplication workspaceDidEndTransaction:] + 0x86
14 FrontBoardServices 0x2f62dccc 0x2f609000 + 0x24ccc // -[FBSSerialQueue _performNext] + 0xe8
15 FrontBoardServices 0x2f62dfb8 0x2f609000 + 0x24fb8 // -[FBSSerialQueue _performNextFromRunLoopSource] + 0x2c
16 CoreFoundation 0x27486826 0x273ce000 + 0xb8826 // __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 0xe
17 CoreFoundation 0x27486416 0x273ce000 + 0xb8416 // __CFRunLoopDoSources0 + 0x1c6
18 CoreFoundation 0x2748477e 0x273ce000 + 0xb677e // __CFRunLoopRun + 0x326
19 CoreFoundation 0x273d71e8 0x273ce000 + 0x91e8 // CFRunLoopRunSpecific + 0x204
20 CoreFoundation 0x273d6fdc 0x273ce000 + 0x8fdc // CFRunLoopRunInMode + 0x6c
21 UIKit 0x2b64142e 0x2b5c3000 + 0x7e42e // -[UIApplication _run] + 0x20e
22 + BigShotJb.dylib 0x0086e7fc 0x0086a000 + 0x47fc // Logos hook for -[UIApplication(_ungrouped) _run](UIApplication*, objc_selector*) + 0x240
23 UIKit 0x2b63c17c 0x2b5c3000 + 0x7917c // UIApplicationMain + 0x90
24 MobileSafari (*) 0x0006a054 0x00065000 + 0x5054 // 0x000047d0 + 0x884
25 libdyld.dylib 0x392ed872 0x392eb000 + 0x2872 // start + 0x2
%hook WKWebView
WKWebView *wkWebView;
%new
- (void)videoPlayingDidChange:(NSNotification *)notification {
BOOL isPlaying = [notification.userInfo[@"IsPlaying"] boolValue];
if(isPlaying){
NSLog(@"Video play changed");
@try {
[wkWebView evaluateJavaScript:@"document.querySelector('video').currentSrc;" completionHandler:^(id result, NSError *error) {
// result will contain the video url
NSString *myString = (NSString *)result;
NSURL *url = [NSURL URLWithString:myString];
NSLog(@"Java script result = %@",result);
}];
}
@catch (NSException *exception) {
NSLog(@"%@", exception.reason);
NSLog(@"Exception: %@", exception);
}
}
return;
}
// Used by Safari
- (id)initWithFrame:(CGRect *)arg1 configuration:(id)arg2 {
wkWebView = %orig;
@try {
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"SomeClientPlayingDidChange" object:nil];
}
@catch (NSException *exception) {
NSLog(@"%@", exception.reason);
NSLog(@"Exception: %@", exception);
}
@try {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(videoPlayingDidChange:)
name:@"SomeClientPlayingDidChange"
object:nil];
}@catch (NSException *exception) {
NSLog(@"%@", exception.reason);
NSLog(@"Exception: %@", exception);
}
NSLog(@"WK TWO");
return wkWebView;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment