Summary: | crashes if a file in the sqlcollection is replaced while Amarok is running | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Konrad Zemek <konrad.zemek> |
Component: | Collections/Local | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | matej, myriam, ralf-engels |
Priority: | NOR | ||
Version: | 2.7-git | ||
Target Milestone: | 2.8 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/amarok/b0121dbb0d7f72f7f78998e1c075d73d177ba8f1 | Version Fixed In: | 2.9 |
Sentry Crash Report: |
Description
Konrad Zemek
2013-08-04 12:42:02 UTC
Git commit b0121dbb0d7f72f7f78998e1c075d73d177ba8f1 by Matěj Laitl. Committed on 06/11/2013 at 15:10. Pushed by laitl into branch 'master'. SqlRegistry: fix assert fail in SqlScanResultProcessor by always returning the correct track What happened: 1. User has 1.mp3, copies it as 1.new.mp3 and edits some tags of 1.new.mp3. Both files do *not* have AFT tag embedded. 2. Amarok registers the new file. 3. Users restarts Amarok (needed to reproduce because of internal state) 4. User renames 1.new.mp3 back to 1.mp3 by overwriting it, Amarok catches it 5. Amarok does not associate new 1.mp3 with the old 1.mp3 because it finds previous 1.new.mp3 entry by uid (file hash) instead. 6. Amarok tries to remove entry for the old 1.mp3, but SqlRegistry::getTrack( int urlId ) erroneously returns the new entry 7. SqlScanResultProcessor correctly asserts out, refusing to delete the incorrect entry. The fix is to enhance SqlRegistry::getTrack( int urlId ) to double-check that it indeed returns the correct entry. Related: bug 322474 FIXED-IN: 2.9 BACKPORT M +2 -0 ChangeLog M +24 -10 src/core-impl/collections/db/sql/SqlRegistry.cpp http://commits.kde.org/amarok/b0121dbb0d7f72f7f78998e1c075d73d177ba8f1 > the other failed assert occurs after replaced song is played:
>
> amarok: BEGIN: void EngineController::slotFinished()
> amarok: [EngineController] Track finished completely, updating statistics
> amarok: [EngineController] slotTrackFinishedPlaying( "[no artist]" - "[no
> album]" - "1000 Words" , 1 )
> amarok: [WARNING] [SqlRegistry] updating uid to an already existing uid.
> amarok: [ERROR__] [MySqlStorage] "GREPME MySQL-server query failed! (1062)
> Duplicate entry '2-./run/media/konrad/KONDZIU'S/Music/Final Fantasy/Final
> Fantasy' for key 'urls_id_rpath' on INSERT INTO urls
> (deviceid,rpath,directory,uniqueid) VALUES
> (2,'./run/media/konrad/KONDZIU\'S/Music/Final Fantasy/Final Fantasy X-2
> Piano Collec/10 - 1000
> Words.mp3',105,'amarok-sqltrackuid://fa4c80d8a5da175c942d5c95f8ee5b3a');"
> amarok: [WARNING] [SqlRegistryP] Insert failed.
> ASSERT: "track->m_urlId > 0 && "refusing to write non-positive urlId to
> tracks table, please file a bug"" in file
> /home/konrad/kde/src/amarok/src/core-impl/collections/db/sql/SqlRegistry_p.
> cpp, line 270
I believe this second assert is just a consequence of the first one, but please test that it indeed isn't reproducible (and also that I really fixed the fist one, too).
Anyways, thanks for a very helpful bug report, Konrad, keep em' coming.
*** Bug 323471 has been marked as a duplicate of this bug. *** |