Giter Site home page Giter Site logo

Comments (19)

bigfish24 avatar bigfish24 commented on September 25, 2024

How do you handle write transactions in the app? Are they all performed on a serial background queue?

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

It's on the main thread.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Ok that rules out threading issues since main is serial. What version of FRC are you using and which version of Realm?

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

Hmm we pulled RBQ into our project so we weren't tracking it using CocoaPods or Carthage. (We're using it inside a swift framework, so we didn't want to do CocoaPods inside a framework.) Is there an easy way to check the version?

I'm on 0.94.1 for Realm.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

If it is a submodule you can type:

git submodule status

to get the commit ID

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

We didn't submodule it. We literally just pulled in the code.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Hmm do you know roughly when you pulled the code?

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

Looks like 5/28/15

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

So maybe we do need to track the source somehow. CocoaPods still won't work for us. I noticed in another thread that you are working on Carthage support. Is that working now?

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

Did some more digging. And I have no idea if this is relevant. I am writing on the main thread, but it looks like there are multiple background listeners. This is from Crashlytics:
screen shot 2015-09-01 at 9 35 38 am

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

No that is normal. Every Realm instance creates a notification listener on background thread to handle automatically refreshing data changes from one realm instance to the next. I was traveling yesterday, will look into it a bit more. Would say though that given how old your pull of the code is, you should update to the latest. However, the latest (2.0) requires Realm 0.95.

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

K I'll try to update. Thanks.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Can you check if the error is occurring due to a section delete or a row delete? (i.e. in applyDerivedChangesToCache:state: is the error in the loop over derived section changes or derived object changes)

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

Looking at the stack trace we are updating an object. We section by date. So if an object gets it's date updated, that could certainly result in a section being deleted and a different section being created or updated.

Another interesting anomaly is we have seen this crash 5741 and we have had 5741 users see the crash. So each user that does have it happen, sees it happen exactly once. And then is good.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Can you tell me what is the code at line 915 for you?

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Did the code update fix the issue?

from rbqfetchedresultscontroller.

ncperry avatar ncperry commented on September 25, 2024

Hey sorry, things got a little crazy here. If the database got deleted while the FRC was tracking could that cause this issue?

Cause after looking a bit more at the code, that could have happened.

As far as the fix working, we weren't seeing this bug at all but rather in 0.1% of our user base, so it was unreproducible here in the office. So we won't know about fixes working until we push a new build to the store.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

Sorry for my delay in responding. I was traveling in Europe. If the database got deleted while the FRC was tracking that would probably be the cause. The FRC creates a cache representation of the table state (including the sections) in a second Realm (either in-memory or persisted), and then when changes occur in the main Realm, this cache is used to find the differences. If you delete the main Realm file and create a new one, the cache might not have been rebuilt, so it would throw an index out of bounds error potentially when trying to figure out the changes applied to the new main Realm.

Does this make sense?

To fix, you should call reset on the FRC after the main Realm is deleted/recreated. This will delete the cache and rebuild it, so that it matches the new Realm.

from rbqfetchedresultscontroller.

bigfish24 avatar bigfish24 commented on September 25, 2024

I believe I have fixed the bug in the latest release.

from rbqfetchedresultscontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.