Summary: | Amarok Crashes on fetching cover [@ CoverFetcher::finish] | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Rohan Garg <rohan> |
Component: | Tools/Cover Manager | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | crashing, dmytro.av, fergal.mullally, gary4gar, jonny.privateproperty, jonoubu, juergen.grove, miglio.paola, mrnatcho, rohan, russell.d.bryant, stuffcorpse, stummi3108, troptor, underline, willem010, xpubuntu |
Priority: | NOR | ||
Version: | 2.3-GIT | ||
Target Milestone: | 2.3.1 | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.3.1 | |
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Rohan Garg
2010-03-10 17:00:34 UTC
Created attachment 41506 [details]
New crash information added by DrKonqi
Same crash a few moments later,just trying to confirm this issue with other tracks,it crashes on fetching the cover via the internet
Backtrace from Comment #1: Thread 1 (Thread 0x7f0001e8f820 (LWP 12774)): [KCrash Handler] #5 0x00007efffed814b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #6 0x00007efffed84f50 in *__GI_abort () at abort.c:92 #7 0x00007effff655864 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2250 #8 0x00007effff655a42 in qt_message (msgType=QtFatalMsg, msg=0x7effff7b2f08 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff8b1268f0) at global/qglobal.cpp:2296 #9 0x00007effff655bf5 in qFatal (msg=0x31e6 <Address 0x31e6 out of bounds>) at global/qglobal.cpp:2479 #10 0x00007f0000d5a0f4 in KSharedPtr<Meta::Album>::operator-> (this=0x7fff8b126a90) at /usr/include/ksharedptr.h:126 #11 0x00007f00011a4d0c in CoverFetcher::finish (this=0x37595c0, unit=..., state=CoverFetcher::Success, message=...) at /home/shadeslayer/unstable/Git/amarok/src/covermanager/CoverFetcher.cpp:254 #12 0x00007f00011a4941 in CoverFetcher::showCover (this=0x37595c0, unit=...) at /home/shadeslayer/unstable/Git/amarok/src/covermanager/CoverFetcher.cpp:221 #13 0x00007f00011a4506 in CoverFetcher::slotResult (this=0x37595c0, job=0x2b57440) at /home/shadeslayer/unstable/Git/amarok/src/covermanager/CoverFetcher.cpp:191 #14 0x00007f00011a532c in CoverFetcher::qt_metacall (this=0x37595c0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff8b126e80) at /home/shadeslayer/unstable/Git/amarok/build/src/CoverFetcher.moc:83 #15 0x00007effff764c0f in QMetaObject::activate (sender=0x2b57440, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293 #16 0x00007effffb6ada2 in KJob::result (this=0x31e6, _t1=0x2b57440) at ./kjob.moc:194 #17 0x00007effffb6b040 in KJob::emitResult (this=0x2b57440) at ../../kdecore/jobs/kjob.cpp:312 #18 0x00007efff8e1b853 in KIO::SimpleJob::slotFinished (this=0x2b57440) at ../../kio/kio/job.cpp:486 #19 0x00007efff8e1c217 in KIO::TransferJob::slotFinished (this=0x2b57440) at ../../kio/kio/job.cpp:1058 #20 0x00007efff8e1a191 in KIO::TransferJob::qt_metacall (this=0x2b57440, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8b1272b0) at ./jobclasses.moc:367 #21 0x00007efff8e1a440 in KIO::StoredTransferJob::qt_metacall (this=0x31e6, _c=12774, _id=6, _a=0xffffffffffffffff) at ./jobclasses.moc:477 #22 0x00007effff764c0f in QMetaObject::activate (sender=0x3002050, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293 #23 0x00007efff8edaa91 in KIO::SlaveInterface::dispatch (this=0x3002050, _cmd=104, rawdata=...) at ../../kio/kio/slaveinterface.cpp:175 #24 0x00007efff8ed7e03 in KIO::SlaveInterface::dispatch (this=0x3002050) at ../../kio/kio/slaveinterface.cpp:91 #25 0x00007efff8ecc166 in KIO::Slave::gotInput (this=0x3002050) at ../../kio/kio/slave.cpp:324 #26 0x00007efff8ecc34c in KIO::Slave::qt_metacall (this=0x3002050, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8b1276d0) at ./slave.moc:82 #27 0x00007effff764c0f in QMetaObject::activate (sender=0x2060780, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293 #28 0x00007efff8deaad7 in KIO::ConnectionPrivate::dequeue (this=0x2da1be0) at ../../kio/kio/connection.cpp:82 #29 0x00007efff8deabfd in KIO::Connection::qt_metacall (this=0x2060780, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x360e150) at ./connection.moc:79 #30 0x00007effff761b49 in QObject::event (this=0x2060780, e=0x3707e90) at kernel/qobject.cpp:1248 #31 0x00007f00000cd12c in QApplicationPrivate::notify_helper (this=0x1f1a0c0, receiver=0x2060780, e=0x3707e90) at kernel/qapplication.cpp:4300 #32 0x00007f00000d371b in QApplication::notify (this=0x7fff8b128180, receiver=0x2060780, e=0x3707e90) at kernel/qapplication.cpp:4183 #33 0x00007f000115a45c in App::notify (this=0x7fff8b128180, receiver=0x2060780, event=0x3707e90) at /home/shadeslayer/unstable/Git/amarok/src/App.cpp:917 #34 0x00007effff751e0c in QCoreApplication::notifyInternal (this=0x7fff8b128180, receiver=0x2060780, event=0x3707e90) at kernel/qcoreapplication.cpp:704 #35 0x00007effff754587 in QCoreApplication::sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x1dca470) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #36 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x1dca470) at kernel/qcoreapplication.cpp:1345 #37 0x00007effff77b7f3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220 #38 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276 #39 0x00007efff831dbce in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #40 0x00007efff8321598 in ?? () from /lib/libglib-2.0.so.0 #41 0x00007efff83216c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0 #42 0x00007effff77b333 in QEventDispatcherGlib::processEvents (this=0x1dc9bc0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #43 0x00007f000017cf0e in QGuiEventDispatcherGlib::processEvents (this=0x31e6, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #44 0x00007effff750732 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #45 0x00007effff750b0c in QEventLoop::exec (this=0x7fff8b128120, flags=) at kernel/qeventloop.cpp:201 #46 0x00007effff75484b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #47 0x000000000040afc1 in main (argc=1, argv=0x7fff8b12a0d8) at /home/shadeslayer/unstable/Git/amarok/src/main.cpp:237 The current source language is "auto; currently c". *** Bug 230487 has been marked as a duplicate of this bug. *** Ok I believe I've fixed the crash. It's in my local branch and not pushed yet. I have lots of cover fetcher changes (mostly UI) coming up later which will include this fix. I'll update this BR when I merge it. Setting target: Rick, since we are not in string and feature freeze anymore on git ... :) commit f1456bc2a9e158e2c318b2f1003cfea2b28ad0a6 Author: Rick W. Chen <stuffcorpse@archlinux.us> Date: Thu Mar 11 23:50:47 2010 +1300 cover fetcher: remove pending manual jobs if cover found dialog is closed When entering a custom query for covers in the cover found dialog, the user may cancel or close the dialog before all the results are fetched. This causes the dialog to reappear with the newly fetched covers, which is annoying. Furthermore, covers retrieved from custom queries aren't associated with any album for these newly created dialogs (because such queries should only be available when a dialog has already been created from an album). So crashing is ensured if a cover is chosen from this new dialog. Making sure the dialog does not reappear solves this. BUG: 230215 diff --git a/src/covermanager/CoverFetcher.cpp b/src/covermanager/CoverFetcher.cpp index 8a77024..6a50d46 100644 --- a/src/covermanager/CoverFetcher.cpp +++ b/src/covermanager/CoverFetcher.cpp @@ -109,6 +109,10 @@ void CoverFetcher::slotFetch( const CoverFetchUnit::Ptr unit ) { DEBUG_BLOCK + + if( !unit ) + return; + const CoverFetchPayload *payload = unit->payload(); const KUrl::List urls = payload->urls(); @@ -150,6 +154,9 @@ CoverFetcher::slotResult( KJob *job ) DEBUG_BLOCK const CoverFetchUnit::Ptr unit( m_jobs.take( job ) ); + if( !unit ) + return; + if( job && job->error() ) { finish( unit, Error, i18n( "There was an error communicating with last.fm." ) ); @@ -202,17 +209,55 @@ CoverFetcher::slotResult( KJob *job ) } void +CoverFetcher::slotDialogFinished() +{ + /* + * Remove all manual fetch jobs from the queue if the user accepts, cancels, + * or closes the cover found dialog. This way, the dialog will not reappear + * if there are still covers yet to be retrieved. + */ + QList< CoverFetchUnit::Ptr > units = m_jobs.values(); + foreach( const CoverFetchUnit::Ptr &unit, units ) + { + if( unit->isInteractive() ) + { + m_queue->remove( unit ); + m_queueLater.removeAll( unit->album() ); + m_pixmaps.remove( unit ); + m_selectedPixmaps.remove( unit ); + + const KJob *job = m_jobs.key( unit ); + const_cast< KJob* >( job )->kill(); + The::statusBar()->endProgressOperation( job ); + m_jobs.remove( job ); + } + } +} + +void CoverFetcher::showCover( const CoverFetchUnit::Ptr unit ) { DEBUG_BLOCK QList< QPixmap > pixmaps = m_pixmaps.take( unit ); + if( cover.isNull() ) + { + finish( unit, Error ); + return; + } + if( !m_dialog ) { - m_dialog = new CoverFoundDialog( static_cast<QWidget*>( parent() ), unit->album(), pixmaps ); + const Meta::AlbumPtr album = unit->album(); + if( !album ) + { + finish( unit, Error ); + return; + } - connect( m_dialog, SIGNAL(newCustomQuery(const QString&)), - this, SLOT(queueQuery(const QString&)) ); + m_dialog = new CoverFoundDialog( album, cover, data, static_cast<QWidget*>( parent() ) ); + connect( m_dialog, SIGNAL(newCustomQuery(const QString&)), SLOT(queueQuery(const QString&)) ); + connect( m_dialog, SIGNAL(finished()), SLOT(slotDialogFinished()) ); switch( m_dialog->exec() ) { @@ -221,7 +266,7 @@ CoverFetcher::showCover( const CoverFetchUnit::Ptr unit ) finish( unit ); break; - case KDialog::Rejected: //make sure we do not show any more dialogs + case KDialog::Rejected: default: finish( unit, Cancelled ); break; diff --git a/src/covermanager/CoverFetcher.h b/src/covermanager/CoverFetcher.h index 225859f..fc039d1 100644 --- a/src/covermanager/CoverFetcher.h +++ b/src/covermanager/CoverFetcher.h @@ -62,6 +62,9 @@ private slots: void slotFetch( const CoverFetchUnit::Ptr unit ); void slotResult( KJob *job ); + /// Cover found dialog is closed by the user + void slotDialogFinished(); + private: static CoverFetcher* s_instance; CoverFetcher(); *** Bug 230808 has been marked as a duplicate of this bug. *** *** Bug 232593 has been marked as a duplicate of this bug. *** Created attachment 42955 [details]
New crash information added by DrKonqi
While manually retrieving cover art via right click in the left pane (Local Collection), Amarok crashed after approximately 10 cover searches.
Version 2.3.0
Using KDE 4.4.2 (KDE 4.4.2)
*** Bug 238631 has been marked as a duplicate of this bug. *** *** Bug 244292 has been marked as a duplicate of this bug. *** *** Bug 244772 has been marked as a duplicate of this bug. *** *** Bug 245037 has been marked as a duplicate of this bug. *** Created attachment 49495 [details]
New crash information added by DrKonqi
Amarok crashes after second confirmation of cover art. When I download cover art manually, the confirmation window may appear twice or more times (I push Enter only once!). And after second confirmation Amarok crashes. This repeats every time. If i cancel other requests, nothing happens and Amarok works
Dmytro, which version of Amarok are you using? (In reply to comment #15) > Dmytro, which version of Amarok are you using? Amarok version 2.3.0 Dmytro, as you can see in the bugs header this is about Amarok 2.3.1, which is ahead of your version. Please upgrade to Amarok 2.3.1 and try again. *** Bug 250567 has been marked as a duplicate of this bug. *** Created attachment 51450 [details]
New crash information added by DrKonqi
Amarok crashed while I was confirming the research of a cover
Paola, please upgrade to Amarok 2.3.1, this is already fixed since quite some time. You should have seen that when you added your comment to this report... *** Bug 250668 has been marked as a duplicate of this bug. *** *** Bug 253010 has been marked as a duplicate of this bug. *** *** Bug 256740 has been marked as a duplicate of this bug. *** *** Bug 266178 has been marked as a duplicate of this bug. *** |