Repository navigation
Closed
Labels
Milestone
Description
- netcoreapp2.0. 2.0.0-preview2-006497
- console app that is doing some basic assembly loading
- australia culture
When i run i get the following exception
Assert Failure
Expression: [Recursive resource lookup bug]
Description: Infinite recursion during resource lookup within System.Private.CoreLib. This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names. Resource name: ArgumentNull_Generic
Stack Trace:
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.ArgumentNullException..ctor(String paramName)
at System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly assembly)
at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.ArgumentNullException..ctor(String paramName)
at System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly assembly)
at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.BadImageFormatException..ctor()
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
If i hack it back to US Culture it runs fine
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Activity
jkotas commentedon Jul 8, 2017
cc @tarekgh
Looks like dup of https://github.com/dotnet/corefx/issues/21095
tarekgh commentedon Jul 10, 2017
@SimonCropp this looks same issue we fixed which @jkotas pointed at dotnet/corefx#21095. could you please try the latest netcoreapp package and let's know if the problem still there or not?
https://www.nuget.org/packages/Microsoft.NETCore.App/2.0.0-preview2-25407-01
Also if you have sample project you can share, we can validate that too. Thanks.
timbussmann commentedon Jul 21, 2017
I'm seeing the same behavior using preview2-25407-01 using "de-DE" culture
tarekgh commentedon Jul 21, 2017
@timbussmann could you please share small project repro the issue so we can investigate it? also tell us what OS you are using and which version. Thanks.
timbussmann commentedon Jul 21, 2017
@tarekgh I have a repro sample using NServiceBus. I haven't been able to isolate the issue further yet but I simplified my sample as much as possible. I'll try to see whether I can isolate a repro without using NServiceBus on Monday. Here's the repository with the repro: https://github.com/timbussmann/Repro
tarekgh commentedon Jul 21, 2017
Thanks @timbussmann
Which OS version you are running on? and what is your culture settings? I mean, are you running on de-DE machine?
timbussmann commentedon Jul 21, 2017
@tarekgh I'm running on Windows 10 build 14393.1480. I'm using the de-CH region settings. This results in
CurrentUICulturebeing "de-DE", whileCurrentCultureis "de-CH" in .net apps.tarekgh commentedon Jul 21, 2017
@timbussmann I can repro it with your project. thanks for sharing that.
tarekgh commentedon Jul 22, 2017
@kouvel is going to look at fixing this issue. I have a simple repro now too.
Don't call AssemblyResolve event for CoreLib resources (#12999)
Don't call AssemblyResolve event for CoreLib resources (#12999) (#13003)
karelz commentedon Aug 25, 2017
@tarekgh was it fixed in 2.0.0, or do we need to make more changes in servicing?
kouvel commentedon Aug 25, 2017
This should be fixed in the 2.0.0 branch now, it wasn't auto-closed by dotnet/corefx#22553 for some reason. Going ahead and closing.
danmoseley commentedon Nov 15, 2017
Fix released https://github.com/dotnet/corefx/releases/tag/v2.0.3
Prevent AssemblyResolve Event from causing infinite recursion on msco…