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 on deallocate #11

Closed
alex566 opened this issue Mar 18, 2015 · 10 comments
Closed

Crash on deallocate #11

alex566 opened this issue Mar 18, 2015 · 10 comments

Comments

@alex566
Copy link

alex566 commented Mar 18, 2015

AMViralSwitch adds observer for "on" keypath in "didMoveToSuperview" delegate method, which is called twice (on adding to superview and on removing from one), but view removes observer one time in dealloc method.

@andreamazz
Copy link
Owner

Hi @alex566
You are right about the observer possibly set twice, but I don't understand why it would crash. Can you post the stacktrace?

andreamazz added a commit that referenced this issue Mar 19, 2015
@andreamazz
Copy link
Owner

In the meantime checkout latest commit for a possible fix.

@alex566
Copy link
Author

alex566 commented Mar 19, 2015

@andreamazz
Copy link
Owner

Does this happen even with the latest commit?

@AmauryVela
Copy link

Yes

@andreamazz
Copy link
Owner

Can you provide a sample to reproduce the issue?

@AmauryVela
Copy link

https://github.com/AmauryVela/test_virals

I'm new with git so i dont know if theres another way to show you an example.

Cheers

@andreamazz
Copy link
Owner

The way is fine, the sample is not. It would be nice to have a sample that compiles without having to hunt down dependencies... Most of all it would be best to have the steps to reproduce the crash. After getting the sample to compile I tried to tap around (the foreign language doesn't help) but got no crash (beside the one due to the missing segue).

@alex566
Copy link
Author

alex566 commented Apr 6, 2015

Yes, latest commit fixes the issue, when I write this code manually. Could you please include this commit in pod to apply changes?

@andreamazz
Copy link
Owner

Great. I've pushed the new pod, version 0.2.5

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