You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project which now runs correctly with Orleans 4, but overnight the 7-rc2 was released so I thought I'd try that while I'm in "upgrade mode".
Unfortunately, upgrading the package version to 7-rc2 causes a previously working project to produce this stack overflow when trying to get a grain. The grain class in question has two generic parameters and uses IGrainWithStringKey.
Stack overflow.
at System.RuntimeType.IsSubclassOf(System.Type)
at System.Collections.Generic.Dictionary`2[[Orleans.Runtime.GrainInterfaceType, Orleans.Core.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null],[Orleans.GrainInterfaceTypeToGrainTypeResolver+CacheEntry, Orleans.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null]].FindValue(Orleans.Runtime.GrainInterfaceType)
at System.Collections.Generic.Dictionary`2[[Orleans.Runtime.GrainInterfaceType, Orleans.Core.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null],[Orleans.GrainInterfaceTypeToGrainTypeResolver+CacheEntry, Orleans.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null]].TryGetValue(Orleans.Runtime.GrainInterfaceType, CacheEntry ByRef)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
.... lots more of these
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainInterfaceTypeToGrainTypeResolver.GetGrainType(Orleans.Runtime.GrainInterfaceType)
at Orleans.GrainFactory.GetGrain(System.Type, Orleans.Runtime.IdSpan, System.String)
at Orleans.GrainFactory.GetGrain[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String, System.String)
at Orleans.Runtime.InternalClusterClient.GetGrain[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String, System.String)
The text was updated successfully, but these errors were encountered:
This seems to only be repeatable when using VS 2022 (Enterprise) - not with VS Preview. This makes providing reproduction difficult as the unit test I have only fails when running VS2022, which won't compile the main branch due to this issue. Looking at the method in question, it seems reasonable that a stack overflow may occur due to the recursive call at line 128 of GrainInterfaceTypeToGrainTypeResolver.cs - but repeating the condition that leads to that is a challenge at present due to the above. I've given @benjaminpetit access to the repo in question and similarly, the test succeeds for him when running VS Preview. In order to reproduce, he too would need to run the unit test I showed him with VS Enterprise (non-preview).
I have a project which now runs correctly with Orleans 4, but overnight the 7-rc2 was released so I thought I'd try that while I'm in "upgrade mode".
Unfortunately, upgrading the package version to 7-rc2 causes a previously working project to produce this stack overflow when trying to get a grain. The grain class in question has two generic parameters and uses IGrainWithStringKey.
The text was updated successfully, but these errors were encountered: