objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence

Home Page:https://docs.objectbox.io/getting-started

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac app was crashed by objectbox

MegatronKing opened this issue · comments

Is there an existing issue?

Build info

  • objectbox version: 2.5.1
  • Flutter/Dart version: 3.16.5
  • Build OS: macOS 14.2.1 (23C71) arm64
  • Deployment OS or device: macOS 11.4 (20F71) arm64
Logs
Thread 5 Crashed:: io.flutter.ui\
0   ???                           	000000000000000000 0 + 0\
1   io.objectbox.ObjectBox        	0x0000000102060294 0x101fd4000 + 574100\
2   io.objectbox.ObjectBox        	0x000000010206208c 0x101fd4000 + 581772\
3   io.objectbox.ObjectBox        	0x0000000102061e6c 0x101fd4000 + 581228\
4   io.objectbox.ObjectBox        	0x0000000102061da0 0x101fd4000 + 581024\
5   io.objectbox.ObjectBox        	0x0000000102013c84 obx_model_property + 200\
6   io.flutter.flutter.app        	0x00000001104064b8 kDartVmSnapshotInstructions + 21752\
7   io.flutter.flutter.app        	0x0000000110e85f98 kDartIsolateSnapshotInstructions + 10988696\
8   io.flutter.flutter.app        	0x0000000110d9c04c kDartIsolateSnapshotInstructions + 10030412\
9   io.flutter.flutter.app        	0x0000000110e85d84 kDartIsolateSnapshotInstructions + 10988164\
10  io.flutter.flutter.app        	0x0000000110e85ae8 kDartIsolateSnapshotInstructions + 10987496\
11  io.flutter.flutter.app        	0x0000000110e8577c kDartIsolateSnapshotInstructions + 10986620\
12  io.flutter.flutter.app        	0x0000000110e8519c kDartIsolateSnapshotInstructions + 10985116\
13  io.flutter.flutter.app        	0x0000000110e85024 kDartIsolateSnapshotInstructions + 10984740\
14  io.flutter.flutter.app        	0x0000000110e93b18 kDartIsolateSnapshotInstructions + 11044888\
15  io.flutter.flutter.app        	0x00000001104169d0 kDartIsolateSnapshotInstructions + 46800\
16  io.flutter.flutter.app        	0x0000000110dc2fb8 kDartIsolateSnapshotInstructions + 10190008\
17  io.flutter.flutter.app        	0x0000000110413f28 kDartIsolateSnapshotInstructions + 35880\
18  io.flutter.flutter.app        	0x0000000110dc6e88 kDartIsolateSnapshotInstructions + 10206088\
19  io.flutter.flutter.app        	0x0000000110413ea0 kDartIsolateSnapshotInstructions + 35744\
20  io.flutter.flutter.app        	0x0000000110408b34 kDartVmSnapshotInstructions + 31604\
21  io.flutter.flutter-macos      	0x0000000102cf6d54 0x10242c000 + 9219412\
22  io.flutter.flutter-macos      	0x0000000102cf7480 0x10242c000 + 9221248\
23  io.flutter.flutter-macos      	0x0000000102e6b9d4 0x10242c000 + 10746324\
24  io.flutter.flutter-macos      	0x0000000102be7e38 0x10242c000 + 8109624\
25  io.flutter.flutter-macos      	0x000000010249b8e4 0x10242c000 + 456932\
26  io.flutter.flutter-macos      	0x00000001024a3c14 0x10242c000 + 490516\
27  com.apple.CoreFoundation      	0x0000000188c50c68 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32\
28  com.apple.CoreFoundation      	0x0000000188c50864 __CFRunLoopDoTimer + 1076\
29  com.apple.CoreFoundation      	0x0000000188c502ec __CFRunLoopDoTimers + 392\
30  com.apple.CoreFoundation      	0x0000000188c354f8 __CFRunLoopRun + 1944\
31  com.apple.CoreFoundation      	0x0000000188c345e8 CFRunLoopRunSpecific + 600\
32  io.flutter.flutter-macos      	0x00000001024a3eac 0x10242c000 + 491180\
33  io.flutter.flutter-macos      	0x000000010249b6b0 0x10242c000 + 456368\
34  io.flutter.flutter-macos      	0x00000001024a2824 0x10242c000 + 485412\
35  libsystem_pthread.dylib       	0x0000000188b37878 _pthread_start + 320\
36  libsystem_pthread.dylib       	0x0000000188b325e0 thread_start + 8\

"obx_model_property": so there seems something wrong with one of the properties.

If you can reproduce the issue, could you try to isolate the "offending" property?

@greenrobot Thanks for your reply. Unfortunately I cannot reproduce the issue, I got this report by a user. According to him, historical versions of the app are working(objectbox v1.7.2), but the latest app will crash (objectbox v2.5.1). I don't know if it is caused by upgrading the objectbox version.

@MegatronKing Not sure if possible, but can you ask the user to provide the full crash report from macOS (https://support.apple.com/guide/console/reports-cnsl664be99a/mac)? The snippet above is lacking an error code and additional details, similar to the report attached to this comment.

@MegatronKing Thanks! Managed to symbolicate it:
dart-crash-gh-626_symbolicated.txt

Notable parts:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [29499]

Thread 5 Crashed:: io.flutter.ui
0   ???                           	000000000000000000 0 + 0
1   io.objectbox.ObjectBox        	0x0000000102060294 obx_dart_query_find_ptr (in ObjectBox) + 192096 + 574100
2   io.objectbox.ObjectBox        	0x000000010206208c obx_dart_query_find_ptr (in ObjectBox) + 199768 + 581772
3   io.objectbox.ObjectBox        	0x0000000102061e6c obx_dart_query_find_ptr (in ObjectBox) + 199224 + 581228
4   io.objectbox.ObjectBox        	0x0000000102061da0 obx_dart_query_find_ptr (in ObjectBox) + 199020 + 581024
5   io.objectbox.ObjectBox        	0x0000000102013c84 obx_model_property + 200
6   io.flutter.flutter.app        	0x00000001104064b8 kDartVmSnapshotInstructions + 21752
7   io.flutter.flutter.app        	0x0000000110e85f98 kDartIsolateSnapshotInstructions + 10988696

Two issues:

  • the actual location of the crash is still unknown,
  • the obx_dart_query_find_ptr function (or any nearby) is currently not used by the ObjectBox Dart library (and only was used internally to test an alternative stream implementation, but that was never released).

It should not be possible to ship an incompatible C library when building with Flutter, which would explain the likely incorrect function names. Even if, the Dart code enforces a minimum version throwing before a Store could even be initialized.

So not sure what is happening here.

Update: after some internal discussion it might currently not be possible to correctly symbolize crash reports because the needed info is stripped from our release library included in the ObjectBox Pod. Hence the nonsensical method names.

This leaves obx_model_property and EXC_BAD_ACCESS (SIGSEGV) as the only pieces of info. This method is called when creating a Store instance. Any expected exception thrown should be re-thrown as a Dart exception though, so I don' think it's an issue with the model itself.

This might be another weird Dart SDK bug, so I suggest building with the latest version of the Flutter/Dart SDK if possible.

Without additional information, we are unfortunately not sure how to resolve this issue. Therefore this issue has been automatically closed. Feel free to comment with additional details and we can re-open this issue.