-
Notifications
You must be signed in to change notification settings - Fork 87
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
[macOS] Crash: Assertion failed #1396
Comments
@sbenmeddour I suspect this is related to realm/realm-core#6922 |
All i can see, is that the crash happens every time when i try to insert objects after executing a large delete block before |
Are you saying you can reproduce this consistently? |
Yes, i tried 3 times 5 minutes ago and i got the crash every time |
Are you able to create a stand-alone reproduction, or describe in more details how/when it happens? Or perhaps even give us access to your code-base? |
I am making a small reproduction sample. if I can't achieve to reproduce the crash with it, i will extract some blocks from my code |
I'm back with news: I know the reason to make it crash Short description: Open two realms in different isolates. (lets call them Realm 1 and Realm 2) Notes: The crash happens only if i use (maybe async write transactions are not isolate safe, or i'm not using it right) For better visibility i created a gist with a sample app with two buttons (delete, insert). You just have to tap on them quickly 2 times to make it crash |
@sbenmeddour I can replicate the crash on my machine. Thank you so much for your effort and dedication 🙏 . I'll investigate this further with members of the realm core team tomorrow. |
Thank you for your quick response. It's a pleasure to have such support from your team |
@sbenmeddour It is a blessing to have users such as you 🥇 I have reduced your reproduction to: import 'dart:isolate';
import 'package:realm_dart/realm.dart';
part 'slab_alloc2.g.dart';
@RealmModel()
class _Stuff {
late int id;
}
final realm = Realm(Configuration.local([Stuff.schema]));
Future<void> main(List<String> arguments) async {
Realm.logger.level = RealmLogLevel.all;
Isolate.run(() async {
while (true) {
await realm.writeAsync(() {
realm.addAll(List.generate(100000, (i) => Stuff(i)));
});
}
});
while (true) {
await realm.writeAsync(() {
realm.deleteAll<Stuff>();
});
}
} |
Fixed by realm/realm-core#6962 |
What happened?
A bug happened!
Repro steps
I don't know how to reproduce it, it happens randomly
Version
Flutter 3.10.6 - Dart 3.0.6
What Atlas Services are you using?
Local Database only
What type of application is this?
Flutter Application
Client OS and version
macOS 13.2.1 (M2 chip)
Code snippets
No response
Stacktrace of the exception/crash you're getting
Relevant log output
No response
The text was updated successfully, but these errors were encountered: