-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Expected results
Clearing a list with nested lists in an mixed field will lead to a crash on any access to the previously nested lists - also even tests for validity. We need to be able to at least ask if the lists are still valid.
This only happens if we clear the parent list with realm_list_clear(parent) but not if the mixed property is overwritten with a non-list value.
See this test for reproduction.
Actual Results
Crash
[ctest] libc++abi: terminating due to uncaught exception of type realm::OutOfBounds: Requested index 0 calling get() on list 'Foo.any' when empty
Steps & Code to Reproduce
The crash is trigger by CHECK(!realm_list_is_valid(user_data.list)); in this test
Core version
Core version: 14.4.1