{"issue":{"created_at":"2011-10-19T08:11:48Z","state":"open","updated_at":"2011-11-30T15:30:12Z","comments":9,"user":{"gravatar_id":"612d3ab75c93d54189d7037aadb96fd3","id":1137653,"url":"https://api.github.com/users/PARASOFT","avatar_url":"https://secure.gravatar.com/avatar/612d3ab75c93d54189d7037aadb96fd3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"PARASOFT"},"body":"I am using the libraries that come with `SQLCipherForAndroid-SDK-0.0.5-Beta.tar.gz`. My database is created successfully. My first sql query works fine but 2nd one(\"SELECT count(A) FROM B)\" fails when I try to use cursor object returned(which is not null). I test on Samsung Galaxy Gio device. \r\n\r\nAccording to error, it seems that memory allocation fails. (I don't understand why this >2MB allocation is needed, since my query returns empty result. Galaxy Gio is a cheap device, so maybe less heap memory allowed per app?) \r\n\r\nThe code that leads to this crash is `cursor.moveToNext();` but also other calls cursor methods cause this crash. A weird thing is that, this crash doesn't happen if I dig into attached jar's source code with eclipse.\r\n\r\nMy program works fine if I don't use sqlcipher.. \r\n\r\nI get the following error in logcat:\r\n\r\n10-19 10:55:13.483: ERROR/CursorWindow(2770): need to grow: mSize = 2097152, size = 9, freeSpace() = 0, numRows = 1\r\n10-19 10:55:13.591: INFO/DEBUG(2187): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\r\n10-19 10:55:13.591: INFO/DEBUG(2187): Build fingerprint: 'samsung/GT-S5660/GT-S5660/GT-S5660:2.2.1/FROYO/XXKC7:user/release-keys'\r\n10-19 10:55:13.591: INFO/DEBUG(2187): pid: 2770, tid: 2770  >>> com.MyProject <<<\r\n10-19 10:55:13.591: INFO/DEBUG(2187): signal 11 (SIGSEGV), fault addr 4f16c448\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  r0 4f16c448  r1 00000000  r2 00000001  r3 80000000\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  r4 00000000  r5 00000000  r6 00000000  r7 00000000\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  r8 00000009  r9 00000000  10 00000001  fp 00000064\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  ip 00000000  sp beaed430  lr 00000000  pc afd0f460  cpsr 80000010\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  d0  0000002a42280000  d1  3ff0000042280000\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  d2  bfd3441350baf6de  d3  c1493000c1323800\r\n10-19 10:55:13.591: INFO/DEBUG(2187):  d4  4900000040dcb000  d5  000000000006e580\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  d6  4515a00000000800  d7  40800000c48ee000\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  d8  0000000000000000  d9  0000000000000000\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  d10 0000000000000000  d11 0000000000000000\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  d12 0000000000000000  d13 0000000000000000\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  d14 0000000000000000  d15 0000000000000000\r\n10-19 10:55:13.601: INFO/DEBUG(2187):  scr 80000012\r\n10-19 10:55:13.651: INFO/DEBUG(2187):          #00  pc 0000f460  /system/lib/libc.so\r\n10-19 10:55:13.651: INFO/DEBUG(2187):          #01  pc 00002708  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.651: INFO/DEBUG(2187):          #02  pc 00003b34  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.651: INFO/DEBUG(2187):          #03  pc 000170b4  /system/lib/libdvm.so\r\n10-19 10:55:13.651: INFO/DEBUG(2187):          #04  pc 000039d6  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.651: INFO/DEBUG(2187): code around pc:\r\n10-19 10:55:13.651: INFO/DEBUG(2187): afd0f440 e213301c 0a000008 e1530002 8202301c \r\n10-19 10:55:13.661: INFO/DEBUG(2187): afd0f450 e0422003 e1b03e03 28a04002 28a04002 \r\n10-19 10:55:13.661: INFO/DEBUG(2187): afd0f460 48a04002 e1b03103 24801004 e2522020 \r\n10-19 10:55:13.661: INFO/DEBUG(2187): afd0f470 e1a03001 4a000002 e2522020 e8a050fa \r\n10-19 10:55:13.661: INFO/DEBUG(2187): afd0f480 2afffffc e2822020 e1b02e02 28a0500a \r\n10-19 10:55:13.661: INFO/DEBUG(2187): code around lr:\r\n10-19 10:55:13.661: INFO/DEBUG(2187): stack:\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed3f0  4410eab4  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed3f4  44332464  /dev/ashmem/dalvik-LinearAlloc (deleted)\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed3f8  00000000  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed3fc  898c75f3  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed400  afd4172c  /system/lib/libc.so\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed404  002803d8  [heap]\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed408  00000009  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed40c  00000000  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed410  81505128  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed414  815025f5  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed418  815043c0  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed41c  00200000  [heap]\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed420  00000009  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed424  00000000  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed428  df002777  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed42c  e3a070ad  \r\n10-19 10:55:13.661: INFO/DEBUG(2187): #00 beaed430  4f16c448  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed434  002803d8  [heap]\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed438  4f16c448  \r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed43c  4eeec008  /dev/ashmem/CursorWindow (deleted)\r\n10-19 10:55:13.661: INFO/DEBUG(2187):     beaed440  00280448  [heap]\r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed444  8150270b  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.671: INFO/DEBUG(2187): #01 beaed448  00000000  \r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed44c  00000000  \r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed450  81506b84  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed454  002803d8  [heap]\r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed458  00281ac8  [heap]\r\n10-19 10:55:13.671: INFO/DEBUG(2187):     beaed45c  81503b39  /data/data/com.MyProject/lib/libdatabase_sqlcipher.so\r\n","assignee":null,"id":1991571,"labels":[{"name":"bug","color":"e10c02","url":"https://api.github.com/repos/guardianproject/android-database-sqlcipher/labels/bug"}],"number":17,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"CursorWindow need to grow crash","html_url":"https://github.com/guardianproject/android-database-sqlcipher/issues/17","closed_at":null,"url":"https://api.github.com/repos/guardianproject/android-database-sqlcipher/issues/17","milestone":null},"action":"created","comment":{"created_at":"2011-11-30T15:30:09Z","updated_at":"2011-11-30T15:30:09Z","user":{"gravatar_id":"14ed0e493cb53d196b5124f53ec9c0d2","id":3225,"url":"https://api.github.com/users/developernotes","avatar_url":"https://secure.gravatar.com/avatar/14ed0e493cb53d196b5124f53ec9c0d2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"developernotes"},"body":"Hi PARASOFT,\r\n\r\nThanks for reporting the update.  Could you close the ticket?  Thanks!","id":2961095,"url":"https://api.github.com/repos/guardianproject/android-database-sqlcipher/issues/comments/2961095"}}