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

Dart 3.1.0 (Flutter 3.13.0): process terminated due to native objectbox exception #556

Closed
greenrobot-team opened this issue Sep 5, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@greenrobot-team
Copy link
Member

greenrobot-team commented Sep 5, 2023

TL;DR: at this point do not upgrade to Flutter 3.13.0 and Dart 3.1.0 when your app should run on Linux.

If functions are called that throw an exception in the native ObjectBox code, instead of receiving a Dart exception that can be handled the VM process terminates.

Some examples:

// Throws NumericOverflowException
query.property(tLong).sum();

// Shows up in log output like:
terminate called after throwing an instance of 'objectbox::NumericOverflowException'
terminate called recursively


// Throws ObjectBoxException
box.put(User(id: idDoesNotExist), mode: PutMode.update)

// Shows up in log output like:
terminate called after throwing an instance of 'objectbox::IllegalArgumentException'
terminate called recursively

There is a known Dart issue (dart-lang/sdk#53267) about this. A fix is in the works, no ETA.

It appears there are no workarounds other than not updating to Dart 3.1 (shipped with Flutter 3.13) when building for Linux.

@greenrobot-team greenrobot-team added the bug Something isn't working label Sep 5, 2023
@greenrobot-team
Copy link
Member Author

This should be fixed as of Flutter 3.13.6 (shipping with Dart 3.1.3).

@greenrobot-team
Copy link
Member Author

Confirmed fixed as of Flutter 3.13.6 (Dart 3.1.3). If you are affected, make sure to flutter upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant