Bug 347762 - Invalid error message for SQLite version check after an update of SQLite
Summary: Invalid error message for SQLite version check after an update of SQLite
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 1.12
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 14:21 UTC by Benjamin Robin
Modified: 2015-06-03 10:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Robin 2015-05-15 14:21:33 UTC
skrooge try to check that the version of SQLite, the version check is not handled correctly or the error message is misleading.
Qt is compiled with -system-sqlite, but if you try to only update the SQLite library skrooge refuse to open the DB. We should not have to rebuild skrooge after each SQLite lib update.

This version check was added in the following commit
https://projects.kde.org/projects/extragear/office/skrooge/repository/revisions/ab45dba9e7c869a7eecfbe5acab47812b637aa7d

Reproducible: Always

Steps to Reproduce:
1. Compile & Install skrooge with SQLite 3.8.9
2. Launch skrooge, create a DB...
3. Update to a minor version of SQLite (3.8.10.1)
4. Launch skrooge, try to open the DB

Actual Results:  
The following message is displayed : This application can not run correctly because the SQLite version of the system (3.8.10.1) is not aligned with the SQLite version embedded in Qt (3.8.9). You should rebuild Qt with the option -system-sqlite.

Expected Results:  
The DB should be opened...
Comment 1 Stephane MANKOWSKI 2015-05-15 15:29:48 UTC
I understand the point but I added this check because:
- Some users have a Qt built without system-sqlite.
- The system SQLite version is different than the Qt sqlite version.
- This causes a crash of Skrooge.

Because Skrooge needs to call specific SQLite functions not callable from Qt, I must be sure that the Qt and the SQLite versions are aligned.
I can not call dynamically SQLIte because, in case of non-alignment, this will cause the crash.
This is why I did the check statically (Compare the version of Qt version and SQLite version AT BUILD time).
In you case, you have a false positive, but this is better than having a crash.

In conclusion: 
I don't know how to do better. 

Do you have an idea?
Comment 2 Stephane MANKOWSKI 2015-05-15 16:39:01 UTC
Yeah! i found. I will do the same but compare the MAJOR version only !!!!!!!!!!!!!!!
Comment 3 Benjamin Robin 2015-05-15 16:49:28 UTC
Are you sure that using the symbol sqlite3_version will crash the application ? I don't see how this can happen. The other solution that I can found was to create an executable that print the version of the SQLite system lib... 
Nevertheless comparing only the major version should be enough...
Comment 4 Stephane MANKOWSKI 2015-05-15 19:11:15 UTC
Git commit dd18ae016fb3eacf4894f30fd0dc15e1187cc53e by Stephane Mankowski.
Committed on 15/05/2015 at 19:11.
Pushed by smankowski into branch 'kf5'.
Invalid error message for SQLite version check after an update of SQLite

M  +1    -0    CHANGELOG
M  +2    -2    skgbasemodeler/skgdocument.cpp
M  +13   -0    skgbasemodeler/skgservices.cpp
M  +7    -0    skgbasemodeler/skgservices.h
M  +5    -0    tests/skgbasemodelertest/skgtestbase.cpp

http://commits.kde.org/skrooge/dd18ae016fb3eacf4894f30fd0dc15e1187cc53e
Comment 5 Carlos Bessa 2015-06-01 22:28:22 UTC
Hi,
will this also be corrected for the KDE4 version?
I have not yet moved to the new Plasma, and cannot start Skrooge due to this problem in my current install.
regards,
Carlos
Comment 6 Stephane MANKOWSKI 2015-06-02 06:58:30 UTC
Hi,

Yes, this has been corrected on the KDE4 version too:
http://quickgit.kde.org/?p=skrooge.git&a=commit&h=483f7409e06870780654c17b6f335addc378e99e
Comment 7 Carlos Bessa 2015-06-02 20:17:03 UTC
Hi,
Will we (users) get it only when a new version is released or if I ask the packager of my distro to build a new version the patch will already be included? (sorry to ask, I don't really get how this works yet).
Btw, thank you for such a great program. Really very intuitive to use.
Carlos
Comment 8 Stephane MANKOWSKI 2015-06-03 10:46:51 UTC
Hi,

I will publish a new 1.12.1 version including this correction.

Regards.