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 when tap near the screen edges #94

Open
gklka opened this issue Nov 11, 2015 · 3 comments
Open

Crash when tap near the screen edges #94

gklka opened this issue Nov 11, 2015 · 3 comments

Comments

@gklka
Copy link

gklka commented Nov 11, 2015

I can reproduce a crash with SMCalloutView if I tap near the left screen edge quickly after a callout view was opened. The crash happens in this line: https://github.com/nfarina/calloutview/blob/master/SMCalloutView.m#L409

Debugger:

(lldb) p presenting
(BOOL) $0 = YES
(lldb) po _delegate
0x0000000155ffbec0

(lldb) print _delegate
(id) $2 = 0x0000000155ffbec0

Could you please help finding what causes the issue? I'd gladly provide any details you might ask.

@gklka
Copy link
Author

gklka commented Nov 11, 2015

The error itself is EXC_BAD_ACCESS (code=1, address=...).

@nfarina
Copy link
Owner

nfarina commented Nov 11, 2015

Can you reproduce this in the included Samples app? I can't seem to make it crash myself.

@gklka
Copy link
Author

gklka commented Nov 13, 2015

Unfortunately not. I am not sure what causes the problem, but if I modify the delegate's type in your code from unsafe_unretained (which is legacy) to weak, it works.

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

2 participants