Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for native iOS and Android symbolication support for the .NET provider (.net-Android, .net-iOS) #532

Open
fsaffioti opened this issue May 31, 2024 · 3 comments

Comments

@fsaffioti
Copy link

Since Raygun handles the marshaling of native exceptions in .NET-Android and .NET-iOS, I would request that Raygun add support for native iOS and Android symbolication for the Raygun4Net.NetCore

@ProRedCat
Copy link
Contributor

ProRedCat commented Jun 4, 2024

Thank you for your suggestion regarding adding support for native iOS and Android symbolication in Raygun4Net.NetCore. We appreciate your input and are taking a look into possibly implementing this.

To better understand the necessity and context of this request, could you provide specific examples where symbolication is required? This would help us assess the impact and prioritize this feature accordingly.

In many cases, marshaled exceptions tend to be lower-level exceptions that may not directly relate to the code you have written. For instance, on Android, you might encounter exceptions like FileNotFoundException that are more related to system-level operations rather than application-level logic.

In the above case, symbolication isn't required. Could you share any examples where you do need this, one case where this might be required is when a binding library causes errors but I'd like to know what specific use case you have for this.

@fsaffioti
Copy link
Author

To understand, Would symbolication be helpful in understanding errors like these?

this ios
Class name
Foundation.MonoTouchException
Message
Objective-C exception thrown. Name: CALayerInvalidGeometry Reason: CALayer position contains NaN: [nan nan]. Layer: <CALayer:0x3085c5a20; position = CGPoint (195 417.167); bounds = CGRect (0 0; 0 0); delegate = <_UIMorphingPlatterView: 0x1602041b0; frame = (195 417.167; 0 0); gestureRecognizers = <NSArray: 0x30554bcf0>; layer = <CALayer: 0x3085c5a20>>; sublayers = (<CALayer: 0x3085c6920>, <CALayer: 0x3085c59c0>, <CALayer: 0x3085c6680>); opaque = YES; allowsGroupOpacity = YES; cornerRadius = 13; transform = CATransform3D (1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1)>
Native stack trace:
0 CoreFoundation 0x000000018ecf2b34 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 969524
1 libobjc.A.dylib 0x0000000186b66f78 objc_exception_throw + 60
2 CoreFoundation 0x000000018ed782a4 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 1516196
3 QuartzCore 0x00000001902a8730 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 194352
4 QuartzCore 0x00000001902a8660 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 194144
5 UIKitCore 0x0000000190ee346c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 398444
6 UIKitCore 0x0000000190eb7b70 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 220016
7 UIKitCore 0x0000000192103780 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 19404672
8 UIKitCore 0x000000019185b39c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 10326940
9 UIKitCore 0x0000000191c011e4 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 14152164
10 UIKitCore 0x0000000191c01910 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 14154000
11 UIKitCore 0x0000000191e3002c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 16441388
12 UIKitCore 0x0000000190f08000 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 548864
13 UIKitCore 0x0000000190f0597c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 539004
14 UIKitCore 0x0000000190f05704 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 538372
15 UIKitCore 0x0000000190fb8174 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 1270132
16 UIKitCore 0x0000000191370784 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 5171076
17 UIKitCore 0x000000019136ff90 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 5169040
18 UIKitCore 0x000000019136fb60 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 5167968
19 UIKitCore 0x0000000191c6a474 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 14582900
20 UIKitCore 0x0000000191050ee8 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 1896168
21 UIKitCore 0x00000001910789e0 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2058720
22 UIKitCore 0x000000019217e984 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 19908996
23 UIKitCore 0x0000000191f16404 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17384452
24 UIKitCore 0x0000000191632fa4 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 8064932
25 UIKitCore 0x0000000191f4196c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17561964
26 UIKitCore 0x0000000191f9325c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17896028
27 UIKitCore 0x0000000191f93578 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17896824
28 UIFoundation 0x0000000199fc1490 9B908AF6-F5C3-3470-A91F-7A355737846E + 66704
29 UIKitCore 0x0000000191f934ec 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17896684
30 UIKitCore 0x0000000191f93018 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17895448
31 UIKitCore 0x0000000191f9335c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 17896284
32 UIKitCore 0x0000000191fbb2ec 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 18060012
33 UIKitCore 0x0000000191fb072c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 18016044
34 <myapp> 0x0000000101cb8718 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 11043668
35 <myapp> 0x0000000101c12c64 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 10365088
36 <myapp> 0x0000000103e10640 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 46006908
37 <myapp> 0x00000001013f946c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 1872040
38 <myapp> 0x0000000101395074 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 1461424
39 <myapp> 0x0000000101aa5800 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 8868924
40 <myapp> 0x0000000104a025ac _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 587920
41 <myapp> 0x0000000104abcd78 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 1351772
42 <myapp> 0x0000000104ac05b8 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 1366172
43 <myapp> 0x00000001012e07a0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 721884
44 <myapp> 0x0000000101303340 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 864124
45 UIKitCore 0x0000000191107864 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2644068
46 UIKitCore 0x000000019110729c 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2642588
47 UIKitCore 0x00000001911057e8 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2635752
48 UIKitCore 0x00000001911052d0 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2634448
49 UIKitCore 0x0000000190eb50f8 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 209144
50 QuartzCore 0x00000001902dfe30 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 421424
51 QuartzCore 0x00000001902df9b4 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 420276
52 QuartzCore 0x00000001902e5bb4 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 445364
53 QuartzCore 0x00000001902df1bc A53570F9-DC4A-3B41-9932-B1A081E6E520 + 418236
54 QuartzCore 0x00000001902dee64 A53570F9-DC4A-3B41-9932-B1A081E6E520 + 417380
55 UIKitCore 0x0000000190f2d260 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 701024
56 UIKitCore 0x0000000190f2cd78 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 699768
57 UIKitCore 0x0000000190f2c468 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 697448
58 UIKitCore 0x0000000190f2c524 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 697636
59 CoreFoundation 0x000000018ec3d62c 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 226860
60 CoreFoundation 0x000000018ec3c8a8 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 223400
61 CoreFoundation 0x000000018ec3b058 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 217176
62 CoreFoundation 0x000000018ec39d88 3A5F992A-D1CD-312E-BD2E-F7C66343A417 + 212360
63 CoreFoundation 0x000000018ec39968 CFRunLoopRunSpecific + 608
64 GraphicsServices 0x00000001d2f2f4e0 GSEventRunModal + 164
65 UIKitCore 0x00000001910acedc 7BF01CFC-23F1-326A-AFD8-AD967FFECE28 + 2272988
66 UIKitCore 0x00000001910ac518 UIApplicationMain + 340
67 <myapp> 0x0000000104b89ef8 xamarin_UIApplicationMain + 24
68 <myapp> 0x0000000101cb5f7c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 11033528
69 <myapp> 0x0000000101bf5dc4 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 10246656
70 <myapp> 0x0000000101bf5ec0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 10246908
71 <myapp> 0x0000000101377d24 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 1341792
72 <myapp> 0x0000000101aa5800 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 8868924
73 <myapp> 0x0000000104a025ac _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 587920
74 <myapp> 0x0000000104abcd78 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 1351772
75 <myapp> 0x0000000104ac3080 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 1377124
76 <myapp> 0x00000001049e08bc _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 449440
77 <myapp> 0x0000000104b9e2bc xamarin_GetFolderPath + 4860
78 <myapp> 0x000000010136a794 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 1287120
79 dyld 0x00000001b215ad84 7BE2B757-3B3D-3E91-8CB7-74F3887660C7 + 23940

