Closed t9mike closed 4 years ago
Got an idea for a new introspection tests to run all .cctor
:)
I'll fix that while testing the test...
Thank you @spouliot. Is there a nightly build or other installer available to try this out?
@t9mike soon but not yet. Packages are built after the PR is merged (which happened 2 hours ago). Look at the commit itself, e.g. https://github.com/xamarin/xamarin-macios/commit/9a8855117bb855aaff65b7aaaa67d9fdc8f4e6f6 for master, and (in a few hours) you'll see packages that correspond to the commit.
A bit later (once the back port to d16-6 is merged) you'll have packages for d16-6 (our next public release).
@spouliot I was able to use OSLog against iPhone real device OK and saw expected output in Console. With watchOS real device, I get crash. But this is unrelated to OSLog as once I disabled OSLog I still get crash. OK on simulator.
I used stock Release channel everything else and installed Xamarin.iOS 13.19.0.76 package. Do I need to install other packages to try this out on watchOS?
0 libsystem_kernel.dylib 0x21050c70 __pthread_kill + 8
1 libsystem_pthread.dylib 0x210cd980 pthread_kill + 220
2 libsystem_c.dylib 0x20fa46f4 abort + 100
3 SundialWatchAppExtension 0x04cec534 print_callback(char const*, int) + 12584244 (runtime.m:1218)
4 SundialWatchAppExtension 0x04cda330 monoeg_g_logv_nofree + 12510000 (goutput.c:150)
5 SundialWatchAppExtension 0x04cda380 monoeg_g_log + 12510080 (goutput.c:165)
6 SundialWatchAppExtension 0x04ccc9b8 mono_threads_transition_do_blocking + 12454328 (mono-threads-state-machine.c:753)
7 SundialWatchAppExtension 0x04cca4a0 mono_threads_enter_gc_safe_region_unbalanced_with_info + 12444832 (mono-threads-coop.c:324)
8 SundialWatchAppExtension 0x04c36a6c mono_gc_pthread_create + 11840108 (sgen-mono.c:2444)
9 SundialWatchAppExtension 0x04ccb784 mono_thread_platform_create_thread + 12449668 (mono-threads-posix.c:97)
10 SundialWatchAppExtension 0x04c59b08 create_thread + 11983624 (threads.c:1385)
11 SundialWatchAppExtension 0x04c595cc mono_thread_create_internal + 11982284 (threads.c:529)
12 SundialWatchAppExtension 0x04bb3ca0 mono_gc_init_finalizer_thread + 11304096 (gc.c:1004)
13 SundialWatchAppExtension 0x04cf3dd8 -[XamarinGCSupport init] + 12615128 (monotouch-main.m:0)
14 SundialWatchAppExtension 0x04cf41cc xamarin_main + 12616140 (monotouch-main.m:463)
15 SundialWatchAppExtension 0x041019dc xamarin_watchextension_main + 88540 (main.m:65)
16 libdyld.dylib 0x20ed0a78 start + 4
Watch extension:
@t9mike the stack trace looks related to the GC initialization (on XI side). Can you file a operate issue for this and attach the symbolicated crash report from the device (so we can see what other threads were doing).
The same fix, backported to d16-6, is now available from packages inside https://github.com/xamarin/xamarin-macios/commit/514991e903313f5c195fcc11700a4d1100e9f530#commitcomment-37486792 That's an older mono (and closer to the current on stable - even if the delta is quite large at this time).
Steps to Reproduce
Expected Behavior
Construct an OSLog
Actual Behavior
System.TypeInitializationException: The type initializer for 'CoreFoundation.OSLog' threw an exception. ---> System.Exception: Could not initialize an instance of the type 'CoreFoundation.OSLog': handle is null. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false. at CoreFoundation.NativeObject.InitializeHandle (System.IntPtr handle) [0x00014] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/CoreFoundation/NativeObject.cs:74 at CoreFoundation.NativeObject.set_Handle (System.IntPtr value) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/CoreFoundation/NativeObject.cs:34 at CoreFoundation.NativeObject..ctor (System.IntPtr handle, System.Boolean owns) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/CoreFoundation/NativeObject.cs:43 at CoreFoundation.OSLog..ctor (System.IntPtr handle, System.Boolean owns) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/CoreFoundation/OSLog.cs:59 at CoreFoundation.OSLog..cctor () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/CoreFoundation/OSLog.cs:32 --- End of inner exception stack trace --- at OSLogTest.ViewController.ViewDidLoad () [0x00008] in /Users/mmuegel/Projects/OSLogTest/ViewController.cs:19 at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/UIKit/UIApplication.cs:86 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.30/src/Xamarin.iOS/UIKit/UIApplication.cs:65 at OSLogTest.Application.Main (System.String[] args) [0x00001] in /Users/mmuegel/Projects/OSLogTest/Main.cs:12
Environment
Build Logs
Example Project (If Possible)
OSLogTest.zip #