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

Crash in [AsyncClient netServiceBrowser:didFindService:moreComing:] #21

Open
levey opened this issue Nov 16, 2016 · 3 comments
Open

Crash in [AsyncClient netServiceBrowser:didFindService:moreComing:] #21

levey opened this issue Nov 16, 2016 · 3 comments

Comments

@levey
Copy link
Contributor

levey commented Nov 16, 2016

`
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1804d5bd0 objc_msgSend + 16

1 pos-offline 0x100980e9c -[AsyncClient
netServiceBrowser:didFindService:moreComing:] (AsyncClient.m:163)
2 CFNetwork 0x181536f00 -[NSNetServiceBrowser _dispatchCallBack:flags:error:] + 784
3 CFNetwork 0x18146400c _BrowseReply(_DNSServiceRef_t*, unsigned int, unsigned int, int, char const*, char const*, char const*, void*) + 576
4 libsystem_dnssd.dylib 0x1809aff14 handle_browse_response + 156
5 libsystem_dnssd.dylib 0x1809ae00c DNSServiceProcessResult + 620
6 CFNetwork 0x181463974 _SocketCallBack(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 32
7 CoreFoundation 0x180e115b0 __CFSocketPerformV0 + 1096
8 CoreFoundation 0x180e0cefc CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
9 CoreFoundation 0x180e0c910 __CFRunLoopDoSources0 + 412
10 CoreFoundation 0x180e0a690 __CFRunLoopRun + 724
11 CoreFoundation 0x180d39680 CFRunLoopRunSpecific + 384
12 GraphicsServices 0x182248088 GSEventRunModal + 180
13 UIKit 0x185bb0d90 UIApplicationMain + 204

`

This crash stack, I think there maybe a issue of serviceBrowser's delegate

@jdiehl
Copy link
Owner

jdiehl commented Nov 17, 2016

Since I cannot reproduce the problem on my machine, I am not sure how to help you with the issue. My suggestion would be to try running the ClientServer example (which should work) and then figuring out what difference to your code produces the bug.

@xieweizhi
Copy link

Hi, I think there is a bug which is reported here NSNetServiceBrowser and NSNetService’s delegates are not properly __weak, objc_weak_error observed
is similar to the crash.

And here is their fix: http://pastebin.com/E7W1tWKk

@xieweizhi
Copy link

Just made a PR, please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants