This forum has been archived. All content is frozen. Please use KDE Discuss instead.

scan collection hangs

Tags: None
(comma "," separated)
mattydee
Registered Member
Posts
34
Karma
0
OS

scan collection hangs

Sun Nov 15, 2009 10:07 pm
Amarok hangs at 87% (or close to) when scanning my music folder. Songbird, Amarok 1, and Rhythmbox all scan properly. What gives?

amarokcollectionscanner -r works fine.
mattydee
Registered Member
Posts
34
Karma
0
OS

Re: scan collection hangs

Sun Nov 15, 2009 10:15 pm
Running amarok --debug shows a bunch of MySQL duplicate entry errors for certain albums and genres.
I'm letting it run now to see if it will finish... will post relevant output.
mattydee
Registered Member
Posts
34
Karma
0
OS

Re: scan collection hangs

Mon Nov 16, 2009 12:41 am
Here is part of the output from amarok --debug

Code: Select all
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Stranger Than Fiction-33' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 33, 'Stranger Than Fiction');"                                                                                                       
amarok:   BEGIN: InfoProxy::InfoProxy()                                                                 
amarok:     BEGIN: void InfoProxy::loadHomePage()                                                       
amarok:     END__: void InfoProxy::loadHomePage() - Took 0.0011s                                       
amarok:   END__: InfoProxy::InfoProxy() - Took 0.0017s                                                 
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00027s                               
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00034s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'She's in control-86' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 86, 'She\'s in control');"       
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'jazz' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('jazz');"                                                       
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'LIVE IN PARIS-30' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 30, 'LIVE IN PARIS');"               
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00033s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'trance' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('trance');"                                                   
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Let It Die-150' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 150, 'Let It Die');"                   
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'rock' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('rock');"                                                       
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00033s                               
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.0003s                               
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00027s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'bleach-318' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 318, 'bleach');"                           
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'METAL' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('METAL');"                                                     
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Unplugged in New York-318' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 318, 'Unplugged in New York');"                                                                                                     
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00036s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'How To Clean Everything-350' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 350, 'How To Clean Everything');"                                                                                                 
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Fear Of A Black Planet-351' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 351, 'Fear Of A Black Planet');"                                                                                                   
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00027s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Genre' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('Genre');"                                                     
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00029s                               
amarok:   BEGIN: void ScanManager::startIncrementalScan()                                               
amarok:      scanner already running                                                                   
amarok:   END__: void ScanManager::startIncrementalScan() - Took 0.00034s                               
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'pop' for key 'genres_temp_name'  on  "INSERT INTO genres_temp( name ) VALUES ('pop');"                                                         
amarok:    [ERROR!] GREPME MySQL query failed! Duplicate entry 'Playmate of the Year-488' for key 'albums_temp_name_artist'  on  "INSERT INTO albums_temp( artist, name ) VALUES ( 488, 'Playmate of the Year');"           
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: scan collection hangs

Mon Nov 16, 2009 10:01 am
What exact version of Amarok are you talking about?


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
mattydee
Registered Member
Posts
34
Karma
0
OS

Re: scan collection hangs

Mon Nov 16, 2009 10:04 am
Amarok version: 2.2.0
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: scan collection hangs

Mon Nov 16, 2009 12:28 pm
This is most likely fixed in Amarok 2.2.1, to be released today.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
mattydee
Registered Member
Posts
34
Karma
0
OS

Re: scan collection hangs

Mon Nov 16, 2009 10:46 pm
Mamarok wrote:This is most likely fixed in Amarok 2.2.1, to be released today.


Indeed! Finally, this is the first release of Amarok 2 that I can actually use!
mattydee
Registered Member
Posts
34
Karma
0
OS

Re: scan collection hangs

Mon Nov 16, 2009 11:39 pm
Spoke too soon of course... All the songs I add to my iPod with Amarok are copied over with length 60:00:00 or higher. I guess I should wait till 2.2.2?
pugacioff
Registered Member
Posts
3
Karma
0
OS

Re: scan collection hangs

Wed Nov 25, 2009 6:49 pm
similar problem here, amarok crashes before the scan finishes (~70% for me)
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: scan collection hangs

Wed Nov 25, 2009 8:41 pm
pugacioff wrote:similar problem here, amarok crashes before the scan finishes (~70% for me)
Could you please start Amarok in a konsole with the option
Code: Select all
amarok -d --nofork
and check which tracks it is choking on? Assuming you talk about current Amarok 2.2.1 of course.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
pugacioff
Registered Member
Posts
3
Karma
0
OS

Re: scan collection hangs

Wed Nov 25, 2009 9:42 pm
yes, it's 2.2.1 on kubuntu 9.10

the last lines are:
Code: Select all
amarok:   BEGIN: void ScanResultProcessor::processDirectory(const QList<QMap<QString, QVariant> >&)
amarok:     BEGIN: void ScanResultProcessor::setupDatabase()
amarok:     END__: void ScanResultProcessor::setupDatabase() - Took 6.1e-05s
amarok:   END__: void ScanResultProcessor::processDirectory(const QList<QMap<QString, QVariant> >&) - Took 0.028s
amarok:   BEGIN: bool PlaylistManager::import(const QString&)                       
amarok:     BEGIN: virtual bool PlaylistFileProvider::import(const KUrl&)     
amarok:        Importing playlist file  KUrl("")                               
amarok:       BEGIN: void ProgressBar::setDescription(const QString&)       
amarok:       END__: void ProgressBar::setDescription(const QString&) - Took 0.00029s
amarok:       BEGIN: void CompoundProgressBar::addProgressBar(ProgressBar*, QObject*)
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
...
lots of identical lines
...
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
Segmentation fault


I forgot to mention that the process amarokcollectionscanner survives to amarok, but if I let it run, and then restart amarok, no collection is present
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: scan collection hangs

Thu Nov 26, 2009 7:47 am
pugacioff wrote:yes, it's 2.2.1 on kubuntu 9.10

the last lines are:
Code: Select all
amarok:   BEGIN: void ScanResultProcessor::processDirectory(const QList<QMap<QString, QVariant> >&)
amarok:     BEGIN: void ScanResultProcessor::setupDatabase()
amarok:     END__: void ScanResultProcessor::setupDatabase() - Took 6.1e-05s
amarok:   END__: void ScanResultProcessor::processDirectory(const QList<QMap<QString, QVariant> >&) - Took 0.028s
amarok:   BEGIN: bool PlaylistManager::import(const QString&)                       
amarok:     BEGIN: virtual bool PlaylistFileProvider::import(const KUrl&)     
amarok:        Importing playlist file  KUrl("")                               
amarok:       BEGIN: void ProgressBar::setDescription(const QString&)       
amarok:       END__: void ProgressBar::setDescription(const QString&) - Took 0.00029s
amarok:       BEGIN: void CompoundProgressBar::addProgressBar(ProgressBar*, QObject*)
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
...
lots of identical lines
...
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
Segmentation fault


I forgot to mention that the process amarokcollectionscanner survives to amarok, but if I let it run, and then restart amarok, no collection is present

Looks like it's **** out while loading some playlists. Do this (backup first!):

Code: Select all
rm -rf ~/.kde/share/apps/amarok
rm -rf ~/.kde/share/config/amarok*


--
Mark Kretschmann - Amarok Developer
pugacioff
Registered Member
Posts
3
Karma
0
OS

Re: scan collection hangs  Topic is solved

Fri Nov 27, 2009 10:05 pm
markey wrote:Looks like it's **** out while loading some playlists.

This. I found the .m3u file that screwed up everything and I deleted it, then the scan worked. Thank you! :)
algarues
Registered Member
Posts
54
Karma
0
OS

Re: scan collection hangs

Sun Jan 17, 2010 12:14 am
pugacioff wrote:
markey wrote:Looks like it's **** out while loading some playlists.

This. I found the .m3u file that screwed up everything and I deleted it, then the scan worked. Thank you! :)


I had the same problem, then after deleting all the m3u files from my music collection amarok would be able to scan beyon 77% to crash at 98% of scanning

the last lines of debug that I have are below

amarok: BEGIN: void DatabaseUpdater::cleanPermanentTables()
amarok: BEGIN: void ScanManager::slotFinished()
amarok: END__: void ScanManager::slotFinished() - Took 0.00012s
amarok: END__: void DatabaseUpdater::cleanPermanentTables() - Took 0.033s
amarok: BEGIN: void ScanResultProcessor::copyHashesToTempTables()
amarok: obtained max_allowed_packet is "1048576"
amarok: urls key size is 6315
amarok: tracks key size is 6297
amarok: END__: void ScanResultProcessor::copyHashesToTempTables() - Took 0.94s
amarok: temp_tracks: ("6297")
amarok: tracks before commit: ("0")
amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables()
amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.53s
amarok: tracks after commit: ("6297")
amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables()
amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate()
amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 0.00011s
amarok: Initialized thread, count== 4
amarok: Initialized thread, count== 5
amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.049s
amarok: BEGIN: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*)
amarok: END__: CollectionTreeItem::CollectionTreeItem(const Meta::DataList&, CollectionTreeItem*, CollectionTreeItemModelBase*) - Took 0.00011s
amarok: Sending changed signal
amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate()
amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 4.8e-05s
KCrash: Application 'amarok' crashing...
sock_file=/home/alessandro/.kde4/socket-x1-6-00-50-bf-08-4a-65/kdeinit4__0
QSocketNotifier: Invalid socket 45 and type 'Read', disabling...

On suse 11.2, the earlier version of amarok that comes with the distro dvd works perfectly
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: scan collection hangs

Sun Jan 17, 2010 10:06 am
algarues wrote:Looks like it's amarok: BEGIN: virtual void Dynamic::BiasedPlaylist::invalidate()
amarok: END__: virtual void Dynamic::BiasedPlaylist::invalidate() - Took 4.8e-05s
KCrash: Application 'amarok' crashing...
sock_file=/home/alessandro/.kde4/socket-x1-6-00-50-bf-08-4a-65/kdeinit4__0
QSocketNotifier: Invalid socket 45 and type 'Read', disabling...

That's a known bug in the "Bias" code, it should be fixed in Git Master (to become Amarok 2.2.3).

What you could do to fix this particular problem: Try to find the one file that is causing the crash, and remove it. In this file you can find the last song that the scanner tried to process:

Code: Select all
~/.kde/share/apps/amarok/collection_scan.log


--
Mark Kretschmann - Amarok Developer


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]