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.ToString() failed. #5203
Comments
I attached a debugger and this is a friendlier message than what's posted above. System.IO.FileNotFoundException:
|
/cc @piotrpMSFT |
@brthor, can you take a quick look? |
Interestingly, the exception here is not in the dotnet cli, or in our host, it's in the client app. There are two issues here. JamesNK/Newtonsoft.Json#618 (comment) So the solution there is to keep adding dependencies to the project.json until it works. I end up with this:
The second issue is this:
It's not clear to me yet what's happening here but it appears to be a failure in coreclr/corefx. When putting this under a debugger I see System.IO.FileNotFoundException like mentioned above. |
I think this issue should be investigated in CoreCLR, whatever is printing the exception the app is throwing is failing. @ellismg Could you redirect this appropriately? |
Here is what happens. The You can see the relevant part of the stack trace below:
|
@sergiy-k FYI |
@jkotas I wonder if we should rather catch exceptions stemming from the |
This sounds good to me.
It is fine change to do for CoreCLR / .NET Core. (For full .NET Framework, it would require more careful thought.) |
cc @noahfalk |
@jkotas thanks for the heads up I'm surprised that we can have a method on the stack whose parameter type we are unable to load? If the DeserializeObject method has a parameter type that can't be loaded I would expect an error during jitting that prevents the method from ever being invoked and getting on the stack in the first place. If somehow jitting determined the type was unnecessary for correct code generation wouldn't we be at risk of not being able to retrieve GC info during a GC? I suspect there is still something here I didn't grasp. |
|
The parameter of type Newtonsoft.Json.JsonSerializerSettings passed to the DeserializeObject is null in our case. That should explain why there was no problem jitting the method. |
With the simple fix I've suggested, running the app now gets this:
|
Makes sense, thanks! |
@janvorli - LGTM |
Fixed by dotnet/coreclr#3858 |
It fails a different place for me: CLR InfoVersion: v4.7.3062.00 Type: System.Runtime.InteropServices.SEHException
The original error is FileNotFoundException. This fix (catch pi = mb.GetParameters();) will probably not fix my problem. |
Minimal repro:
dotnet new
then modifyProgram.cs
as followsand
project.json
as followsthen
dotnet restore
,dotnet run
Attaching it to visual studio debugger reveals the following error:
Unhandled exception at 0x00007FFFC6988A5C (KernelBase.dll) in min.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070002, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FFF76A00000).
The text was updated successfully, but these errors were encountered: