Bug 169602 - Make automatic incremental scanning work again
Summary: Make automatic incremental scanning work again
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.0-SVN
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords: release_blocker
: 174981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-22 19:23 UTC by Jeff Mitchell
Modified: 2009-12-09 11:28 UTC (History)
4 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 Jeff Mitchell 2008-08-22 19:23:18 UTC
Automatic incremental scans need to be working
Comment 1 Seb Ruiz 2008-09-07 06:53:35 UTC
Fix in rev 857958.
Comment 2 Mikko C. 2008-09-25 17:41:29 UTC
Not working for me anymore (it worked before).
I guess it could be related to the switch to mysqle?

I added 2 albums to the collection and here's the (initial) output when I click "Update Collection"

amarok: BEGIN: void CollectionManager::checkCollectionChanges()
amarok: BEGIN: void ScanManager::startIncrementalScan()
amarok: BEGIN: QStringList ScanManager::getDirsToScan() const
amarok: END__: QStringList ScanManager::getDirsToScan() const - Took 4.4s
amarok: BEGIN: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*)
amarok(9842) KDE::ProgressBar::ProgressBar: "      "
amarok:        p before:  QPoint(2,-15)
amarok:        p after:  QPoint(4,724)
amarok: BEGIN: KDE::ProgressBar& KDE::ProgressBar::setAbortSlot(QObject*, const char*)
amarok: END__: KDE::ProgressBar& KDE::ProgressBar::setAbortSlot(QObject*, const char*) - Took 0.00063s
amarok: END__: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*) - Took 0.0066s
amarok: BEGIN: virtual void XmlParseJob::run()
amarok: BEGIN: ScanResultProcessor::ScanResultProcessor(SqlCollection*)
amarok: END__: ScanResultProcessor::ScanResultProcessor(SqlCollection*) - Took 3.8e-05s
amarok: END__: void ScanManager::startIncrementalScan() - Took 4.4s
amarok: END__: void CollectionManager::checkCollectionChanges() - Took 4.4s
amarok: BEGIN: void DatabaseUpdater::createTemporaryTables()
amarok: END__: void DatabaseUpdater::createTemporaryTables() - Took 0.049s
amarok: BEGIN: void DatabaseUpdater::prepareTemporaryTables()
amarok: END__: void DatabaseUpdater::prepareTemporaryTables() - Took 2.6s

Maybe Amarok thinks it's an update, but it's not: it takes > 10 mins, just like a rescan.
Comment 3 Lydia Pintscher 2008-10-28 22:36:21 UTC
Mikko is this still not working with clean config?
Comment 4 Mikko C. 2008-10-29 11:39:46 UTC
Yes, I just tried with a clean profile.
And the behavior is the same as before: Amarok thinks it's an update (see above), but it's a full rescan.

There's one difference I noticed: when doing the first time full scan Amarok will print on the console every .m3u playlist it finds, but when doing an "update" it won't.
Comment 5 Mikko C. 2008-10-29 11:42:47 UTC
Actually, I'm surprised nobody else seems to have this??
Or maybe you don't notice because you don't have a big collection?
Comment 6 Mark Kretschmann 2008-10-29 12:27:39 UTC
No no Mikko, I'm seeing the same issue here: Update Collection basically does a full rescan. It takes exactly the same time.
Comment 7 Seb Ruiz 2008-10-29 12:29:17 UTC
And I'm seeing the opposite issue, where nothing gets scanned.
Comment 8 Lydia Pintscher 2008-10-30 12:56:13 UTC
Ok what are we going to do about this? It is marked as release blocker.
Comment 9 Mark Kretschmann 2008-10-30 14:05:58 UTC
I'm confident that we'll figure this out before 2.0 release. I'm ready to dedicate some of my time after beta 3 release.

For beta 3 I find it unrealistic that we'll be able to fix it, and I do not see this as a showstopper. I suggest moving the target to RC1.
Comment 10 Lydia Pintscher 2008-10-30 14:07:38 UTC
Ok agreed. Moving.
Comment 11 Mikko C. 2008-11-01 17:04:45 UTC
Dunno if it's related or it might help...
I was doing an "update" (rescan), then I decided to cancel it and clicked on the "Abort" button near the statusbar.

Here's the full output since I started the scan:

amarok: BEGIN: void CollectionManager::checkCollectionChanges()                                                             
amarok: BEGIN: void ScanManager::startIncrementalScan()                                                                     
amarok: BEGIN: QStringList ScanManager::getDirsToScan() const                                                               
amarok: END__: QStringList ScanManager::getDirsToScan() const - Took 3.9s                                                   
amarok:      GOING TO SCAN:                                                                                                 
amarok:           "/mnt/mybook/Mp3/"                                                                                        
amarok:           "/mnt/mybook/Mp3/B/"                                                                                      
amarok:           "/mnt/mybook/Mp3/B/Basil Poledouris - [1982] Conan The Barbarian OST/"                                    
amarok:           "/mnt/mybook/Mp3/J/"                                                                                      
amarok:           "/mnt/mybook/Mp3/M/"                                                                                      
amarok:           "/mnt/mybook/Mp3/V/"                                                                                      
amarok:           "/mnt/mybook/Mp3/V/Various Artists - [2004] Jazzanova ...Mixing/"                                         
amarok: BEGIN: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*)                                                       
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)                                                           
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 0.00033s                                           
amarok: BEGIN: void CompoundProgressBar::addProgressBar(ProgressBarNG*, QObject*)                                           
amarok:          setting fixed height:  27  *  1  =  31                                                                     
amarok:          p before:  QPoint(2,-32)                                                                                   
amarok:          p after:  QPoint(4,687)                                                                                    
amarok:          we now have  1  progress ops running                                                                       
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)                                                           
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 0.00017s                                           
amarok: END__: void CompoundProgressBar::addProgressBar(ProgressBarNG*, QObject*) - Took 0.002s                             
amarok: BEGIN: ProgressBarNG* ProgressBarNG::setAbortSlot(QObject*, const char*)                                            
amarok:          Setting abort slot for  "Scanning music"                                                                   
amarok:          connecting to  1deleteLater()                                                                              
amarok: END__: ProgressBarNG* ProgressBarNG::setAbortSlot(QObject*, const char*) - Took 0.00041s                            
amarok: END__: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*) - Took 0.0061s                                        
amarok: END__: void ScanManager::startIncrementalScan() - Took 3.9s                                                         
amarok: END__: void CollectionManager::checkCollectionChanges() - Took 3.9s                                                 
amarok: BEGIN: virtual void XmlParseJob::run()                                                                              
amarok: BEGIN: ScanResultProcessor::ScanResultProcessor(SqlCollection*)                                                     
amarok: END__: ScanResultProcessor::ScanResultProcessor(SqlCollection*) - Took 6.5e-05s                                     
amarok: BEGIN: void DatabaseUpdater::createTemporaryTables()                                                                
amarok:      [ERROR!] GREPME MySQLe query failed! Specified key was too long; max key length is 1000 bytes  on  "CREATE UNIQUE INDEX urls_id_rpath_temp ON urls_temp(deviceid, rpath);"                                                                 
amarok: END__: void DatabaseUpdater::createTemporaryTables() - Took 0.17s                                                   
amarok: BEGIN: void DatabaseUpdater::prepareTemporaryTables()                                                               
amarok: END__: void DatabaseUpdater::prepareTemporaryTables() - Took 2.2s


-----> I clicked ABORT HERE <-----


amarok(29149)/kdecore (KWin) KWindowInfo::geometry: Pass NET::WMDesktop to KWindowInfo                                      

amarok(29149)/kdecore (KWin) KWindowInfo::geometry: Pass NET::WMDesktop to KWindowInfo 

amarok(29149)/kdecore (KWin) KWindowInfo::geometry: Pass NET::WMDesktop to KWindowInfo 

amarok: BEGIN: void CompoundProgressBar::cancelAll() 
amarok: BEGIN: void ProgressBarNG::cancel()          
amarok:        cancelling operation:  "Scanning music" 
amarok: BEGIN: void CompoundProgressBar::childBarCancelled(ProgressBarNG*) 
amarok:          p before:  QPoint(2,-9)                                   
amarok:          p after:  QPoint(4,710)                                   
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)          
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 5e-05s 
amarok: BEGIN: void StatusBar::hideProgress()                                   
amarok: END__: void StatusBar::hideProgress() - Took 0.00019s                   
amarok: END__: void CompoundProgressBar::childBarCancelled(ProgressBarNG*) - Took 0.00061s 
amarok: END__: void ProgressBarNG::cancel() - Took 0.00072s                                
amarok: END__: void CompoundProgressBar::cancelAll() - Took 0.00082s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.9e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 3e-05s                         
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.7e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.6e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()                                       
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.7e-05s                       
amarok: BEGIN: void CompoundProgressBar::cancelAll()
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s
amarok: BEGIN: void CompoundProgressBar::cancelAll()
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s
amarok: BEGIN: void CompoundProgressBar::cancelAll()
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s
amarok: BEGIN: void CompoundProgressBar::cancelAll()
amarok: END__: void CompoundProgressBar::cancelAll() - Took 2.8e-05s
amarok: BEGIN: virtual ScanManager::~ScanManager()
amarok: BEGIN: virtual void XmlParseJob::requestAbort()
amarok: END__: virtual void XmlParseJob::requestAbort() - Took 3.4e-05s
amarok:      do-while done with error
amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables()
amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.0049s
amarok: BEGIN: virtual ScanResultProcessor::~ScanResultProcessor()
amarok: END__: virtual ScanResultProcessor::~ScanResultProcessor() - Took 3e-05s
amarok: END__: virtual void XmlParseJob::run() - Took 1.1e+02s
amarok: BEGIN: virtual XmlParseJob::~XmlParseJob()
amarok: END__: virtual XmlParseJob::~XmlParseJob() - Took 0.0002s
amarok: END__: virtual ScanManager::~ScanManager() - Took 0.1s
QProcess: Destroyed while process is still running.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = amarok path = <unknown> pid = 29149
sock_file=/home/mikko/.kde/socket-gentoo/kdeinit4__0
abort: audio_alsa_out.c:824: ao_alsa_write: Aborting

Backtrace:

Thread 1 (Thread 0x7f66c6f37710 (LWP 29149)):
[KCrash Handler]
#5  0x00007f66b2e5368d in ScanManager::isDirInCollection (this=0x22ae630, path=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 32215}, alloc = 0, size = 0, data = 0x7f66c6d5f7ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 854}, alloc = 0, size = 0, data = 0x7f66c6d5f7da, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffcef77500, static codecForCStrings = 0x1f60740}) at /home/mikko/amarok/src/collection/sqlcollection/ScanManager.cpp:179
#6  0x00007f66b2e5e20d in SqlCollection::isDirInCollection (this=0x227ce60, path=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 32215}, alloc = 0, size = 0, data = 0x7f66c6d5f7ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 854}, alloc = 0, size = 0, data = 0x7f66c6d5f7da, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x7fffcef77540, static codecForCStrings = 0x1f60740}) at /home/mikko/amarok/src/collection/sqlcollection/SqlCollection.cpp:173
#7  0x00007f66b2e5eee4 in SqlCollectionDBusHandler::isDirInCollection (this=0x4779030, path=@0x46e75d0) at /home/mikko/amarok/src/collection/sqlcollection/SqlCollectionDBusHandler.cpp:37
#8  0x00007f66b2e87f1d in SqlCollectionAdaptor::isDirInCollection (this=0x4552f60, in0=@0x46e75d0) at /home/mikko/amarok/build/src/collection/sqlcollection/SqlCollectionAdaptor.cpp:39
#9  0x00007f66b2e87f7e in SqlCollectionAdaptor::qt_metacall (this=0x4552f60, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffcef77680)
    at /home/mikko/amarok/build/src/collection/sqlcollection/SqlCollectionAdaptor.moc:76
#10 0x00007f66c61b7713 in QDBusConnectionPrivate::deliverCall (this=0x1f67d50, object=0x4552f60, msg=@0x4935430, metaTypes=@0x4294920, slotIdx=4) at qdbusintegrator.cpp:855
#11 0x00007f66c61b8b28 in QDBusConnectionPrivate::activateCall (this=0x1f67d50, object=0x4552f60, flags=273, msg=@0x4935430) at qdbusintegrator.cpp:767
#12 0x00007f66c61b9062 in QDBusConnectionPrivate::activateObject (this=0x1f67d50, node=@0x4935408, msg=@0x4935430, pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1281
#13 0x00007f66c61b9448 in QDBusActivateObjectEvent::placeMetaCall (this=0x49353c0) at qdbusintegrator.cpp:1406
#14 0x00007f66c6a846dd in QObject::event (this=0x4779030, e=0x49353c0) at kernel/qobject.cpp:1152
#15 0x00007f66bc4336ad in QApplicationPrivate::notify_helper (this=0x1f6fe40, receiver=0x4779030, e=0x49353c0) at kernel/qapplication.cpp:3809
#16 0x00007f66bc43a68e in QApplication::notify (this=0x7fffcef78700, receiver=0x4779030, e=0x49353c0) at kernel/qapplication.cpp:3774
#17 0x00007f66c488dbdb in KApplication::notify () from /usr/kde/svn/lib64/libkdeui.so.5
#18 0x00007f66c6a74380 in QCoreApplication::notifyInternal (this=0x7fffcef78700, receiver=0x4779030, event=0x49353c0) at kernel/qcoreapplication.cpp:593
#19 0x00007f66c6a752ab in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1f40780) at kernel/qcoreapplication.h:215
#20 0x00007f66bc4c9524 in QEventDispatcherX11::processEvents (this=0x1f6e690, flags={i = -822639072}) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#21 0x00007f66c6a72f32 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -822639024}) at kernel/qeventloop.cpp:149
#22 0x00007f66c6a730bd in QEventLoop::exec (this=0x7fffcef78690, flags={i = -822638944}) at kernel/qeventloop.cpp:200
#23 0x00007f66c6a755bd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#24 0x0000000000403a67 in main (argc=1, argv=0x7fffcef798c8) at /home/mikko/amarok/src/main.cpp:128
Comment 12 Mikko C. 2008-11-03 09:10:03 UTC
After this commit (I guess) http://websvn.kde.org/?view=rev&sortby=date&revision=879232
there's no more full rescan, but there's no incremental scan either.
Here's the output when clicking "update collection":

amarok: BEGIN: void CollectionManager::checkCollectionChanges() 
amarok: BEGIN: void ScanManager::startIncrementalScan()                          
amarok: BEGIN: QStringList ScanManager::getDirsToScan() const                    
amarok: END__: QStringList ScanManager::getDirsToScan() const - Took 0.1s        
amarok:      GOING TO SCAN:                                                      
amarok:           "/mnt/mybook/Mp3/"                                             
amarok:           "/mnt/mybook/Mp3/B/"                                           
amarok:           "/mnt/mybook/Mp3/B/Basil Poledouris - [1982] Conan The Barbarian OST/" 
amarok:           "/mnt/mybook/Mp3/B/Black Sabbath - [1970]  Paranoid/"                  
amarok:           "/mnt/mybook/Mp3/F/"                                                   
amarok:           "/mnt/mybook/Mp3/I/"
amarok:           "/mnt/mybook/Mp3/I/Iron Maiden - [1998] A Real Live Dead One/"
amarok:           "/mnt/mybook/Mp3/I/Iron Maiden - [1998] A Real Live Dead One/CD1/"
amarok:           "/mnt/mybook/Mp3/I/Iron Maiden - [1998] A Real Live Dead One/CD2/"
amarok:           "/mnt/mybook/Mp3/V/Various Artists - [2004] Jazzanova ...Mixing/"
amarok: BEGIN: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*)
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 5.8e-05s
amarok: BEGIN: void CompoundProgressBar::addProgressBar(ProgressBarNG*, QObject*)
amarok:          setting fixed height:  27  *  1  =  31
amarok:          p before:  QPoint(2,-32)
amarok:          p after:  QPoint(4,687)
amarok:          we now have  1  progress ops running
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 6.3e-05s
amarok: END__: void CompoundProgressBar::addProgressBar(ProgressBarNG*, QObject*) - Took 0.00074s
amarok: BEGIN: ProgressBarNG* ProgressBarNG::setAbortSlot(QObject*, const char*)
amarok:          Setting abort slot for  "Scanning music"
amarok:          connecting to  1deleteLater()
amarok: END__: ProgressBarNG* ProgressBarNG::setAbortSlot(QObject*, const char*) - Took 0.00012s
amarok: END__: XmlParseJob::XmlParseJob(ScanManager*, SqlCollection*) - Took 0.0022s
amarok: END__: void ScanManager::startIncrementalScan() - Took 0.11s
amarok: END__: void CollectionManager::checkCollectionChanges() - Took 0.11s
amarok: BEGIN: virtual void XmlParseJob::run()
amarok: BEGIN: ScanResultProcessor::ScanResultProcessor(SqlCollection*)
amarok: END__: ScanResultProcessor::ScanResultProcessor(SqlCollection*) - Took 3.3e-05s
amarok: BEGIN: void ScanManager::slotError(QProcess::ProcessError)
amarok: END__: void ScanManager::slotError(QProcess::ProcessError) - Took 5.8e-05s


Statusbar is stuck at 100%

Clicking "update collection" again produces this:

amarok: BEGIN: void CollectionManager::checkCollectionChanges()
amarok: BEGIN: void ScanManager::startIncrementalScan()
amarok:        scanner already running
amarok: END__: void ScanManager::startIncrementalScan() - Took 0.00011s
amarok: END__: void CollectionManager::checkCollectionChanges() - Took 0.00031s
Comment 13 Mikko C. 2008-11-03 12:58:17 UTC
Ignore my above comment, it was fixed by: http://websvn.kde.org/?view=rev&sortby=date&revision=879424
Comment 14 Seb Ruiz 2008-11-12 22:26:33 UTC
*** Bug 174981 has been marked as a duplicate of this bug. ***
Comment 15 Leo Franchi 2008-11-20 17:37:12 UTC
fixed in svn r886930.