Bug 394259 - Elisa has empty albums and artists folders
Summary: Elisa has empty albums and artists folders
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
: 394427 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-14 19:59 UTC by Mykola Krachkovsky
Modified: 2018-05-24 18:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
removing of SQL parameter second usage (1.53 KB, patch)
2018-05-14 19:59 UTC, Mykola Krachkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mykola Krachkovsky 2018-05-14 19:59:25 UTC
Created attachment 112654 [details]
removing of SQL parameter second usage

When launching Elisa it scans for tracks and shows them in Tracks section, but in Albums or Artists sections every folder appears to be empty. I've found a lot of errors (two distinct, but repeated a lot), when Elisa is launched from terminal:

DatabaseInterface::updateTracksCount QSqlError("", "Parameter count mismatch", "")
DatabaseInterface::fetchTracks QSqlError("", "Parameter count mismatch", "")

There are also SQL expression and bind map. All looks quite fine, the only I've noted parameter :albumId is mentioned twice in that expression. I've tried to rewrite SQL to use that parameter only once and it seems working fine after that.

I'm not sure this is exactly an Elisa error or somewhere between Qt and SQLite. Haven't found any statement that parameters should be used only once.

Qt: 5.10.0
SQLite: 3.23.1

Should I move patch to phabricator?
Comment 1 Matthieu Gallien 2018-05-14 20:09:15 UTC
Thanks for your report. Please push it to phabricator. At the moment, at least for me, it seems down.
Comment 2 Mykola Krachkovsky 2018-05-15 06:55:55 UTC
Phabricator is working finally:
https://phabricator.kde.org/D12889
Comment 3 Quiralta 2018-05-24 02:28:09 UTC
*** Bug 394427 has been marked as a duplicate of this bug. ***
Comment 4 Quiralta 2018-05-24 02:30:49 UTC
I notice this behavior happening without Elisa updating, thus I'm thinking something in Plasma has changed that render Elisa album view empty?

Archlinux/Plasma here. same error reported in phabricator.
Comment 5 Mykola Krachkovsky 2018-05-24 07:47:42 UTC
(In reply to Quiralta from comment #4)
> I notice this behavior happening without Elisa updating, thus I'm thinking
> something in Plasma has changed that render Elisa album view empty?
> 
> Archlinux/Plasma here. same error reported in phabricator.

I think it's a Qt + SQLite bug, which maybe fixed in [1], but it isn't in 5.11.0. So removing second parameter usage is simplest solution to remove problems, IMHO. I just didn't understand what next I should do in phabricator.

[1] http://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp?id=b0f3cc1594308ed3f3977bdcd451e8cf0eb0478d
Comment 6 Matthieu Gallien 2018-05-24 11:44:51 UTC
Do you have a KDE developper account ?
If not, one Elisa developper can lend your patch. Let us know.
Comment 7 Mykola Krachkovsky 2018-05-24 12:14:53 UTC
(In reply to Matthieu Gallien from comment #6)
> Do you have a KDE developper account ?
> If not, one Elisa developper can lend your patch. Let us know.

Well, I'm registered in phabricator… and that's all.
Alexander Stippich have written at
https://phabricator.kde.org/D12889
about landing, but I don't think I can do that, am I wrong?
Comment 8 Matthieu Gallien 2018-05-24 15:15:56 UTC
Yes, ask him to push your patch. To do it yourself requires a KDE contributor account. This is different from a phabricator account.
Comment 9 Alexander Stippich 2018-05-24 18:13:14 UTC
Git commit dd84041481ee4ca39c6a416a87c543fb1d14157a by Alexander Stippich, on behalf of Mykola Krachkovsky.
Committed on 24/05/2018 at 18:13.
Pushed by astippich into branch 'master'.

Remove multiple usage of SQL parameter

Summary:
Patch removes multiple usage of SQL parameter in query. When parameter is used twice, I've got an
QSqlError("", "Parameter count mismatch", "")
in terminal and problem with albums and artists folders in UI.

I'm not sure this is Elisa bug, though, haven't found explicit statement that parameter should be used only once in either Qt or SQLite docs.

Reviewers: #elisa, mgallien

Reviewed By: #elisa, mgallien

Subscribers: astippich

Tags: #elisa

Differential Revision: https://phabricator.kde.org/D12889

M  +2    -2    src/databaseinterface.cpp

https://commits.kde.org/elisa/dd84041481ee4ca39c6a416a87c543fb1d14157a