Summary: | Mass tagging slow, eventually crash | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | skrald <skrald> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | mdhowe, rolandg |
Priority: | NOR | ||
Version: | 1.2-CVS | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | gdb output |
Description
skrald
2004-12-17 17:20:51 UTC
tag-writing speed is taglib-dependent. Taglib can take some time to write tags, depending on the file, but I should add taglib is the best and fastest tagging library there is. The crash is almost certainly taglib's fault. A backtrace would reveal whether this is the case. Whatever I can't fix anything without a bt. Thanks. >
>
> ------- Additional Comments From max.howell methylblue com 2004-12-24 03:04 -------
> tag-writing speed is taglib-dependent. Taglib can take some time to write tags, depending on the file, but I should add taglib is the best and fastest tagging library there is.
>
> The crash is almost certainly taglib's fault. A backtrace would reveal whether this is the case. Whatever I can't fix anything without a bt. Thanks.
>
>
May be you shold consider adding progress bar during tag writing.
Updating 40 or more tags is quite time consuming, and during this
process amaroK UI freezes and it may be annoying for some users.
I observed that this extreme long tag writing is connected to one type
of mp3 file : mp3 without any tags !
If tag is present in mp3 file, tags are updated very quicly !
I witnessed the same kind of behaviour on amarok 1.2-beta3 (and the crash already happened in previous versions). I noticed also that the crash can happen when only one tag is being updated. Yet, I didn't notice the bug in Juk so I wonder if taglib can still be suspected. I have tried to make a backtrace, but it's my first time so I don't know if it's a valid one. Anyway, I join the gdb output, and hope it can be of any help. If it can't could you redirect me to some documentation where I could learn how to make it, because that bugs is really annoying meand I wish I could help you get rid of it. Created attachment 8994 [details]
gdb output
*** This bug has been marked as a duplicate of 94045 *** *** Bug 97502 has been marked as a duplicate of this bug. *** closed wrong report, sry *** Bug 94045 has been marked as a duplicate of this bug. *** CVS commit by markey: FIX: Frequent crashes when writing tags. Problem was, the TagWriter thread was calling CollectionDB::updateTags(), which was directly calling CollectionView::renderView(), still in the thread context. I changed it so the GUI operation is decoupled from the thread. Please test. BUG: 95344 CCMAIL: patrol@sinus.cz M +1 -0 ChangeLog 1.465 M +33 -28 src/collectionbrowser.cpp 1.292 M +3 -2 src/collectionbrowser.h 1.121 M +5 -2 src/collectiondb.cpp 1.273 --- kdeextragear-1/amarok/ChangeLog #1.464:1.465 @@ -5,4 +5,5 @@ VERSION 1.2-beta4: + FIX: Frequent crashes when writing tags. (BR 95344) FIX: CoverManager updates its status display correctly. FIX: "isPlaying" DCOP function now works correctly. (BR 90894) --- kdeextragear-1/amarok/src/collectionbrowser.cpp #1.291:1.292 @@ -233,36 +233,10 @@ CollectionView::~CollectionView() { } + ////////////////////////////////////////////////////////////////////////////////////////// -// private slots +// public slots ////////////////////////////////////////////////////////////////////////////////////////// void -CollectionView::setupDirs() //SLOT -{ - KDialogBase dialog( this, 0, false ); - kapp->setTopWidget( &dialog ); - dialog.setCaption( kapp->makeStdCaption( i18n("Configure Collection") ) ); - - CollectionSetup *setup = new CollectionSetup( &dialog ); - dialog.setMainWidget( setup ); - dialog.showButtonApply( false ); - dialog.adjustSize(); - // Make the dialog a bit wider, default is too narrow to be useful - dialog.resize( dialog.width() + 50, dialog.height() ); - - if ( dialog.exec() != QDialog::Rejected ) - { - const bool rescan = ( AmarokConfig::collectionFolders() != setup->dirs() ); - setup->writeConfig(); - - if ( rescan ) - CollectionDB::instance()->startScan(); - - m_parent->m_scanAction->setEnabled( !AmarokConfig::monitorChanges() ); - } -} - - -void CollectionView::renderView() //SLOT { @@ -404,4 +378,35 @@ CollectionView::renderView() //SLOT +////////////////////////////////////////////////////////////////////////////////////////// +// private slots +////////////////////////////////////////////////////////////////////////////////////////// + +void +CollectionView::setupDirs() //SLOT +{ + KDialogBase dialog( this, 0, false ); + kapp->setTopWidget( &dialog ); + dialog.setCaption( kapp->makeStdCaption( i18n("Configure Collection") ) ); + + CollectionSetup *setup = new CollectionSetup( &dialog ); + dialog.setMainWidget( setup ); + dialog.showButtonApply( false ); + dialog.adjustSize(); + // Make the dialog a bit wider, default is too narrow to be useful + dialog.resize( dialog.width() + 50, dialog.height() ); + + if ( dialog.exec() != QDialog::Rejected ) + { + const bool rescan = ( AmarokConfig::collectionFolders() != setup->dirs() ); + setup->writeConfig(); + + if ( rescan ) + CollectionDB::instance()->startScan(); + + m_parent->m_scanAction->setEnabled( !AmarokConfig::monitorChanges() ); + } +} + + void CollectionView::scanStarted() // SLOT --- kdeextragear-1/amarok/src/collectionbrowser.h #1.120:1.121 @@ -89,6 +89,4 @@ class CollectionView : public KListView static CollectionView* instance() { return m_instance; } - /** Rebuilds and displays the treeview by querying the database. */ - void renderView(); void setFilter( const QString &filter ) { m_filter = filter; } QString filter() { return m_filter; } @@ -96,4 +94,7 @@ class CollectionView : public KListView public slots: + /** Rebuilds and displays the treeview by querying the database. */ + void renderView(); + void setTreeMode() { setViewMode( modeTreeView ); }; void setFlatMode() { setViewMode( modeFlatView ); }; --- kdeextragear-1/amarok/src/collectiondb.cpp #1.272:1.273 @@ -24,4 +24,5 @@ #include <qfile.h> #include <qimage.h> +#include <qtimer.h> #include <kapplication.h> @@ -1357,6 +1358,8 @@ CollectionDB::updateTags( const QString } - if ( updateView ) //update the collection browser - CollectionView::instance()->renderView(); + // Update the Collection-Browser view, + // using QTimer to make sure we don't manipulate the GUI from a thread + if ( updateView ) + QTimer::singleShot( 0, CollectionView::instance(), SLOT( renderView() ) ); } |