dwarfcorp
dwarfcorp copied to clipboard
Linux crashes in sentry error reporting service.
[ERROR] System.TypeLoadException: Could not resolve type with token 01000008
at System.Dynamic.BinaryOperationBinder.FallbackBinaryOperation (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject arg) [0x00000] in <5f01f5aacbb346938d6f9b4e69d4383a>:0
at System.Dynamic.DynamicMetaObject.BindBinaryOperation (System.Dynamic.BinaryOperationBinder binder, System.Dynamic.DynamicMetaObject arg) [0x0000b] in <5f01f5aacbb346938d6f9b4e69d4383a>:0
at System.Dynamic.BinaryOperationBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00035] in <5f01f5aacbb346938d6f9b4e69d4383a>:0
at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000de] in <5f01f5aacbb346938d6f9b4e69d4383a>:0 at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite
1[T] site, System.Object[] args) [0x0001c] in <5f01f5aacbb346938d6f9b4e69d4383a>:0
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1) [0x0011f] in <5f01f5aacbb346938d6f9b4e69d4383a>:0
at SharpRaven.Data.SentryRequestFactory.get_HasCurrentHttpContextProperty () [0x0008d] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.Data.SentryRequestFactory.get_HttpContext () [0x00005] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.Data.SentryRequestFactory.get_HasHttpContext () [0x00074] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.Data.SentryUserFactory.Create () [0x00000] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.RavenClient.PreparePacket (SharpRaven.Data.JsonPacket packet) [0x00047] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.Data.Requester..ctor (SharpRaven.Data.JsonPacket packet, SharpRaven.RavenClient ravenClient) [0x00029] in <805b9bbd76f8475b851696854b6b7aa5>:0
at SharpRaven.RavenClient.Send (SharpRaven.Data.JsonPacket packet) [0x00002] in <805b9bbd76f8475b851696854b6b7aa5>:0
Okay, it appears sharp raven just doesn't work on linux. To prevent these kinds of crashes, disable error reporting in the settings.
It's failing on the dynamic
that is used RequestFactory
.
That is unfortunate since that was designed for System.Web
which is not used on this game at all.
Sentry has been working (I'm the dev) on a new SDK for .NET: https://github.com/getsentry/sentry-dotnet/
The main SDK: https://www.nuget.org/packages/Sentry doesn't depend on anything System.Web
and is tested on Mono, .NET Framework and .NET Core.
I understand it's still a preview but we've got a few thousands of events from this SDK at Sentry.io and It would be great if perhaps on your 'Early Access Game' you could give this SDK a spin.
Feel free to reach me directly with any feedback: bruno at sentry dot io or if you prefer, simply raise an issue on the SDK repository.
From the usages I saw on your code, it seems it would be very straight forward to change. I can submit a PR if you are interested. Perhaps with a new symbol:
Turning this:
#if SHARP_RAVEN && !DEBUG
if (ravenClient != null)
ravenClient.Capture(new SentryEvent(exception));
#endif
into this:
#if !DEBUG
#if SENTRY
SentrySdk.CaptureException(exception);
#elif SHARP_RAVEN
if (ravenClient != null)
ravenClient.Capture(new SentryEvent(exception));
#endif
#endif
That is so that you could use SENTRY
for your early access game build and fallback to the old directive SHARP_RAVEN
until proven stable in all platforms.