mattjohnsonpint / TimeZoneNames

Provides a complete source of localized time zone names and abbreviations.
MIT License
196 stars 32 forks source link

Crashes on older version of Mono (5.4.1.6) #100

Open cristianst85 opened 10 months ago

cristianst85 commented 10 months ago

Hello.

I don't think it's an issue with this library, but somewhere with System.Text.Json.JsonSerializer or System.MemoryExtensions (according to the stacktrace). Somewhat similar with https://github.com/mattjohnsonpint/TimeZoneNames/issues/92. When running against an older version of Mono (5.4.1.6) on openSUSE 13.1 (i586), the application is just simply crashing. I am targeting .NET Framework 4.6.2 and using TimeZoneNames 6.0.0 which pulls a bunch of System dependencies. The code to reproduce the issue can be found at https://github.com/cristianst85/TimeZoneNamesMonoCrashRepro.

So when I run mono MonoCrashRepro.exe the output is: * Assertion at local-propagation.c:562, condition `ins->opcode > MONO_CEE_LAST' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at System.MemoryExtensions..cctor () [0x00000] in <16786cfd571c4686983021cfcee42fb4>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <f32220dd56b1417e9348b8f00e0470d2>:0
  at <unknown> <0xffffffff>
  at System.Text.Json.JsonSerializer..cctor () [0x00042] in <8658d3c3741d44a483829174064a9ad2>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <f32220dd56b1417e9348b8f00e0470d2>:0
  at <unknown> <0xffffffff>
  at TimeZoneNames.TimeZoneData.Load () [0x0002d] in <17b726522d9d422896f853b719c0f1d2>:0
  at TimeZoneNames.TZNames..cctor () [0x00000] in <17b726522d9d422896f853b719c0f1d2>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <f32220dd56b1417e9348b8f00e0470d2>:0
  at <unknown> <0xffffffff>
  at MonoCrashRepro.Extensions.DateTimeExtensions.GetCurrentTimeZoneAbbreviation (System.DateTime,string) [0x0000d] in <b1f6b0cd71374a88ab3a45b4ad97a451>:0
  at MonoCrashRepro.Program.Main (string[]) [0x00006] in <b1f6b0cd71374a88ab3a45b4ad97a451>:0
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x0004e] in <b1f6b0cd71374a88ab3a45b4ad97a451>:0

FullStacktraceOutput.txt

On another system (openSUSE 15.4 (amd64)) which has a newer version of Mono (6.8.0.105) the code runs just fine. So currently I am stuck using an older version of TimeZoneNames (5.0.1) as updating Mono on the first system is not really an option. I am not even sure where to report this. Maybe to https://github.com/dotnet/runtime?

Thank you, Cristian S.

jnyrup commented 10 months ago

This seems to hit the same issue as reported in https://github.com/xamarin/xamarin-android/issues/1177 The bugzilla links in there are dead now, so can't follow them. From https://github.com/mono/mono/pull/6242 it seems the underlying problem was fixed in mono 5.8.