fix(db): drop sqlite3_flutter_libs to stop SQLCipher symbol-clash segfault
drift_flutter pulled sqlite3_flutter_libs, whose bundled plain SQLite exports the same sqlite3_* symbols as sqlcipher_flutter_libs. With both loaded the app segfaulted at startup on Linux desktop when opening the encrypted DB (the app built and the Dart VM started, then crashed natively — "Lost connection"). drift_flutter was unused (we open the DB via our own encrypted executor), so removing it drops sqlite3_flutter_libs and leaves SQLCipher as the only native sqlite provider. 37 tests green; Linux build runs without crashing.
This commit is contained in:
parent
5c607c0f65
commit
c4b80ab4a9
4 changed files with 3 additions and 23 deletions
|
|
@ -9,7 +9,6 @@
|
|||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||
#include <sqlcipher_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
|
|
@ -21,7 +20,4 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||
g_autoptr(FlPluginRegistrar) sqlcipher_flutter_libs_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
||||
sqlite3_flutter_libs_plugin_register_with_registrar(sqlcipher_flutter_libs_registrar);
|
||||
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
||||
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
file_selector_linux
|
||||
flutter_secure_storage_linux
|
||||
sqlcipher_flutter_libs
|
||||
sqlite3_flutter_libs
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ dependencies:
|
|||
# Stream combinators (StreamGroup) for reactive multi-table reads.
|
||||
async: ^2.11.0
|
||||
|
||||
# Encrypted local database.
|
||||
# Encrypted local database. NOTE: do NOT add sqlite3_flutter_libs / drift_flutter
|
||||
# — their bundled plain SQLite collides (same symbols) with SQLCipher and
|
||||
# segfaults on desktop. SQLCipher is the only native sqlite provider here.
|
||||
drift: ^2.28.0
|
||||
drift_flutter: ^0.2.4
|
||||
sqlite3: ^2.7.5
|
||||
sqlcipher_flutter_libs: ^0.6.5
|
||||
|
||||
|
|
|
|||
16
pubspec.lock
16
pubspec.lock
|
|
@ -225,14 +225,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.31.0"
|
||||
drift_flutter:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: drift_flutter
|
||||
sha256: c07120854742a0cae2f7501a0da02493addde550db6641d284983c08762e60a7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.8"
|
||||
equatable:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -953,14 +945,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.9.4"
|
||||
sqlite3_flutter_libs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqlite3_flutter_libs
|
||||
sha256: eeb9e3a45207649076b808f8a5a74d68770d0b7f26ccef6d5f43106eee5375ad
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.42"
|
||||
sqlparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue