Closed andrewlock closed 6 years ago
@andrewlock Thanks for reporting this, I'll get the team to have a look into this issue soon.
I'm not sure how or why Newtonsoft.Json was added in a dependency as nothing in the projects uses it, hence why SimpleJson is used.
Version 6.0.1 of Mindscape.Raygun4Net.NetCore and Mindscape.Raygun4Net.AspNetCore are now available on nuget.
https://www.nuget.org/packages/Mindscape.Raygun4Net.NetCore/ https://www.nuget.org/packages/Mindscape.Raygun4Net.AspNetCore/
This took me a while to pin down, but the SimpleJson.cs class used in Mindscape.Raygun4Net.NetCore.Common does not seem to be able to serialize
Type
s correctly - instead it throws aStackOverflowException
and crashes the process.Here's a simple repro:
Maintaining your own JSON serializer seems a little pointless here, especially when you're including Newtonsoft.Json in Mindscape.Raygun4Net.NetCore anyway... It seems like using Newtonsoft.JSON would be the safest option.
Alternatively, update SimpleJson to handle serializing
Type
s by calling.AssemblyQualifiedName
on them, instead of trying to do a deep serialization (which I assume is what's calling the recurrsion)