-
Notifications
You must be signed in to change notification settings - Fork 110
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
Exception in DeveloperProblemDetails.GetErrors() while executing the problem details middleware #70
Comments
Hmm. That's weird. It's even mentioned in the source: |
I think I might have to file an issue upstream for this... |
It should support both portable and "full" PDBs, but the check for portable PDBs is below the |
Doesn't look like it's gotten to reading pdb yet, but throws while reading the dll to get the debug directory info. I looked quickly at the code wondering if there was something letting go of the PE memory, but it looks ok. The next thing I'd want to try would be to inspect the dll to see if it is in fact corrupted. Are you able to debug and determine what Cc @tmat |
Debugging should be no problem. But since I'm not sure how to reproduce this reliably, I might have to try for some time. An idea about assembly "corruption": I'm using the Oracle.ManagedDataAccess library. This assembly is obfuscated. Maybe that causes problems? |
Aha! I knew I'd seen that somewhere when Googling for more info on this; coverlet-coverage/coverlet#189
Smells like Oracle is doing something fishy (won't be the first time 😅)... |
I can now confirm that this indeed happens if Oracle.ManagedDataAccess throws an exception. The So I assume this means this is actually a bug in But I think this exception could also be handled better in |
Yeah, I'm thinking it's the latter. I.e. the
Hmm 🤔 I can't remember what my thinking was at the time. I think it was to avoid directly serializing an instance of I think it would be better to wrap it in a Middleware/src/ProblemDetails/DeveloperProblemDetails.cs Lines 16 to 23 in c454363
|
Would be nice if you could do it. Otherwise I'll do it on Monday.
So it wouldn't give the stack trace? I'd say that's the most important information about an exception 😉 |
@khellang I forgot about this yesterday. I wanted to start with a small sample now, but I already have problems getting the |
Yeah, the source packages aren't shipped to NuGet, so there's really no better way to get it 😏 |
I've now created the issue: dotnet/aspnetcore#14609 Did you already decide if you will also handle the exception in ProblemDetails? |
Nice! That's a really well written issue! ✨
It really depends on how fast it's fixed upstream. Since it's just a source package, I can easily pull the latest from MyGet and ship a new version without making source changes to the middleware itself. I'll see if maybe I can fix it myself and send a PR upstream. |
Seems like your PR was merged, nice. |
I've pushed 4.0.0-beta.1 to NuGet. Let me know if that fixes your issue 👍 |
Works fine, thanks! |
I sometimes get the following exception in my server log:
I'm not sure how to reproduce it, but from reading the stack trace I have an idea what might happen:
The top methods of the exception call stack indicate that it crashes while reading a PDB file. The problem I see here is that that class name indicates that it tries to read a portable PDB. But my application is running ASP.NET Core 2.2 on the full .NET Framework 4.7.1 since some used libraries are not available as .NET Core or .NET Standard builds. Those libraries also use non-portable PDB files. So I assume the crash happens because it tries to read a non-portable PDB file assuming it is a portable one.
I'm using ProblemDetails package version 3.1.0.
The text was updated successfully, but these errors were encountered: