-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-Codegen-JIT-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-iosApple iOSApple iOSos-tvosApple tvOSApple tvOS
Milestone
Description
NullableTests.ClassWithDictionariesWithNullableValues appears to be crashing reliably on tvOS runs.
runtime/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NullableTests.cs
Lines 177 to 198 in 50fa756
| public static void ClassWithDictionariesWithNullableValues() | |
| { | |
| string json = | |
| @"{ | |
| ""Dict"": {""key"": ""1995-04-16""}, | |
| ""IDict"": {""key"": null}, | |
| ""ImmutableDict"": {""key"": ""1997-03-22""}, | |
| ""ImmutableSortedDict"": { ""key"": null} | |
| }"; | |
| SimpleClassWithDictionariesWithNullableValues obj = JsonSerializer.Deserialize<SimpleClassWithDictionariesWithNullableValues>(json); | |
| Assert.Equal(new DateTime(1995, 4, 16), obj.Dict["key"]); | |
| Assert.Null(obj.IDict["key"]); | |
| Assert.Equal(new DateTime(1997, 3, 22), obj.ImmutableDict["key"]); | |
| Assert.Null(obj.ImmutableSortedDict["key"]); | |
| string serialized = JsonSerializer.Serialize(obj); | |
| Assert.Contains(@"""Dict"":{""key"":""1995-04-16T00:00:00""}", serialized); | |
| Assert.Contains(@"""IDict"":{""key"":null}", serialized); | |
| Assert.Contains(@"""ImmutableDict"":{""key"":""1997-03-22T00:00:00""}", serialized); | |
| Assert.Contains(@"""ImmutableSortedDict"":{""key"":null}", serialized); | |
| } |
at <unknown> <0xffffffff>
at System.Object:__icall_wrapper_mono_gsharedvt_constrained_call <0x00007>
at System.Text.Json.Serialization.Converters.IDictionaryOfTKeyTValueConverter`3:Add <0x001cb>
at System.Object:gsharedvt_in <0x000db>
at System.Object:gsharedvt_out <0x000db>
at System.Text.Json.Serialization.JsonDictionaryConverter`3:OnTryRead <0x0054f>
at System.Text.Json.Serialization.JsonConverter`1:TryRead <0x001df>
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1:ReadJsonAndSetMember <0x0011b>
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1:OnTryRead <0x003ff>
at System.Text.Json.Serialization.JsonConverter`1:TryRead <0x001df>
at System.Text.Json.Serialization.JsonConverter`1:ReadCore <0x002a7>
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1:Deserialize <0x00047>
at System.Text.Json.JsonSerializer:ReadFromSpan <0x00123>
at System.Text.Json.JsonSerializer:ReadFromSpan <0x00117>
at System.Text.Json.JsonSerializer:Deserialize <0x0007b>
at System.Text.Json.Serialization.Tests.NullableTests:ClassWithDictionariesWithNullableValues <0x00047>
Metadata
Metadata
Assignees
Labels
area-Codegen-JIT-monodisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issueos-iosApple iOSApple iOSos-tvosApple tvOSApple tvOS