Skip to content
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

Two different crashes in RealmState.RemoveRealm #1212

Closed
eyadon opened this issue Feb 3, 2017 · 4 comments
Closed

Two different crashes in RealmState.RemoveRealm #1212

eyadon opened this issue Feb 3, 2017 · 4 comments
Assignees
Milestone

Comments

@eyadon
Copy link

eyadon commented Feb 3, 2017

We have reverted from 0.82.1 back to 0.80.0 again. :(

The triggering page is a listview of composite display objects assembled from RealmObjects coming from two different realms (one is event records, the other is associated reusable text).

Crash occurs on iOS and Android. The InvalidOperation will happen when scrolling the page, the NRE will happen occasionally on opening the page.

System.NullReferenceException: Object reference not set to an instance of an object.
at Realms.Realm+RealmState+c__AnonStorey2.<>m__0 (System.WeakReference r) [0x00000] in :0
at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00044] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:1122
at Realms.Realm+RealmState.RemoveRealm (Realms.Realm realm) [0x0000d] in :0
at Realms.Realm.Dispose (System.Boolean disposing) [0x0000c] in :0
at Realms.Realm.Finalize () [0x00000] in :0

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:99
at System.Collections.Generic.List1+Enumerator[T].MoveNextRare () [0x00016] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:1180 at System.Collections.Generic.List1+Enumerator[T].MoveNext () [0x00050] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:1174
at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00052] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:1124
at Realms.Realm+RealmState.RemoveRealm (Realms.Realm realm) [0x0000d] in :0
at Realms.Realm.Dispose (System.Boolean disposing) [0x0000c] in :0
at Realms.Realm.Finalize () [0x00000] in :0

@nirinchev
Copy link
Member

Hi @eyadon, I have had trouble reproducing the bug. I have some ideas what might be causing it, but would like to verify that my assumptions are correct. Do you think it would be possible to share your project privately?

@nirinchev nirinchev added this to the v1.0 milestone Feb 7, 2017
@eyadon
Copy link
Author

eyadon commented Feb 7, 2017

Sure. I'll send an email.

@nirinchev
Copy link
Member

Great - I've pushed what I believe should be a fix to that problem, but I'll wait for your project to validate that both issues are gone.

@nirinchev
Copy link
Member

Fixed in #1222

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants