Comments (5)
I can't really debug this properly. It doesn't appear to be possible to substitute a project reference to Sentry.csproj for the NuGet package reference in the demo project provided.
However I think I see what's causing this:
sentry-dotnet/src/Sentry/Internal/DebugStackTrace.cs
Lines 380 to 388 in 233e95b
In a UWP app, which is targeting .NET Framework, we do have AOT effectively for release builds (if UseDotNetNativeToolchain
is true) and so TryCreateManagedFrame
is going to fail and return null... and we won't run TryCreateNativeAOTFrame
because we only run that in .NET 8 or later.
This can be confirmed by capturing the debug info to a file:
Debug: Creating SentryStackTrace. isCurrentStackTrace: False.
Debug: Skipping debug image for module 'TimoUwp.exe' because assembly wasn't found: ''
Debug: Could not resolve stack frame 'Windows.Foundation.AsyncOperationProgressHandler`2.Invoke(IAsyncOperationWithProgress`2, TProgress) + 0x2e at offset 46 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame '__Interop.Intrinsics.HasThisCall__13[TArg0](Object, IntPtr, Object, TArg0) + 0x36 at offset 54 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame 'TimoUwp!<BaseAddress>+0x4d2b50 at offset 112 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame 'System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame '__Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, SByte) + 0xc0 at offset 192 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame '__Interop.ForwardComStubs.Stub_29[TThis](__ComObject, Boolean, Int32) + 0x37 at offset 55 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame 'TimoUwp.SubPage.OnNavigatedTo(NavigationEventArgs) + 0x56 at offset 86 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame 'Windows.UI.Xaml.Controls.Page.global::Windows.UI.Xaml.Controls.IPageOverrides.OnNavigatedTo(NavigationEventArgs) + 0xa at offset 10 in file:line:column <filename unknown>:0:0 '
Debug: Could not resolve stack frame 'TimoUwp!<BaseAddress>+0x4e4b0e at offset 110 in file:line:column <filename unknown>:0:0 '
Debug: Created DebugStackTrace with 1 frames.
You can see a bunch of in app frames get dropped there because we can't symbolicate these.
Very tricky to resolve... especially since it's so difficult to debug (logging is pretty much the only weapon we have here).
from sentry-dotnet.
The reason why I added this issue to the other issue that was about trimming is because I think this issue is also related to trimming.
When you use this line in Default.rd.xml
(it's present by default when you create a new UWP app in Visual Studio), trimming is disabled:
<Assembly Name="*Application*" Dynamic="Required All" />
When you're running the app then, the second line shows up in Sentry:
System.DivideByZeroException: Attempted to divide by zero.
Module "Sentry_UWP.SubPage", in Toggle_Toggled
Module "Sentry_UWP.SubPage", in OnNavigatedTo
Maybe there's more use of reflection somwehere that causes this problem.
Would this be the expected strack trace to show up anyways?
Are frames like these expected to be dropped? They're also not showing in the "raw stack trace"
at Windows.UI.Xaml.Controls.Page.global::Windows.UI.Xaml.Controls.IPageOverrides.OnNavigatedTo(NavigationEventArgs) + 0xa
from sentry-dotnet.
We might get some benefits out of having this merged? #3282
from sentry-dotnet.
Additionally, maybe we should put a guard around enabling AOT on platforms where we know we don't properly support it. Just so users don't get surprised by unexpected outcomes.
from sentry-dotnet.
we should put a guard around enabling AOT
Scratching that. See #3343 (comment)
We're going to attempt to fix this step by step.
from sentry-dotnet.
Related Issues (20)
- Missing AddAttachment from memory in SentryHint HOT 1
- De-obfuscate stack traces with Babel Obfuscator HOT 1
- [MAUI] Make it possible to programmatically decide whether to attach a screenshot or not HOT 2
- Profiling: Error out in the editor if added to unsuported platform HOT 3
- Add SentrySdk.RunAsyncVoid helper method to Sentry SDK
- Memory Profiling HOT 1
- Unable to cast object of type 'Sentry.Log4Net.SentryAppender' to type 'log4net.Appender.IAppender' HOT 4
- OOTB metrics HOT 1
- Could not get pinvoke, or callbacks for method 'Sentry.Native.C::sentry_options_set_logger' HOT 2
- Document requirement for active scope transaction
- Url parameter secrets are not sanitized by default in ASP.NET HOT 6
- Windows Service memory grows indefinitely with Tracing and Profiling enabled. HOT 5
- Improve Sentry CLI utilization HOT 1
- Deprecate `EnableTracing`
- Consider `Mechanism.Handled` for non-thrown captured exceptions HOT 1
- Envelopes stuck in `__processing` until restart HOT 2
- Instrumenting failed AWS SDK requests throws due to AWS's use of UriCreationOptions.DangerousDisablePathAndQueryCanonicalization HOT 3
- UWP events missing debug_meta.images information HOT 1
- Exceptions captured through `Extensions.Logging` marked as `handled = true` HOT 3
- ASP.NET Core Telemetry: Failed invoking event handler in anonymous routes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-dotnet.