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 presentMessageView #18
Comments
Delegate properties should always (barring special circumstances) be weak so yes this is something that will be fixed. Hopefully that should resolve your crash. Update: Interestingly enough the reason why its assign (I always make my delegates weak) is because of RMessage having initialized its codebase from TSMessages, TSMessages has it the way it is now, "assign" hmmm... |
I tried setting it to weak but could still reproduce the crash :/ |
Are you changing your delegate in the middle of presentation or clearing the delegate anywhere. Anything interesting you may be doing in your code? After setting the property to weak can you clear your derived data and rebuild your project? Reset the simulator as well if need be. |
I haven't found anything particularly interesting yet - still trying to find the exact steps to reproduce the issue. Right now I can only reproduce it semi-randomly. Could you change it to be a weak reference none the less? |
I'll try clearing derived data now and see what happens. |
I think clearing derived data did the trick. I can't seem to reproduce it anymore. So to sum up: setting the delegate to weak should resolve this issue. |
Yup. I dont know why the original TSMessages had the property set to assign but there is a very crucial fundamental difference between assign and weak in the instance of a delegate property. When set to assign if the delegate becomes deallocated the property would be pointing to garbage (bad) while when its weak the property becomes nil which is the correct implementation. |
Thanks for fixing this so quickly. |
We have a crash on presentMessageView that we can't quite wrap our head around.
Here are two screenshots from the stacktrace.
Have you experienced this crash before?
The text was updated successfully, but these errors were encountered: