[Digikam-devel] SQLite broken in git

Francesco Riosa francesco at pnpitalia.it
Wed Sep 7 01:16:20 BST 2011


On 09/07/11 00:03, Francesco Riosa wrote:
> On 09/06/11 23:08, Marcel Wiesweg wrote:
>> Hi,
>>
>> for me, database config is now broken in git.
>> Note how filenames are not properly added to the paths:

ok, copyed your settings and reproduced it a few times, seem similar to 
a race-condition. But it happen when digikam run as a single thread

The first run settings are read from "legacy" and written synced to the 
file, but database cannot open

the second time DK read the settings from the file and all is fine

Problem is I cannot understand why it has empty parameters and so asking 
for help (still newbye in c++ evidently)

Using qtcreator I've set a breakpoint

databaseparameters.cpp:429
kDebug(50003) << "Trying to read legacy configuration";

DK first time reach that from main,
main.cpp:169
params.legacyAndDefaultChecks(firstAlbumPath);

when I do step into legacyAndDefaultChecks it's executed correctly, 
filling the DatabaseParameters object params, then main() call
params.writeToConfig(config);
and also this one is correctly done

but

main.cpp:185
// initialize database
AlbumManager::instance()->setDatabase(params, 
!commandLineDBPath.isNull(), firstAlbumPath);

don't work;

I'm using some scoped variable that it's emptyed in the meantime? What 
I'm doing wrong?

P.S.
added a bunch of kdebug with
http://commits.kde.org/digikam/a3e9218bb02a1fb23728eaf6a9f7d56a70fe27fa


>>
>> digikam(1472)/digikam (core) Digikam::AlbumManager::setDatabase:
>> DatabaseParameters: [ Type "QSQLITE", Name "/media/fotos/" tmb.Type
>> "QSQLITE",
>> tmb.Name "/media/fotos/" ]
>>
>> I suspect commit 37f5f5d59f174bcedc86438365f9a7270a1bd677 which
>> introduced
>> changes in databaseparameters
>>
>> Config settings seem unchanged:
>> [Database Settings]
>> Database Connectoptions=
>> Database Hostname=
>> Database Name=/media/fotos/
>> Database Name Thumbnails=/media/fotos/
>> Database Password=
>> Database Port=-1
>> Database Type=QSQLITE
>> Database Username=
>> Internal Database Server=false

should become

[Database Settings]
Database Connectoptions=
Database Hostname=
Database Name=/media/fotos/
Database Name Thumbnails=/media/fotos/
Database Password=
Database Port=-1
Database Type=QSQLITE
Database Username=
Images Connectoptions=
Images Hostname=
Images Name=/media/fotos/
Images Password=
Images Port=-1
Images Type=QSQLITE
Images Username=
Internal Database Server=false
Thumbnails Connectoptions=
Thumbnails Hostname=
Thumbnails Name=/media/fotos/
Thumbnails Password=
Thumbnails Port=-1
Thumbnails Type=QSQLITE
Thumbnails Username=




More information about the Digikam-devel mailing list