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

Crash when invoking .count() on an empty results #6443

Closed
nirinchev opened this issue Mar 27, 2023 · 0 comments · Fixed by #6453
Closed

Crash when invoking .count() on an empty results #6443

nirinchev opened this issue Mar 27, 2023 · 0 comments · Fixed by #6453
Assignees

Comments

@nirinchev
Copy link
Member

nirinchev commented Mar 27, 2023

When you construct an empty (unbacked) results instance (

// A default-constructed Results which is backed by nothing. This
// behaves as if it was backed by an empty table/collection, and is
// inteded for read-only Realms which are missing tables.
Empty,
) and then invoke count on the query obtained from the results, we get a crash when trying to obtain the logger in
auto logger = m_table->get_logger();
.

The test I have is a C# one, but it roughly does:

Results = {};
results.set_update_policy(Results::UpdatePolicy::Never);

results.get_query().count(results.get_descriptor_ordering());
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants