Crash (running out of nursery objects) since upgrading to 1.2.4

Issue #57 resolved
Jeremy Kolb created an issue

I'm experiencing crashes in my app with the 1.2.4 package. Sometimes they are nursery object crashes and other times it just dies.

I was able to fix the crash by reverting 55e887e (pull request #10). I don't know WHY that pull request is crashing my app (it looks sane but I can't seem to debug this) but it appears to be the case.

Comments (7)

  1. Jeremy Kolb reporter

    My guess is that we're recursing and blowing through the stack on the last line of

    public static bool IsAssignableToGenericType(this TypeInfo givenType, TypeInfo genericType)
            {
                if(givenType == null || genericType == null)
                {
                    return false;
                }
    
                return givenType == genericType
                    || givenType.MapsToGenericTypeDefinition(genericType)
                    || givenType.HasInterfaceThatMapsToGenericTypeDefinition(genericType)
                    || givenType.IsAssignableToGenericType(genericType);
            }
    
  2. Guillermo Gutiérrez

    That makes sense. It crashes only if none of the previous comparisons return true and works otherwise.

  3. Log in to comment