-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signal 11 (SIGSEGV) on Realm 0.86.0 #1882
Comments
Changing to an async transaction seems to remove the error. However it never seems to finish, the async query runs fine when loggin in. But on logout it never seems to get to onSuccess or onError. We do close the realm after cleaning it, so does this cause issues with the async transaction? Ie if we close the realm which the async transaction is spawned from, will this prevent the async transaction from running? Realm logging of cleaning until sigsegv (not async) |
@Flydiverny What is the previous Realm version you were using before updating to And I am sorry that we missed some traces statements some where, so it is a difficult to know what did you do in the transaction. From current log i can I guess you did some query and String checking. And maybe "you removed some Object from the database"? (this is guessing, missed that part trace.) Is it OK for you to share you transaction source code with us? Thanks! |
@beeender I upgraded from Realm 0.85.1. We remove quiet a few objects from the database and most of the deleting is filtered by string checks. Basically we are doing a clean up of all data from our session that is not needed for showing the user an activity history if they log back in on the same device. So we check a lot of relations. We also use encryption again since the changes in 0.85 :) DataCleaner.txt (rename to .java) this is called from; public void exerciseCleanup(int timeToStore) {
if (mRealm != null) {
mRealm.removeAllChangeListeners();
Date dateLimit = CalendarUtil.addSeconds(new Date(), -timeToStore);
new DataCleaner(mRealm, dateLimit).performCleanup();
}
} |
Tried disabling most of the cleaning and I get the SIGSEGV with just this code running; public class DataCleaner {
private final Realm mRealm;
private final Date mDateLimit;
public DataCleaner(Realm realm, Date dateLimit) {
mRealm = realm;
mDateLimit = dateLimit;
}
public void performCleanup() {
mRealm.beginTransaction();
removeFlexibleData();
mRealm.commitTransaction();
}
private void removeFlexibleData() {
// Running only this causes SIGSEGV
mRealm.where(Department.class).findAll().clear();
// Running only these below seems fine.
// mRealm.where(FirmwareSignature.class).findAll().clear();
//
// mRealm.where(Attachment.class).findAll().clear();
// mRealm.where(Message.class).findAll().clear();
// mRealm.where(Note.class).findAll().clear();
// mRealm.where(Parameter.class).findAll().clear();
// mRealm.where(PerformerRelay.class).findAll().clear();
// mRealm.where(PersonnelInfo.class).findAll().clear();
// mRealm.where(Service.class).findAll().clear();
// mRealm.where(RealmModule.class).findAll().clear();
// mRealm.where(RealmRole.class).findAll().clear();
}
} |
Getting the same issue with 0.86.0 doing the same thing as @Flydiverny
|
@mikescamell Can you share a code snippet of how you obtain the |
@kneth mine comes from calling clear on various tables on a logout in the app |
@mikescamell Sorry, I was really specific in my question. Are you objects linked ( Unfortunately, Realm doesn't check correctly (my hypothesis). |
Ah ok @kneth , that makes sense. I'll go take a look now and get back to you. |
@kneth 0.86.1 seems to have solved the clear issue for me. Thanks for your help. |
@mikescamell Great to hear! |
Initial tests for me also seems to work with Realm 0.86.1 :) |
@Flydiverny Thank for the feedback. I'll keep the issue open while you do some more testing :-) |
@kneth Actually I still managed to get SIGSEGV after upgrading to 0.86.1 a couple of times. I will report you back if I manage to find reproducible case for it. |
@Kistamushken Thanks in advance for the upcoming reproducible test case 😄 |
@kneth So far I've yet to see any new native crashes after updating to 0.86.1 :) Still only running in test environments since the app is yet to be released. So considering it was no problems reproducing it on 0.86.0, it seems fixed for us! :) |
We have however now also changed all the |
@Flydiverny Thanks for the update. |
@Flydiverny Did the issue still persist with latest version of Realm? |
@kneth Haven't tested much more after those tests with 0.86.1 due to On Tue, 12 Jan 2016 19:11 Kistamushken notifications@github.com wrote:
|
@Flydiverny I'll close the issue, and if you encounter the problem after your holidays, just let me know. |
Getting SIGSEGV on emulators (VS Emulator) and devices repeatedly at the same place.
We clear out pretty much all our tables when logging out in one big cozy transaction, all other parts of the app and realm usage seems fine after updating to 0.86.0 and the api changes.
VS Emulator:
Physical device (Samsung Note 3), first run after updating to Realm 0.86.0 in our login procedure, when creating a new Realm (or opening existing in this case) we open it directly in the background just to trigger migration.
Similar / same crash when logging out (Samsung Note 3);
The text was updated successfully, but these errors were encountered: