Windows error 0x0000013B, 315

Detailed Error Information


MessageThe token representing the data is invalid.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x8007013B.


This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x13B: PASSIVE_INTERRUPT_ERROR.

HRESULT analysis[3]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
Reserved (X)false
FacilityCode0 (0x000)
DescriptionThe default facility code.[3][1]
Error Code315 (0x013b)

Possible solutions


Compiler Bug when using ?. resulting in a Bad Image that fails PEVerify


I can't help you because it's indeed a bug. But I can take you to the point where the bug occur and it may help you to reproduce the bug in a few lines of code.

namespace ElvisBugInNullableGenericStructWithNestedTypeParameter
    struct MyGenericStruct<T> { }
    class Program
        static void Main() { }

        void Test<T>()
            Func<T, bool> func = (arg =>
                    MyGenericStruct<T>? v1 = null;
                    return v1?.ToString() == null;

If I will replace MyGenericStruct<T>? with MyGenericStruct<int>? it will work.

The problem is that, from some reason, when we use the outer T in nullable struct and then we try to use the Elvis operator ? the type is unknown (unable to resolve token).

Update If you want to fix your case, you don't need to remove all Elvis operator, just remove them from Subscribe action within public static ILiveList<TSource> Where<TSource>(this ILiveList<TSource> source, Func<TSource, Boolean> predicate) method.

answered on Stack Overflow Jul 13, 2016 by Dudi Keleti • edited Jul 13, 2016 by Dudi Keleti


Leave a comment

(plain text only)


  1. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0