Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
triplef opened this issue Jun 8, 2017 · 1 comment

Comments

@triplef
Copy link
Contributor

triplef commented Jun 8, 2017

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 DHowett-MSFT changed the title Unknown crash using pre-release Frameworks NSURLProtocol calls private extension method on NSURLProtocolClient even if it doesn't exist Jun 8, 2017
@DHowett-MSFT
Copy link

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

ms-jihua added a commit to ms-jihua/WinObjC that referenced this issue Jun 8, 2017
ms-jihua added a commit to ms-jihua/WinObjC that referenced this issue Jun 8, 2017
rajsesh pushed a commit that referenced this issue Jun 9, 2017
…2765)

* Check if NSURLProtocolClient has private callback before calling it

Fixes #2764

* - Coalesce headers
- Add test for a POST NSURLSessionTask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants