SwiftNotificationCenter
SwiftNotificationCenter copied to clipboard
xcode10 debug crashes
Random crashes when app run in xcode10 debug mode, always break in same place.
mutating func add(_ object: T){
self.objects.formUnion([WeakObject(object)])
}
Error is Thread 13: Fatal error: Duplicate element found in Set. Elements may have been mutated after insertion
.
Use the laster pod version.
What can i do?
Thank you for your reminder, I will deal with it as soon as possible.
#14 I think it will fix that, but it's sure not the best way.
By the way checked memory leaks, allocation and stuff and all seems to be ok -
@lucascarletti @jianmu297 Hi, According to the coder who implements Swift's set, I fix it by changing the implementation of the weakObjectSet. Please give it a try and tell me whether it works.Thanks.
I'm still having this problem with the latest release.
@Elipasousa I haven't dropped a new release. Please use the source code to have a test.
@100mango I meant that I've tested with the code from your last week commit and still have issues.
@Elipasousa Would you mind giving a reproducible demo project for me? I would like to have a test. Thanks.
@100mango will do when I have some time. In the meanwhile, I also noticed that when I try to deallocate an instance on the deinit method, I get this: "Cannot form weak reference to instance of class aClass. It is possible that this object was over-released, or is in the process of deallocation.".
I have same issue, and it is fixed after update to new code, it is reproducible if not updated.