serious bug in BREW - IDBMGR_OpenDatabaseEx erases database | developer.brewmp.com serious bug in BREW - IDBMGR_OpenDatabaseEx erases database | developer.brewmp.com

Developer

serious bug in BREW - IDBMGR_OpenDatabaseEx erases database

Forums:

I think there is a problem with BREW IDBMgr implementation at least in SDK 2.0.1. Sometimes it crashes database and removes database files. The situation is as follows:
Install an application, that works with database. Let it create its database. Exit application and run MaxFileCnt to fill the device EFS with maximum number of files. Enter the application and let it update some record, increasing field sizes. Exit application and run it again (this is done to close and reopen database). The database will be erased during open.

I think that happends because BREW just marks updated record as deleted and appends new record. When there is subsequent database opening - it tries to clear database and requires some temporary file for this(?). Since there is maximum file count reached - it can's create it and crashes with erasing existing database.
Could you, please, confirm that this is a BREW problem?

Hi Archi,
We are facing the same problem. Basically, IDBMGR_OpenDatabaseEx() returns NULL and the associated database files are deleted. Are we doing something wrong here? Am using BREW SDK v2.0.1, and I tried it on LG6000 and SE47 as well.
Thanks!
Priya

Hi Archi,
We are facing the same problem. Basically, IDBMGR_OpenDatabaseEx() returns NULL and the associated database files are deleted. Are we doing something wrong here? Am using BREW SDK v2.0.1, and I tried it on LG6000 and SE47 as well.
Thanks!
Priya

knspriya wrote:Hi Archi,
We are facing the same problem. Basically, IDBMGR_OpenDatabaseEx() returns NULL and the associated database files are deleted. Are we doing something wrong here? Am using BREW SDK v2.0.1, and I tried it on LG6000 and SE47 as well.
Thanks!
Priya
Hi, Priya!
I believe you are doing nothing wrong, but there is something you can do in addition - check for enought free space and file handles before you are opening the database file. For example, you can check if you are able to create a file (don't forget to remove it after check) and check if file system has free space twice as much as you database file. If it does not - don't open the database, show some error message, saying that user should remove some applications or files to free space.

knspriya wrote:Hi Archi,
We are facing the same problem. Basically, IDBMGR_OpenDatabaseEx() returns NULL and the associated database files are deleted. Are we doing something wrong here? Am using BREW SDK v2.0.1, and I tried it on LG6000 and SE47 as well.
Thanks!
Priya
Hi, Priya!
I believe you are doing nothing wrong, but there is something you can do in addition - check for enought free space and file handles before you are opening the database file. For example, you can check if you are able to create a file (don't forget to remove it after check) and check if file system has free space twice as much as you database file. If it does not - don't open the database, show some error message, saying that user should remove some applications or files to free space.

What does the update functions returns? Could it simply be that you corrupt your database somehow, so the next time you open it it's destroyed?
But yeah, opening a database will create temporary files (just check the .idx), and obviously, it might be one of the reason aswell.
/kUfa

What does the update functions returns? Could it simply be that you corrupt your database somehow, so the next time you open it it's destroyed?
But yeah, opening a database will create temporary files (just check the .idx), and obviously, it might be one of the reason aswell.
/kUfa

I got rejected by NSTL (sob) on this for the VX 7000. We now just don't do anything with the db when the device has low filespace (treat the < 10kb free situation as 0kb free).

I got rejected by NSTL (sob) on this for the VX 7000. We now just don't do anything with the db when the device has low filespace (treat the < 10kb free situation as 0kb free).