[FINAL EDIT]
Never mind. I cleaned the project, rebuilt it and I’m not able to reproduce this error anymore…
[OLD POST:]
I’m getting the following crash in Mac only and I’d say it is a JUCE issue. Even if the URL for which I’m calling “createInputStream” is wrong, this shouldn’t be happening right?
The code that seems to be generating the error is quite simple:
URL connectionTest("http://www.google.com");
internetOn = connectionTest.readEntireBinaryStream(memory);
Stack:
System Integrity Protection: enabled
Crashed Thread: 3 Dispatch queue: NSOperationQueue 0x7fad415129a0 :: NSOperation 0x7fad4152b100 (QOS: LEGACY)
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLError setLength:]: unrecognized selector sent to instance 0x7fad41446110'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff918c94f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff98f6b73c objc_exception_throw + 48
2 CoreFoundation 0x00007fff919331ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff91839571 ___forwarding___ + 1009
4 CoreFoundation 0x00007fff918390f8 _CF_forwarding_prep_0 + 120
5 pluginXXXXXXXXXX 0x000000010f227173 _ZN4juce18URLConnectionState18didReceiveResponseEP13NSURLResponseP11objc_object + 57
6 pluginXXXXXXXXXX 0x000000010f227014 _ZN4juce18URLConnectionState13DelegateClass18didReceiveResponseEP11objc_objectP13objc_selectorP12NSURLSessionP20NSURLSessionDataTaskP13NSURLResponseS3_ + 56
7 Foundation 0x00007fff9f5af8d7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
8 Foundation 0x00007fff9f5af595 -[NSBlockOperation main] + 100
9 Foundation 0x00007fff9f5adc7a -[__NSOperationInternal _start:] + 654
10 Foundation 0x00007fff9f5a9c64 __NSOQSchedule_f + 194
11 libdispatch.dylib 0x00007fff9c86f40b _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff9c87403b _dispatch_queue_drain + 754
13 libdispatch.dylib 0x00007fff9c87a707 _dispatch_queue_invoke + 549
14 libdispatch.dylib 0x00007fff9c872d53 _dispatch_root_queue_drain + 538
15 libdispatch.dylib 0x00007fff9c872b00 _dispatch_worker_thread3 + 91
16 libsystem_pthread.dylib 0x00007fff8dea94de _pthread_wqthread + 1129
17 libsystem_pthread.dylib 0x00007fff8dea7341 start_wqthread + 13
Global Trace Buffer (reverse chronological seconds):
4.584891 CFNetwork 0x000000010cb3492b TCP Conn 0x7fad4152fef0 started
4.740823 CFNetwork 0x000000010cb35659 TCP Conn 0x7fad41507590 complete. fd: 5, err: 0
4.741751 CFNetwork 0x000000010cbc3f33 TCP Conn 0x7fad41507590 event 1. err: 0
5.145374 CFNetwork 0x000000010cb3492b TCP Conn 0x7fad41507590 started
5.154264 CFNetwork 0x000000010caf856e Creating default cookie storage with process/bundle identifier
5.154264 CFNetwork 0x000000010caf8506 Faulting in CFHTTPCookieStorage singleton
5.154316 CFNetwork 0x000000010caf8395 Faulting in NSHTTPCookieStorage singleton
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffa10ca10a __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff989dfd0f nanosleep + 199
2 com. pluginXXXXXXXXXX 0x000000010f226aec juce::URLConnectionState::start(bool (*)(void*, int, int), void*) + 148
3 com. pluginXXXXXXXXXX 0x000000010f226860 juce::WebInputStream::createConnection(bool (*)(void*, int, int), void*) + 852
4 com. pluginXXXXXXXXXX 0x000000010f226305 juce::WebInputStream::WebInputStream(juce::String const&, bool, juce::MemoryBlock const&, bool (*)(void*, int, int), void*, juce::String const&, int, juce::StringPairArray*, int, juce::String const&) + 255
5 com. pluginXXXXXXXXXX 0x000000010f21c19e juce::URL::createInputStream(bool, bool (*)(void*, int, int), void*, juce::String, int, juce::StringPairArray*, int*, int, juce::String) const + 378
6 com. pluginXXXXXXXXXX 0x000000010f21c2b0 juce::URL::readEntireBinaryStream(juce::MemoryBlock&, bool) const + 84