Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Swift Replicator.addChangeListener crashes #1926
In my project the above code crashes at addChangeListener even if I have only an empty block, with errors "fatal error: attempted to read an unowned reference but object 0x60c000129560 was already deallocated". Really suspect that the
Commenting out this call would stop the crash, but I also lost capability to track the changes from replicator.
I am not seeing any crashes. This is what I have.
@jayzhanghs : Can you change the scope of the replicator object that you are creating so it has class scope and it is not locally scoped to the function.
referenced this issue
Oct 10, 2017
@jayzhanghs please make the instance variable for the replicator. In Objective-C version, the started replicator is cached inside the database object as well so that you don't need to make the instance variable. I had the changes for this but I would like to hold it off a bit as there is a bit more work needs to be done to take care the case when closing the database. To sum up, the fix will not be in the next DB release which is DB18.