microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 808 forks source link

NSURLProtocol calls private extension method on NSURLProtocolClient even if it doesn't exist #2764

Closed triplef closed 7 years ago

triplef commented 7 years ago

Using the 0.2.170511-dev-20170531235959 nuget packages we’re seeing the following crash in our app:

    KernelBase.dll!_RaiseException@16() Unknown
    vcruntime140_app.dll!__CxxThrowException@8()    Unknown
    libobjc2.dll!objc_exception_throw(void * object) Line 134   C++
>   Foundation.dll!77835533()   Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for Foundation.dll]    
    ntdll.dll!_RtlpHpLfhSubsegmentCommitBlock@12()  Unknown
    ntdll.dll!_NtClose@4()  Unknown
    ntdll.dll!_NtClose@4()  Unknown
    ntdll.dll!_NtClose@4()  Unknown
DHowett-MSFT commented 7 years ago

From the dump:

BUGCHECK_STR:  STOWED_EXCEPTION_IRestrictedErrorInfo_TEXT_-[NSURLSessionDataTask_URLProtocol:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]:_unrecognized_selector_sent_to_instance_1C204A3C

DEFAULT_BUCKET_ID:  STOWED_EXCEPTION_IRestrictedErrorInfo_TEXT_-[NSURLSessionDataTask_URLProtocol:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]:_unrecognized_selector_sent_to_instance_1C204A3C

PRIMARY_PROBLEM_CLASS:  STOWED_EXCEPTION

STACK_TEXT:  
1ced4038 76ab8fe8 combase!RoOriginateLanguageException+0x38
1ced403c 5965a856 Foundation!-[NSException _processException]+0x66
1ced4040 65c012c4 libobjc2!objc_exception_throw+0x94
1ced4044 59645533 Foundation!wil::details::ReportFailure+0x153
1ced4048 59645608 Foundation!wil::details::ReportFailure_Msg+0x78
1ced404c 59666eb7 Foundation!wil::details::in1diag5::Objc_Throw_HrMsg+0x27
1ced4050 59665d59 Foundation!_throwUnrecognizedSelectorException+0x169
1ced4054 59659863 Foundation!_NSInvocation_ForwardFrame+0x133
1ced4058 5969f9d7 Foundation!__NSInvocation_ForwardingBridge_Internal+0x24
1ced405c 59721699 Foundation!__37-[NSURLProtocol_WinHTTP startLoading]_block_invoke+0x29
1ced4060 5972da1c Foundation!-[_NSBlockAdapter invoke]+0xc
1ced4064 59665964 Foundation!-[NSObject performSelector:withObject:withObject:]+0x14
1ced4068 596a29ef Foundation!-[NSOrderedPerform fireInMode:]+0x4f
1ced406c 59667333 Foundation!-[NSRunLoop _orderedPerforms]+0x113
1ced4070 59667446 Foundation!-[NSRunLoop limitDateForMode:]+0x86
1ced4074 59667642 Foundation!-[NSRunLoop runMode:beforeDate:]+0xc2
1ced4078 596676e6 Foundation!-[NSRunLoop runUntilDate:]+0x56
1ced407c 596e632b Foundation!-[NSURLSession _taskDispatchThreadBody:]+0x6b
1ced4080 5966231a Foundation!-[NSThread main]+0x4a
1ced4084 596622a2 Foundation!_threadBody+0x32
1ced4088 6d15d06f Starboard!ThreadRoutine+0x3f
1ced408c 757a62c4 kernel32!BaseThreadInitThunk+0x24
1ced4090 776e0fd9 ntdll!__RtlUserThreadStart+0x2f
1ced4094 776e0fa4 ntdll!_RtlUserThreadStart+0x1b