4

新しい sqlite データベースの作成に問題があります。ほとんどの場合は機能しますが、Samsung Galaxy S III を使用している一部のお客様から、アプリケーションのインストール後にクラッシュが報告されています。問題は、sqlite がwrite()メソッドを呼び出すときであり、お客様が exFAT でフォーマットされた外部 SD カードを持っている場合にのみ発生することがわかりました (Samsung は一部の携帯電話でサポートしています)。奇妙なことは、フォルダーの作成が機能し、空のデータベースファイルの作成も機能し、その後クラッシュすることです。これは、Samsung のストック ROM でのみ発生します。exfat を使用したカスタム ROM では、完全に機能します。この問題を解決するには?ありがとうございました

[21:10:36.225] W [22233][Sqlite]: (0) OPENX   59  /storage/extSdCard/Be-on-road/packages 0400102
[21:10:36.225] W [22233][Sqlite]: (0) OPEN    59  /storage/extSdCard/Be-on-road/packages
[21:10:36.225] W [22233][Sqlite]: (0) READ    59      0       0 0
[21:10:36.225] I [22233][Sqlite]: Database successfully opened /storage/extSdCard/Be-on-road/packages.
[21:10:36.238] W [22233][Sqlite]: (0) LOCK    59 SHARED was NONE(NONE,0) pid=22233 (unix)
[21:10:36.238] W [22233][Sqlite]: (0) LOCK    59 SHARED ok (unix)
[21:10:36.238] W [22233][Sqlite]: (0) UNLOCK  59 0 was 1(1,1) pid=22233 (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 SHARED was NONE(NONE,0) pid=22233 (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 SHARED ok (unix)
[21:10:36.239] W [22233][Sqlite]: (0) UNLOCK  59 0 was 1(1,1) pid=22233 (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 SHARED was NONE(NONE,0) pid=22233 (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 SHARED ok (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 RESERVED was SHARED(SHARED,1) pid=22233 (unix)
[21:10:36.239] W [22233][Sqlite]: (0) LOCK    59 RESERVED ok (unix)
[21:10:36.239] W [22233][Sqlite]: (0) OPENX   60  /storage/extSdCard/Be-on-road/packages-journal 0400102
[21:10:36.239] W [22233][Sqlite]: (0) OPENDIR 61  /storage/extSdCard/Be-on-road
[21:10:36.239] W [22233][Sqlite]: (0) OPEN    60  /storage/extSdCard/Be-on-road/packages-journal
[21:10:36.240] W [22233][Sqlite]: (0) WRITE   60    512       0 0
[21:10:36.242] W [22233][Sqlite]: (0) LOCK    59 EXCLUSIVE was RESERVED(RESERVED,1) pid=22233 (unix)
[21:10:36.242] W [22233][Sqlite]: (0) LOCK    59 EXCLUSIVE ok (unix)
[21:10:36.242] W [22233][Sqlite]: (0) READ    60      0     512 0
[21:10:36.242] W [22233][Sqlite]: (0) SYNC    60 
[21:10:36.246] W [22233][Sqlite]: (0) DIRSYNC 61  (have_fullfsync=0 fullsync=0)
[21:10:36.246] W [22233][Sqlite]: (0) WRITE   60     12       0 0
[21:10:36.246] W [22233][Sqlite]: (0) SYNC    60 
[21:10:36.249] W [22233][Sqlite]: (0) WRITE   59   1024       0 0
[21:10:36.249] W [22233][Sqlite]: (0) WRITE   59   1024    1024 0
[21:10:36.249] W [22233][Sqlite]: (0) WRITE   59   1024    2048 0
............ lots of write
[21:10:36.250] W [22233][Sqlite]: (0) WRITE   59   1024   10240 0
[21:10:36.250] W [22233][Sqlite]: (0) SYNC    59 
[21:10:36.263] W [22233][Sqlite]: (0) CLOSE   -1 
[21:10:36.264] W [22233][Sqlite]: (0) UNLOCK  59 1 was 4(4,1) pid=22233 (unix)
[21:10:36.264] W [22233][Sqlite]: (0) UNLOCK  59 0 was 1(1,1) pid=22233 (unix)
[21:10:36.264] W [22233][Sqlite]: (0) LOCK    59 SHARED was NONE(NONE,0) pid=22233 (unix)
[21:10:36.264] W [22233][Sqlite]: (0) LOCK    59 SHARED ok (unix)
[21:10:36.264] W [22233][Sqlite]: (0) READ    59     16      24 0
[21:10:36.264] W [22233][Sqlite]: (0) LOCK    59 RESERVED was SHARED(SHARED,1) pid=22233 (unix)
[21:10:36.264] W [22233][Sqlite]: (0) LOCK    59 RESERVED ok (unix)
[21:10:36.265] W [22233][Sqlite]: (0) OPENX   60  /storage/extSdCard/Be-on-road/packages-journal 0400102
[21:10:36.265] W [22233][Sqlite]: (0) OPENDIR 61  /storage/extSdCard/Be-on-road
[21:10:36.265] W [22233][Sqlite]: (0) OPEN    60  /storage/extSdCard/Be-on-road/packages-journal
[21:10:36.266] W [22233][Sqlite]: (0) WRITE   60    512       0 0
[21:10:36.266] W [22233][Sqlite]: (0) WRITE   60      4     512 0
[21:10:36.266] W [22233][Sqlite]: (0) WRITE   60   1024     516 0
............ lots of write
[21:10:36.269] W [22233][Sqlite]: (0) WRITE   60   1024    3612 0
[21:10:36.269] W [22233][Sqlite]: (0) WRITE   60      4    4636 0
[21:10:36.272] W [22233][Sqlite]: (0) OPENX   62  /storage/extSdCard/Be-on-road/etilqs_nX2uuug04YJMBLG 0500302
[21:10:36.273] W [22233][Sqlite]: (0) OPEN    62  
[21:10:36.273] W [22233][Sqlite]: (778) os_unix.c:27158: (5) write() - 
[21:10:36.273] W [22233][Sqlite]: (0) WRITE   62     -1       0 0
[21:10:36.273] W [22233][Sqlite]: (778) statement aborts at 22: [UPDATE app_info SET db_version=:NEW_VERSION] 
[21:10:36.273] W [22233][Sqlite]: (0) READ    60      4    4624 0
[21:10:36.275] W [22233][Sqlite]: (0) READ    60      4    1540 0
............ lots of read
[21:10:36.276] W [22233][Sqlite]: (0) READ    60      4    4636 0
[21:10:36.276] W [22233][Sqlite]: (0) READ    60      4    4624 0
[21:10:36.276] W [22233][Sqlite]: (0) CLOSE   -1 
[21:10:36.276] W [22233][Sqlite]: (0) CLOSE   -1 
[21:10:36.277] W [22233][Sqlite]: (0) UNLOCK  59 1 was 2(2,1) pid=22233 (unix)
[21:10:36.278] W [22233][Sqlite]: (0) UNLOCK  59 0 was 1(1,1) pid=22233 (unix)
[21:10:36.281] E [22233][Sqlite]: Step failed: disk I/O error, code: 778. Expecting SQLITE_DONE.
[21:10:36.281] E [22233][PackageDb]: Sqlite error: disk I/O error on query UPDATE app_info SET db_version=:NEW_VERSION
[21:10:36.282] E [22233][UpdaterService]: Failed to initialize package database on service start.
4

1 に答える 1

1

最終的に SGS III でこの問題を解決しました。これは非常に回避策です。一時ファイルがデフォルトで SD カードではなくメモリに保存されるように設定し (SQLITE_TEMP_STORE=2 コンパイル パラメータ)、動作するようです。

于 2012-12-14T12:34:44.093 に答える