Skip to content

iOS 17 crash when query.find #561

@fooevr

Description

@fooevr

Write a very simple code, when query.find() line excuted, the iOS system will definitely restart.

final p = await getApplicationDocumentsDirectory();
final store = await openStore(directory: '${p.path}/db1');
final box = store.box<KeyValue>();
box.put(KeyValue()
  ..key = "A"
  ..value = "B");
final query = box.query(KeyValue_.key.equals("A")).build();
final values = query.find();
@Entity()
class KeyValue {
  @Id()
  int id = 0;

  @Index()
  String? key;
  String? value;
}

Basic info:

  • ObjectBox version: 2.3.0
  • Flutter/Dart SDK: Flutter 3.13.4/Dart 3.1.2
  • Reproducible: always
  • Build OS: MacOS 13.5.2
  • Deployment device or OS: iPhone 14 pro/iOS 17.0

dependencies:

test17 1.0.0+1
├── cupertino_icons 1.0.6
├── flutter 0.0.0
│   ├── characters 1.3.0
│   ├── collection 1.17.2
│   ├── material_color_utilities 0.5.0
│   │   └── collection...
│   ├── meta 1.9.1
│   ├── sky_engine 0.0.99
│   ├── vector_math 2.1.4
│   └── web 0.1.4-beta
├── objectbox 2.3.0
│   ├── ffi 2.1.0
│   ├── flat_buffers 2.0.5
│   ├── path 1.8.3
│   ├── collection...
│   └── meta...
├── objectbox_sync_flutter_libs 2.3.0
│   ├── flutter...
│   ├── objectbox...
│   └── path_provider...
└── path_provider 2.1.1
    ├── path_provider_android 2.2.0
    │   ├── flutter...
    │   └── path_provider_platform_interface...
    ├── path_provider_foundation 2.3.1
    │   ├── flutter...
    │   └── path_provider_platform_interface...
    ├── path_provider_linux 2.2.1
    │   ├── xdg_directories 1.0.3
    │   │   ├── meta...
    │   │   └── path...
    │   ├── ffi...
    │   ├── flutter...
    │   ├── path...
    │   └── path_provider_platform_interface...
    ├── path_provider_platform_interface 2.1.1
    │   ├── platform 3.1.2
    │   ├── plugin_platform_interface 2.1.6
    │   │   └── meta...
    │   └── flutter...
    ├── path_provider_windows 2.2.1
    │   ├── win32 5.0.8
    │   │   └── ffi...
    │   ├── ffi...
    │   ├── flutter...
    │   ├── path...
    │   └── path_provider_platform_interface...
    └── flutter...

flutter doctor

[✓] Flutter (Channel stable, 3.13.4, on macOS 13.5.2 22G91 darwin-arm64, locale zh-Hans-US)
    • Flutter version 3.13.4 on channel stable at /Users/fooevr/Develop/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 367f9ea16b (8 天前), 2023-09-12 23:27:53 -0500
    • Engine revision 9064459a8b
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/fooevr/Develop/sdks/android/
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/fooevr/Applications/Android Studio Giraffe 2022.3.1 Patch 1.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Users/fooevr/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.22-10799086)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/fooevr/Applications/Android Studio Giraffe 2022.3.1 Patch 1.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.2)
    • IntelliJ at /Users/fooevr/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.5.2 22G91 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.187
    ! Error: Browsing on the local area network for 张重阳’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions