Comments (19)
How do you handle write transactions in the app? Are they all performed on a serial background queue?
from rbqfetchedresultscontroller.
It's on the main thread.
from rbqfetchedresultscontroller.
Ok that rules out threading issues since main is serial. What version of FRC are you using and which version of Realm?
from rbqfetchedresultscontroller.
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.
If it is a submodule you can type:
git submodule status
to get the commit ID
from rbqfetchedresultscontroller.
We didn't submodule it. We literally just pulled in the code.
from rbqfetchedresultscontroller.
Hmm do you know roughly when you pulled the code?
from rbqfetchedresultscontroller.
Looks like 5/28/15
from rbqfetchedresultscontroller.
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.
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:
from rbqfetchedresultscontroller.
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.
K I'll try to update. Thanks.
from rbqfetchedresultscontroller.
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.
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.
Can you tell me what is the code at line 915 for you?
from rbqfetchedresultscontroller.
Did the code update fix the issue?
from rbqfetchedresultscontroller.
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.
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.
I believe I have fixed the bug in the latest release.
from rbqfetchedresultscontroller.
Related Issues (20)
- Support transient properties for sectionNameKeyPath HOT 4
- Don't release delegate HOT 5
- Crash on `performFetch` - Index is out of bounds
- Ability to turn off excessive logging for debug builds HOT 3
- When init with a empty realm, the `notificationCollection`'s `notificationBlock` might never got call
- Dead lock when FRC -updateFetchRequest in main thread and -calculateChangesWithAddedSafeObjects in background within same time;
- RBQFetchedRequest support for Properties to Group By
- Swift3 no notification passed to the delegate HOT 1
- RealmSwift 2.1.1 HOT 1
- Reintroduce Git Submodules for RBQSafeRealmObject and RealmUtilities HOT 1
- Crash when deleting sectioned objects.
- Constant crash. HOT 1
- Delegate never released HOT 7
- Update Realm dependency to 2.2
- Sorting with localizedCaseInsensitiveCompare
- SectionNameKeyPath cannot be transient? HOT 1
- Can't support Realm 3.0.0? HOT 6
- can not support Realm (3.7.4)
- Not working with swift 4
- Could you make unregisterChangeNotifications public
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbqfetchedresultscontroller.