[PATCH] Lyrics plugin
Rob Kaper
cap at capsi.com
Wed Jan 14 04:14:00 GMT 2004
I have been getting crashes and aborts in the Lyrics plugin when changing
songs while a URL was busy loading, or on closing the Lyrics window.
Example backtrace attached, as well as a patch which fixes the first problem
for me (could never reliably reproduce the bug by closing the window).
Rob
PS: Neil, I don't care how, but I'd appreciate it if you'd be able to store
the lyrics URLs as metadata somehow (KMFI after all?) so the Lyrics
bookmarking actually works with Hayes.
--
Rob Kaper | "You never learn, do you? First the VCR and now you broke
kaper at kde.org | the Internet." -- rejected Konqueror error message #11
-------------- next part --------------
[New Thread 16384 (LWP 240)]
0x412c1477 in waitpid () from /lib/libpthread.so.0
#0 0x412c1477 in waitpid () from /lib/libpthread.so.0
#1 0x407c55b7 in KCrash::defaultCrashHandler(int) (sig=6) at kcrash.cpp:246
#2 0x412bfbc5 in __pthread_sighandler () from /lib/libpthread.so.0
#3 <signal handler called>
#4 0x41427151 in kill () from /lib/libc.so.6
#5 0x412bc9a1 in pthread_kill () from /lib/libpthread.so.0
#6 0x412bccab in raise () from /lib/libpthread.so.0
#7 0x41426d94 in raise () from /lib/libc.so.6
#8 0x41428548 in abort () from /lib/libc.so.6
#9 0x4142050c in __assert_fail () from /lib/libc.so.6
#10 0x4161bb08 in PlaylistItem::property(QString const&, QString const&) const
(this=0xbfffe7c0, key=@0xbfffe7d0, def=@0xbfffe7e0) at playlist.h:247
#11 0x425d1829 in Lyrics::loadedURL() (this=0x8298048) at lyrics.cpp:121
#12 0x425d3a68 in Lyrics::qt_invoke(int, QUObject*) (this=0x8298048, _id=77,
_o=0xbfffe8e0) at lyrics.moc:128
#13 0x40c2a46c in QObject::activate_signal(QConnectionList*, QUObject*) (
this=0x829e640, clist=0x82ae928, o=0xbfffe8e0) at kernel/qobject.cpp:2383
#14 0x40c2a1be in QObject::activate_signal(int) (this=0x829e640, signal=5)
at kernel/qobject.cpp:2328
#15 0x40040e95 in KParts::ReadOnlyPart::completed() (this=0x829e640)
at part.moc:240
#16 0x4274027c in KHTMLPart::checkCompleted() (this=0x829e640)
at khtml_part.cpp:1969
#17 0x4273f859 in KHTMLPart::slotFinishedParsing() (this=0x829e640)
at khtml_part.cpp:1800
#18 0x42755682 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x829e640,
_id=20, _o=0xbfffeb20) at khtml_part.moc:469
#19 0x40c2a31f in QObject::activate_signal(QConnectionList*, QUObject*) (
this=0x87e9bc0, clist=0x88d08a0, o=0xbfffeb20) at kernel/qobject.cpp:2359
#20 0x40c2a1be in QObject::activate_signal(int) (this=0x87e9bc0, signal=2)
at kernel/qobject.cpp:2328
#21 0x4278189c in DOM::DocumentImpl::finishedParsing() (this=0x87e9bc0)
at dom_docimpl.moc:86
#22 0x42781918 in DOM::DocumentImpl::qt_emit(int, QUObject*) (this=0x87e9bc0,
_id=2, _o=0xbfffec30) at dom_docimpl.moc:97
#23 0x427b3fd2 in DOM::HTMLDocumentImpl::qt_emit(int, QUObject*) (
this=0x87e9bc0, _id=2, _o=0xbfffec30) at html_documentimpl.moc:91
#24 0x40c2a2f6 in QObject::activate_signal(QConnectionList*, QUObject*) (
this=0x87e0678, clist=0x88cc2f0, o=0xbfffec30) at kernel/qobject.cpp:2357
#25 0x40c2a1be in QObject::activate_signal(int) (this=0x87e0678, signal=2)
at kernel/qobject.cpp:2328
#26 0x4279abaa in Tokenizer::finishedParsing() (this=0x87e0678)
at xml_tokenizer.moc:82
#27 0x427a965f in khtml::HTMLTokenizer::end() (this=0x87e0678)
at htmltokenizer.cpp:1471
#28 0x427a9975 in khtml::HTMLTokenizer::finish() (this=0x87e0678)
at htmltokenizer.cpp:1516
#29 0x4277c7eb in DOM::DocumentImpl::finishParsing() (this=0x87e9bc0)
at dom_docimpl.cpp:1166
#30 0x4273f4ed in KHTMLPart::end() (this=0x829e640) at khtml_part.cpp:1741
#31 0x425d37ad in Lyrics::queryClose() (this=0x8298048) at lyrics.cpp:259
#32 0x40534cb6 in KMainWindow::closeEvent(QCloseEvent*) (this=0x8298048,
e=0xbffff060) at kmainwindow.cpp:571
#33 0x40c62793 in QWidget::event(QEvent*) (this=0x8298048, e=0xbffff060)
at kernel/qwidget.cpp:4764
#34 0x40d29e07 in QMainWindow::event(QEvent*) (this=0x8298048, e=0xbffff060)
at widgets/qmainwindow.cpp:1686
#35 0x40bc796d in QApplication::internalNotify(QObject*, QEvent*) (
this=0xbffff4b0, receiver=0x8298048, e=0xbffff060)
at kernel/qapplication.cpp:2614
#36 0x40bc759d in QApplication::notify(QObject*, QEvent*) (this=0xbffff4b0,
receiver=0x8298048, e=0xbffff060) at kernel/qapplication.cpp:2502
#37 0x4073c6d5 in KApplication::notify(QObject*, QEvent*) (this=0xbffff4b0,
receiver=0x8298048, event=0xbffff060) at kapplication.cpp:503
#38 0x4004a38b in QApplication::sendEvent(QObject*, QEvent*) (
receiver=0x8298048, event=0xbffff060) at qapplication.h:490
#39 0x40c61a16 in QWidget::close(bool) (this=0x8298048, alsoDelete=false)
at kernel/qwidget.cpp:4252
#40 0x40b59baa in QETWidget::translateCloseEvent(_XEvent const*) (
this=0x8298048) at kernel/qapplication_x11.cpp:5711
#41 0x40b540a5 in QApplication::x11ClientMessage(QWidget*, _XEvent*, bool) (
this=0xbffff4b0, w=0x8298048, event=0xbffff3b0, passive_only=false)
at kernel/qapplication_x11.cpp:3046
#42 0x40b554b5 in QApplication::x11ProcessEvent(_XEvent*) (this=0xbffff4b0,
event=0xbffff3b0) at kernel/qapplication_x11.cpp:3576
#43 0x40b6f244 in QEventLoop::processEvents(unsigned) (this=0x80e0688, flags=4)
at kernel/qeventloop_x11.cpp:192
#44 0x40bdbc6a in QEventLoop::enterLoop() (this=0x80e0688)
at kernel/qeventloop.cpp:198
#45 0x40bdbb86 in QEventLoop::exec() (this=0x80e0688)
at kernel/qeventloop.cpp:145
#46 0x40bc7aed in QApplication::exec() (this=0xbffff4b0)
at kernel/qapplication.cpp:2737
#47 0x408d52c9 in kdemain (argc=3, argv=0x8062788) at main.cpp:46
#48 0x408d2ad5 in kdeinitmain (argc=3, argv=0x8062788) at noatun_dummy.cpp:2
#49 0x0804e2fe in launch (argc=3, _name=0x8062e84 "noatun", args=0x8062ecc "",
cwd=0x0, envc=0, envs=0x8062ed0 "", reset_env=false, tty=0x0,
avoid_loops=false, startup_id_str=0x8052de7 "0") at kinit.cpp:604
#50 0x0804f60f in handle_launcher_request (sock=8) at kinit.cpp:1167
#51 0x0804fca4 in handle_requests (waitForPid=0) at kinit.cpp:1360
#52 0x08051128 in main (argc=3, argv=0xbffffb44, envp=0xbffffb54)
at kinit.cpp:1797
#53 0x41413916 in __libc_start_main () from /lib/libc.so.6
-------------- next part --------------
Index: lyrics.cpp
===================================================================
RCS file: /home/kde/kdeaddons/noatun-plugins/lyrics/lyrics.cpp,v
retrieving revision 1.28
diff -u -3 -p -r1.28 lyrics.cpp
--- lyrics.cpp 17 May 2003 11:00:32 -0000 1.28
+++ lyrics.cpp 14 Jan 2004 04:00:18 -0000
@@ -95,6 +95,8 @@ void Lyrics::setProviders( QValueVector<
}
void Lyrics::attach(bool a) {
+ if ( !napp->player()->current() )
+ return;
if (a) {
KMessageBox::information(this, i18n("Choosing this option, the current URL will be attached to the current file. This way, if you try to view the lyrics of this file later, you won't have to search for it again. This information can be stored between sessions, as long as your playlist stores metadata about the multimedia items (almost all the playlists do). If you want to be able to search for other lyrics for this music, you must select this option again to clear the stored URL."), QString::null, "lyrics::attach_info");
kdDebug() << "Setting URL for (attach)" << napp->player()->current().title() << endl;
@@ -117,6 +119,8 @@ void Lyrics::loadingURL(KIO::Job *)
void Lyrics::loadedURL()
{
+ if ( !napp->player()->current() )
+ return;
statusBar()->changeItem(i18n("Loaded"), 0);
setCaption(i18n("Lyrics: %1").arg(napp->player()->current().property("title")));
if (!htmlpart->url().url().isEmpty() && napp->player()->current() && !napp->player()->current().property("Lyrics::URL").isEmpty()) {
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list