Closed tipa closed 5 years ago
This issue also happen on iPhone 4s - iOS 9.3
Thank you for bringing this to our attention.
I'm not familiar with this scenario. Is there a difference in the target runtime version when you target 10.3 versus 11? I'm wondering whether this is a known Xamarin issue. Nothing in the StackTrace gives me a hint that the GraphServiceClient is the issue.
825004
I don't think there is a difference, but I am unsure how to check it.
Hi, When i tried to debug, and put the breakpoint on DelegateAuthenticationProvider. I saw visual studio show the error like above.
So I think DelegateAuthenticationProvider class have problem with ios 9, 10 or may be this issues will happen also on device 32 bit?
I also did implement IAuthenticationProvider in my own class (without using DelegateAuthenticationProvider): same problem.
Hello,
Do we have any solution or work around to solve this issue?
@huaminhquang I'm sorry, I don't have an update for you on this. I haven't tried Xamarin with iOS before. With that said, can you try running this sample with iOS: https://github.com/microsoftgraph/xamarin-csharp-snippets-sample
I know that my former co-worker had this running with iOS. I'd be interested to know whether the repro happens there.
@huaminhquang Xamarin.iOS itself has almost no conditional code based on the iOS version being executed. Whenever something works with a newer version of iOS then it's likely because the library calls an API that is not available in your older version (of iOS).
To diagnose this further we would need you to attach the symbolicated crash report (the stack trace above does not tell us, lack of symbols, where this happens). You can get this from device (where it crashed) using Xcode.
It's also often useful to have the device logs (also from Xcode or from VS) to see if iOS printed anything before crashing (e.g. a failed assertion).
@spouliot @MIchaelMainer : actually, we tried many times with your sample, the crash log still be same above. The moment when I tried to login, it's crashed with the log like above.
Environment VS 15.7.4 (Windows) Xamarin.iOS 11.12.0.4 Testdevice: iPhone 5 - iOS10.3.3
@huaminhquang the above comes from the mono runtime (not iOS) when it detect a crash. The symbols are quite large and not deployed on devices. IOW what mono has is not sufficient to show a useful stack trace.
The easiest way to get symbols is to have Xcode download (from device) and automatically symbolicate (from the build generated .dSYM) the operating system (iOS in this case) crash report. That will give a usable stack trace for all threads and additional information about the state of the process when it crashed.
@spouliot sp how can I get crash report on ios or iPhone devices in this case? Can u help me to do this?
@huaminhquang https://jmillerdev.net/symbolicating-ios-crash-files-xamarin-ios/ only the first part is normally required (step 1 to 4)
hi @spouliot Tks for your supporting us. This is the crash log from my device
Incident Identifier: 98E222AD-88D5-45E2-8BA2-996028E3471E CrashReporter Key: 657c2606e61d8b1bcb45522b3802e11d636cc222 Hardware Model: iPhone5,2 Process: Graph_Xamarin_CS_SnippetsiOS [13459] Path: /private/var/containers/Bundle/Application/8C4422BB-41B5-4069-AC31-1595FA65BAD5/Graph_Xamarin_CS_SnippetsiOS.app/Graph_Xamarin_CS_SnippetsiOS Identifier: com.yourcompany.Graph_Xamarin_CS_Snippets Version: 1.0 (1.0) Code Type: ARM (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.yourcompany.Graph_Xamarin_CS_Snippets [2950]
Date/Time: 2018-07-26 13:25:49.5567 +0700 Launch Time: 2018-07-26 13:25:46.0000 +0700 OS Version: iPhone OS 10.3.3 (14G60) Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000 Triggered by Thread: 0
Application Specific Information: abort() called
Filtered syslog: None found
Thread 0 name: tid_403 Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x1ba95acc pthread_kill + 8 1 libsystem_pthread.dylib 0x1bb4e086 pthread_kill + 62 2 libsystem_c.dylib 0x1ba2a9d2 abort + 108 3 libsystem_c.dylib 0x1ba2a966 abort + 0 4 Graph_Xamarin_CS_SnippetsiOS 0x02c33630 0xd4000 + 45479472 5 Graph_Xamarin_CS_SnippetsiOS 0x02b8b9f2 0xd4000 + 44792306 6 Graph_Xamarin_CS_SnippetsiOS 0x02b59282 0xd4000 + 44585602 7 Graph_Xamarin_CS_SnippetsiOS 0x02b58384 0xd4000 + 44581764 8 Graph_Xamarin_CS_SnippetsiOS 0x02b51c18 0xd4000 + 44555288 9 ??? 0000000000 0 + 0 10 Graph_Xamarin_CS_SnippetsiOS 0x02af4968 0xd4000 + 44173672 11 Graph_Xamarin_CS_SnippetsiOS 0x02af1cc8 0xd4000 + 44162248 12 Graph_Xamarin_CS_SnippetsiOS 0x02ae9040 0xd4000 + 44126272 13 Graph_Xamarin_CS_SnippetsiOS 0x02ae8c5c 0xd4000 + 44125276 14 Graph_Xamarin_CS_SnippetsiOS 0x02ae8358 0xd4000 + 44122968 15 Graph_Xamarin_CS_SnippetsiOS 0x004732a0 0xd4000 + 3797664 16 Graph_Xamarin_CS_SnippetsiOS 0x0046bce0 0xd4000 + 3767520 17 Graph_Xamarin_CS_SnippetsiOS 0x00455f34 0xd4000 + 3678004 18 Graph_Xamarin_CS_SnippetsiOS 0x000f1a60 0xd4000 + 121440 19 Graph_Xamarin_CS_SnippetsiOS 0x003ddf4c 0xd4000 + 3186508 20 Graph_Xamarin_CS_SnippetsiOS 0x02b63ba6 0xd4000 + 44628902 21 Graph_Xamarin_CS_SnippetsiOS 0x02bb4798 0xd4000 + 44959640 22 Graph_Xamarin_CS_SnippetsiOS 0x02bb7114 0xd4000 + 44970260 23 Graph_Xamarin_CS_SnippetsiOS 0x000d9a1e 0xd4000 + 23070 24 Graph_Xamarin_CS_SnippetsiOS 0x000d9f06 0xd4000 + 24326 25 UIKit 0x215695c4 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 376 26 UIKit 0x2176aa4a -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3706 27 UIKit 0x2176fc1c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1640 28 UIKit 0x217827c4 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3149 + 40 29 UIKit 0x2176d35a -[UIApplication workspaceDidEndTransaction:] + 142 30 FrontBoardServices 0x1dba8c12 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 18 31 FrontBoardServices 0x1dba8acc -[FBSSerialQueue _performNext] + 220 32 FrontBoardServices 0x1dba8db6 -[FBSSerialQueue _performNextFromRunLoopSource] + 44 33 CoreFoundation 0x1c283fdc CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 12 34 CoreFoundation 0x1c283b04 CFRunLoopDoSources0 + 424 35 CoreFoundation 0x1c281f50 __CFRunLoopRun + 1160 36 CoreFoundation 0x1c1d51ae CFRunLoopRunSpecific + 470 37 CoreFoundation 0x1c1d4fd0 CFRunLoopRunInMode + 104 38 UIKit 0x21562e2c -[UIApplication _run] + 660 39 UIKit 0x2155da52 UIApplicationMain + 150 40 Graph_Xamarin_CS_SnippetsiOS 0x00fa2ddc 0xd4000 + 15527388 41 Graph_Xamarin_CS_SnippetsiOS 0x00f35978 0xd4000 + 15079800 42 Graph_Xamarin_CS_SnippetsiOS 0x00f35938 0xd4000 + 15079736 43 Graph_Xamarin_CS_SnippetsiOS 0x000f18b8 0xd4000 + 121016 44 Graph_Xamarin_CS_SnippetsiOS 0x003ddf4c 0xd4000 + 3186508 45 Graph_Xamarin_CS_SnippetsiOS 0x02b63ba6 0xd4000 + 44628902 46 Graph_Xamarin_CS_SnippetsiOS 0x02bb4798 0xd4000 + 44959640 47 Graph_Xamarin_CS_SnippetsiOS 0x02bb85ca 0xd4000 + 44975562 48 Graph_Xamarin_CS_SnippetsiOS 0x02b50cb8 0xd4000 + 44551352 49 Graph_Xamarin_CS_SnippetsiOS 0x02c45150 0xd4000 + 45551952 50 Graph_Xamarin_CS_SnippetsiOS 0x000f1796 0xd4000 + 120726 51 libdyld.dylib 0x1b9c24ea start + 2
Thread 1: 0 libsystem_kernel.dylib 0x1ba9673c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1bb4a744 _pthread_wqthread + 728 2 libsystem_pthread.dylib 0x1bb4a45c start_wqthread + 8
Thread 2: 0 libsystem_kernel.dylib 0x1ba9673c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1bb4a8ea _pthread_wqthread + 1150 2 libsystem_pthread.dylib 0x1bb4a45c start_wqthread + 8
Thread 3: 0 libsystem_pthread.dylib 0x1bb4a454 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x1ba95808 psynch_cvwait + 24
1 libsystem_pthread.dylib 0x1bb4bc42 _pthread_cond_wait + 560
2 libsystem_pthread.dylib 0x1bb4cfc4 pthread_cond_wait + 38
3 libc++.1.dylib 0x1b4e7c56 std::1::condition_variable::wait+ 23638 (std::1::unique_lock
Thread 5 name: WebThread Thread 5: 0 libsystem_kernel.dylib 0x1ba80900 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x1ba806e0 mach_msg + 44 2 CoreFoundation 0x1c283be2 CFRunLoopServiceMachPort + 144 3 CoreFoundation 0x1c282064 CFRunLoopRun + 1436 4 CoreFoundation 0x1c1d51ae CFRunLoopRunSpecific + 470 5 CoreFoundation 0x1c1d4fd0 CFRunLoopRunInMode + 104 6 WebCore 0x203f9ce2 RunWebThread+ 212194 (void*) + 426 7 libsystem_pthread.dylib 0x1bb4c93a _pthread_body + 216 8 libsystem_pthread.dylib 0x1bb4c85c _pthread_start + 234 9 libsystem_pthread.dylib 0x1bb4a468 thread_start + 8
Thread 6 name: SGen worker Thread 6: 0 libsystem_kernel.dylib 0x1ba95808 __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x1bb4bc42 _pthread_cond_wait + 560 2 libsystem_pthread.dylib 0x1bb4cfc4 pthread_cond_wait + 38 3 Graph_Xamarin_CS_SnippetsiOS 0x02c1811c 0xd4000 + 45367580 4 libsystem_pthread.dylib 0x1bb4c93a _pthread_body + 216 5 libsystem_pthread.dylib 0x1bb4c85c _pthread_start + 234 6 libsystem_pthread.dylib 0x1bb4a468 thread_start + 8
Thread 7 name: Finalizer Thread 7: 0 libsystem_kernel.dylib 0x1ba80950 semaphore_wait_trap + 8 1 Graph_Xamarin_CS_SnippetsiOS 0x02b8cfb6 0xd4000 + 44797878 2 Graph_Xamarin_CS_SnippetsiOS 0x02bd7c22 0xd4000 + 45104162 3 libsystem_pthread.dylib 0x1bb4c93a _pthread_body + 216 4 libsystem_pthread.dylib 0x1bb4c85c _pthread_start + 234 5 libsystem_pthread.dylib 0x1bb4a468 thread_start + 8
Thread 8 name: com.apple.uikit.eventfetch-thread Thread 8: 0 libsystem_kernel.dylib 0x1ba80900 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x1ba806e0 mach_msg + 44 2 CoreFoundation 0x1c283be2 CFRunLoopServiceMachPort + 144 3 CoreFoundation 0x1c282064 CFRunLoopRun + 1436 4 CoreFoundation 0x1c1d51ae CFRunLoopRunSpecific + 470 5 CoreFoundation 0x1c1d4fd0 CFRunLoopRunInMode + 104 6 Foundation 0x1cb29af4 -[NSRunLoop+ 47860 (NSRunLoop) runMode:beforeDate:] + 258 7 Foundation 0x1cb4676c -[NSRunLoop+ 165740 (NSRunLoop) runUntilDate:] + 86 8 UIKit 0x21e5ead8 -[UIEventFetcher threadMain] + 128 9 Foundation 0x1cc0d8ea NSThreadstart__ + 1122 10 libsystem_pthread.dylib 0x1bb4c93a _pthread_body + 216 11 libsystem_pthread.dylib 0x1bb4c85c _pthread_start + 234 12 libsystem_pthread.dylib 0x1bb4a468 thread_start + 8
Thread 9: 0 libsystem_pthread.dylib 0x1bb4a454 start_wqthread + 0
Thread 10: 0 libsystem_pthread.dylib 0x1bb4a454 start_wqthread + 0
Thread 0 crashed with ARM Thread State (32-bit): r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0xffffffff r4: 0x00000006 r5: 0x39a9de40 r6: 0x15bb5d10 r7: 0x031badf4 r8: 0x15a9aa00 r9: 0x3618e070 r10: 0x1564bb40 r11: 0x031bb2e0 ip: 0x00000148 sp: 0x031bade8 lr: 0x1bb4e087 pc: 0x1ba95acc cpsr: 0x00000010
Binary Images:
0xd4000 - 0x2e0ffff Graph_Xamarin_CS_SnippetsiOS armv7 <1660abc1c6f23ad68e8dc0de551dde10> /var/containers/Bundle/Application/8C4422BB-41B5-4069-AC31-1595FA65BAD5/Graph_Xamarin_CS_SnippetsiOS.app/Graph_Xamarin_CS_SnippetsiOS
0x3052000 - 0x307dfff dyld armv7s
EOF
Hi,
Do we have Any update on this issue?
Hi,
Do we have Any update on this issue?
Hi,
Do we have Any update on this issue?
@huaminhquang I don't have an update no this issue. @spouliot can you help us now that we have the crash log?
The crash log is not symbolicated, e.g.
4 Graph_Xamarin_CS_SnippetsiOS 0x02c33630 0xd4000 + 45479472
5 Graph_Xamarin_CS_SnippetsiOS 0x02b8b9f2 0xd4000 + 44792306
6 Graph_Xamarin_CS_SnippetsiOS 0x02b59282 0xd4000 + 44585602
7 Graph_Xamarin_CS_SnippetsiOS 0x02b58384 0xd4000 + 44581764
8 Graph_Xamarin_CS_SnippetsiOS 0x02b51c18 0xd4000 + 44555288
9 ??? 0000000000 0 + 0
10 Graph_Xamarin_CS_SnippetsiOS 0x02af4968 0xd4000 + 44173672
11 Graph_Xamarin_CS_SnippetsiOS 0x02af1cc8 0xd4000 + 44162248
12 Graph_Xamarin_CS_SnippetsiOS 0x02ae9040 0xd4000 + 44126272
13 Graph_Xamarin_CS_SnippetsiOS 0x02ae8c5c 0xd4000 + 44125276
14 Graph_Xamarin_CS_SnippetsiOS 0x02ae8358 0xd4000 + 44122968
15 Graph_Xamarin_CS_SnippetsiOS 0x004732a0 0xd4000 + 3797664
16 Graph_Xamarin_CS_SnippetsiOS 0x0046bce0 0xd4000 + 3767520
17 Graph_Xamarin_CS_SnippetsiOS 0x00455f34 0xd4000 + 3678004
18 Graph_Xamarin_CS_SnippetsiOS 0x000f1a60 0xd4000 + 121440
19 Graph_Xamarin_CS_SnippetsiOS 0x003ddf4c 0xd4000 + 3186508
20 Graph_Xamarin_CS_SnippetsiOS 0x02b63ba6 0xd4000 + 44628902
21 Graph_Xamarin_CS_SnippetsiOS 0x02bb4798 0xd4000 + 44959640
22 Graph_Xamarin_CS_SnippetsiOS 0x02bb7114 0xd4000 + 44970260
23 Graph_Xamarin_CS_SnippetsiOS 0x000d9a1e 0xd4000 + 23070
24 Graph_Xamarin_CS_SnippetsiOS 0x000d9f06 0xd4000 + 24326
are all addresses that we don't know how to map to actual code (i.e. it should show your code or Xamarin.iOS code).
This is usually because the crash report was not extracted correctly, e.g. from a computer that does not have the corresponding .dSYM
(which is the symbol database).
The crashlog should look like
Incident Identifier: 7A2C51CA-E1B7-4523-A56E-4BBC2F9A0584
CrashReporter Key: ed5eecf4a894fd4b543ab34bc0c9fdb4a409ab65
Hardware Model: iPhone7,1
Process: dont link [876]
Path: /var/containers/Bundle/Application/DC4E69AD-8C68-4F2A-811E-7D8032DBD58B/dont link.app/dont link
Identifier: com.xamarin.dontlink
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2018-09-04 09:14:55.55 -0400
Launch Time: 2018-09-04 09:14:35.35 -0400
OS Version: iOS 9.3.5 (13G36)
Report Version: 105
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Exception Note: SIMULATED (this is NOT a crash)
Highlighted by Thread: 0
Application Specific Information:
com.xamarin.dontlink failed to launch after 20.00s (launchIntent: foreground-interactive)
Elapsed total CPU time (seconds): 20.580 (user 20.580, system 0.000), 51% CPU
Elapsed application CPU time (seconds): 11.112, 28% CPU
Filtered syslog:
None found
Thread 0 name: tid_c07 Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_platform.dylib 0x2511d834 _sigtramp + 0
1 Xamarin.iOS.dll 0x01bf9e00 wrapper_native_to_managed_ObjCRuntime_Runtime_register_assembly_intptr_int_ + 236
2 Xamarin-debug 0x0059e980 xamarin_register_assembly + 256384 (delegates.inc:101)
3 Xamarin-debug 0x005a0878 register_assembly(_MonoAssembly*, unsigned int*) + 264312 (runtime.m:960)
4 Xamarin-debug 0x005a17e4 xamarin_initialize + 268260 (runtime.m:1372)
5 Xamarin-debug 0x005b574c xamarin_main + 350028 (monotouch-main.m:429)
6 dont link 0x001656db main + 562907 (main.m:74)
7 libdyld.dylib 0x24fa8873 start + 3
where you can see both the managed and native (*.m) symbols from the application. That tells us exactly where the crash happened.
Please reopen if you are still experiencing these specific issues.
I am using Microsoft.Graph 1.9.0 (NuGet) in a Xamarin.iOS project. Calling the GraphServiceClient constructor on a physical device running iOS 10.3 (in my case a iPhone 5C) crashes the app. No crash happens on a physical device or emulator running iOS 11.
Crash log that appears in the VS output console:
I also tried pulling the repo to debug it directly but I failed building the library (although following the steps in the readme).
Environment
VS 15.7.4 (Windows) Xamarin.iOS 11.12.0.4 Testdevice: iPhone 5C - iOS10.3.3