SwiftNotificationCenter icon indicating copy to clipboard operation
SwiftNotificationCenter copied to clipboard

xcode10 debug crashes

Open jianmu297 opened this issue 6 years ago • 9 comments

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?

jianmu297 avatar Oct 11 '18 08:10 jianmu297

Thank you for your reminder, I will deal with it as soon as possible.

100mango avatar Oct 11 '18 11:10 100mango

#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 avatar Oct 13 '18 19:10 lucascarletti

@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. image

100mango avatar Oct 16 '18 06:10 100mango

I'm still having this problem with the latest release.

Elipasousa avatar Oct 24 '18 09:10 Elipasousa

@Elipasousa I haven't dropped a new release. Please use the source code to have a test.

100mango avatar Oct 24 '18 11:10 100mango

@100mango I meant that I've tested with the code from your last week commit and still have issues.

Elipasousa avatar Oct 24 '18 12:10 Elipasousa

@Elipasousa Would you mind giving a reproducible demo project for me? I would like to have a test. Thanks.

100mango avatar Oct 24 '18 12:10 100mango

@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.".

Elipasousa avatar Oct 24 '18 15:10 Elipasousa

I have same issue, and it is fixed after update to new code, it is reproducible if not updated.

lixonxx avatar Jan 14 '19 03:01 lixonxx