this android
Class name
Java.IO.IOException
Message: Stream closed
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():12
Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args):110
Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters):60
Java.IO.Reader.Ready():10
<my sub project>+d__16.MoveNext():17
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():12
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_1(Object state)
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state):7
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx):113
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem():33
System.Threading.ThreadPoolWorkQueue.Dispatch():116
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

this android
Class name
Java.Lang.RuntimeException
Message
Fragment PaymentFragment{261b5c7} (a867fd69-8b54-410d-91dc-13090f8b4d4e tag=f0) did not call through to super.onPause()

this android
Class name
Java.Lang.IncompatibleClassChangeError
Message: no non-static method "Landroid/app/Service;.stopForeground(I)V"
Java.Interop.JniEnvironment+InstanceMethods.GetMethodID(Java.Interop.JniObjectReference type, System.String name, System.String signature) in
Java.Interop.JniType.GetInstanceMethod(System.String name, System.String signature) in
Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo(System.String encodedMember) in
Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod(System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) in
Android.App.Service.StopForeground(Android.App.StopForegroundFlags flags) in <374cdfafcd7e4b6c97e9676328726afc>
<my app>.OnStartCommand(Android.Content.Intent intent, Android.App.StartCommandFlags flags, System.Int32 startId) in
Android.App.Service.n_OnStartCommand_Landroid_content_Intent_II(System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_intent, System.Int32 native_flags, System.Int32 startId) in <374cdfafcd7e4b6c97e9676328726afc>
Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLII_I(_JniMarshal_PPLII_I callback, System.IntPtr jnienv, System.IntPtr klazz, System.IntPtr p0, System.Int32 p1, System.Int32 p2) in <374cdfafcd7e4b6c97e9676328726afc>
--- End of managed Java.Lang.IncompatibleClassChangeError stack trace ---
java.lang.NoSuchMethodError: no non-static method "Landroid/app/Service;.stopForeground(I)V"
crc649df30575a0a8f32c.<myservice>.n_onStartCommand(Native Method)
crc649df30575a0a8f32c.<myservice>.onStartCommand in PPService.java:48
android.app.ActivityThread.handleServiceArgs in ActivityThread.java:3010
android.app.ActivityThread.access$2200 in ActivityThread.java:150
android.app.ActivityThread$H.handleMessage in ActivityThread.java:1442
android.os.Handler.dispatchMessage in Handler.java:102
android.os.Looper.loop in Looper.java:148
android.app.ActivityThread.main in ActivityThread.java:5417
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run in ZygoteInit.java:726
com.android.internal.os.ZygoteInit.main in ZygoteInit.java:616

@ProRedCat
Copy link
Contributor

Thank you for sharing the details of this issue.

We will need to conduct further investigation to determine what can be done in this area. At this moment, we don't have immediate plans to address this, but we will update this thread if it becomes a priority in the future.

Symbolication of native stack traces can sometimes be useful, particularly in cases where errors originate from native components or third-party libraries. However, in MAUI or .NET Native apps, since the code is written in C# and runs on the Mono runtime, native exceptions generally have less impact on debugging compared to managed exceptions.

We appreciate your input and encourage you to share specific examples where symbolication has been or could be helpful. This will assist us in assessing the impact and prioritizing this feature accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants