Bug 189770

Summary: Weather station location search causes crash
Product: [Unmaintained] plasma4 Reporter: Ben Cooksley <bcooksley>
Component: widget-weatherAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, aseigo, benderamp, fjperezor, petri.damsten, shawn.starr
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ben Cooksley 2009-04-16 02:47:04 UTC
Version:           svn revision 954597. (using Devel)
Compiler:          g++ (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
 cmake version 2.6-patch 2
OS:                Linux
Installed from:    Compiled sources

While trying to configure the LCD Weather Station, Plasma crashed when I tried to search for my location using the BBC Met Office source. While trying to reproduce, I was not able to configure the Plasmoid, it never shows the results dialog, but doesn't crash. Additionally, the following was output at the console just before the crash:

Invalid D-BUS interface name 'org.kde.plasma-desktop.PlasmaApp' found while parsing introspection                                           
QObject::connect: Cannot connect (null)::toolBoxToggled() to DesktopView::toolBoxOpened()                                                   
Object::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data)                                                     
Object::disconnect:  (sender name:   'bbcukmet|validate|Wellington')                                                                        
KCrash: Application 'plasma-desktop' crashing...       

Backtrace follows:

Application: Plasma Workspace (plasma-desktop), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]
[Current thread is 1 (Thread 0xb4c29700 (LWP 9410))]

Thread 3 (Thread 0xa94bcb90 (LWP 9419)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb64b2c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb651a992 in QWaitCondition::wait (this=0x8155788, mutex=0x8155784, time=4294967295) at /home/trunk/kdesvn/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:87
#3  0xb7a24d72 in QHostInfoAgent::run (this=0x8155778) at /home/trunk/kdesvn/qt-copy/src/network/kernel/qhostinfo.cpp:260
#4  0xb65199ae in QThreadPrivate::start (arg=0x8155778) at /home/trunk/kdesvn/qt-copy/src/corelib/thread/qthread_unix.cpp:189
#5  0xb64af1b5 in start_thread () from /lib/libpthread.so.0
#6  0xb62f13be in clone () from /lib/libc.so.6

Thread 2 (Thread 0xa8a81b90 (LWP 9430)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb62ea411 in select () from /lib/libc.so.6
#2  0xb65eaa27 in QProcessManager::run (this=0x806ffd0) at /home/trunk/kdesvn/qt-copy/src/corelib/io/qprocess_unix.cpp:305
#3  0xb65199ae in QThreadPrivate::start (arg=0x806ffd0) at /home/trunk/kdesvn/qt-copy/src/corelib/thread/qthread_unix.cpp:189
#4  0xb64af1b5 in start_thread () from /lib/libpthread.so.0
#5  0xb62f13be in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb4c29700 (LWP 9410)):
[KCrash Handler]
#6  0xb6561853 in replaceArgEscapes (s=<value optimized out>, d=@0xbffe36d4, field_width=0, arg=@0x88809b0, larg=@0x88809b0, fillChar=@0xbffe3932)
    at /home/trunk/kdesvn/qt-copy/src/corelib/tools/qstring.cpp:6123
#7  0xb6561c34 in QString::arg (this=0xbffe3738, a=@0x88809b0, fieldWidth=0, fillChar=@0xbffe3932) at /home/trunk/kdesvn/qt-copy/src/corelib/tools/qstring.cpp:6244
#8  0xb752b8d6 in KLocalizedString::subs (this=0xbffe38c8, a=@0x88809b0, fieldWidth=0, fillChar=@0xbffe3932) at /home/trunk/kdesvn/kdelibs/kdecore/localization/klocalizedstring.cpp:901
#9  0xa81847c8 in WeatherValidator::dataUpdated (this=0x8669618, source=@0xbffe3e68, data=@0xbffe3e64) at /opt/trunk-kde/kde/include/klocalizedstring.h:613
#10 0xa8184fab in WeatherValidator::qt_metacall (this=0x8669618, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbffe3a48)
    at /home/trunk/kdesvn/build/kdeplasma-addons/libs/plasmaweather/weathervalidator.moc:71
#11 0xb6615a39 in QMetaMethod::invoke (this=0xbffe3dcc, object=0x8669618, connectionType=Qt::DirectConnection, returnValue={<QGenericArgument> = {_data = 0x0, _name = 0x0}, <No data fields>}, val0=
      {_data = 0xbffe3e68, _name = 0xb8012031 "QString"}, val1={_data = 0xbffe3e64, _name = 0xb8012039 "Plasma::DataEngine::Data"}, val2={_data = 0x0, _name = 0x0}, val3={_data = 0x0, _name = 0x0}, 
    val4={_data = 0x0, _name = 0x0}, val5={_data = 0x0, _name = 0x0}, val6={_data = 0x0, _name = 0x0}, val7={_data = 0x0, _name = 0x0}, val8={_data = 0x0, _name = 0x0}, val9=
      {_data = 0x0, _name = 0x0}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qmetaobject.cpp:1513
#12 0xb6616160 in QMetaObject::invokeMethod (obj=0x8669618, member=0xb8012052 "dataUpdated", type=Qt::AutoConnection, ret={<QGenericArgument> = {_data = 0x0, _name = 0x0}, <No data fields>}, val0=
      {_data = 0xbffe3e68, _name = 0xb8012031 "QString"}, val1={_data = 0xbffe3e64, _name = 0xb8012039 "Plasma::DataEngine::Data"}, val2={_data = 0x0, _name = 0x0}, val3={_data = 0x0, _name = 0x0}, 
    val4={_data = 0x0, _name = 0x0}, val5={_data = 0x0, _name = 0x0}, val6={_data = 0x0, _name = 0x0}, val7={_data = 0x0, _name = 0x0}, val8={_data = 0x0, _name = 0x0}, val9=
      {_data = 0x0, _name = 0x0}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qmetaobject.cpp:1109
#13 0xb7f00ead in Plasma::DataEnginePrivate::connectSource (this=0x8953da8, s=0x8489f38, visualization=0x8669618, pollingInterval=0, align=Plasma::NoAlignment, immediateCall=true)
    at /opt/trunk-kde/qt/include/QtCore/qobjectdefs.h:403
#14 0xb7f015dd in Plasma::DataEngine::connectSource (this=0x8953648, source=@0xbffe3ee4, visualization=0x8669618, pollingInterval=0, intervalAlignment=Plasma::NoAlignment)
    at /home/trunk/kdesvn/kdelibs/plasma/dataengine.cpp:96
#15 0xa8183876 in WeatherValidator::validate (this=0x8669618, plugin=@0xbffe3f38, city=@0xbffe3f34, silent=false) at /home/trunk/kdesvn/kdeplasma-addons/libs/plasmaweather/weathervalidator.cpp:49
#16 0xa8189c13 in WeatherConfigSearch::searchPressed (this=0x86695e4) at /home/trunk/kdesvn/kdeplasma-addons/libs/plasmaweather/weatherconfigsearch.cpp:54
#17 0xa8189cf3 in WeatherConfigSearch::qt_metacall (this=0x86695e4, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbffe3fe8)
    at /home/trunk/kdesvn/build/kdeplasma-addons/libs/plasmaweather/weatherconfigsearch.moc:73
#18 0xb6622de8 in QMetaObject::activate (sender=0x86695e4, from_signal_index=42, to_signal_index=42, argv=0x0) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3069
#19 0xb6623a72 in QMetaObject::activate (sender=0x86695e4, m=0xb794c1c4, local_signal_index=6, argv=0x0) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3143
#20 0xb77119a7 in KDialog::user1Clicked (this=0x86695e4) at /home/trunk/kdesvn/build/kdelibs/kdeui/kdialog.moc:231
#21 0xb771422d in KDialog::slotButtonClicked (this=0x86695e4, button=4096) at /home/trunk/kdesvn/kdelibs/kdeui/dialogs/kdialog.cpp:863
#22 0xb7715754 in KDialog::qt_metacall (this=0x86695e4, _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0xbffe41ac) at /home/trunk/kdesvn/build/kdelibs/kdeui/kdialog.moc:182
#23 0xa8189c8a in WeatherConfigSearch::qt_metacall (this=0x86695e4, _c=QMetaObject::InvokeMetaMethod, _id=69, _a=0xbffe41ac)
    at /home/trunk/kdesvn/build/kdeplasma-addons/libs/plasmaweather/weatherconfigsearch.moc:67
#24 0xb6622de8 in QMetaObject::activate (sender=0x88ab0c0, from_signal_index=4, to_signal_index=4, argv=0xbffe41ac) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3069
#25 0xb6623a72 in QMetaObject::activate (sender=0x88ab0c0, m=0xb66fe878, local_signal_index=0, argv=0xbffe41ac) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3143
#26 0xb6625d23 in QSignalMapper::mapped (this=0x88ab0c0, _t1=4096) at .moc/release-shared/moc_qsignalmapper.cpp:95
#27 0xb66265ad in QSignalMapper::map (this=0x88ab0c0, sender=0x88e4560) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qsignalmapper.cpp:266
#28 0xb662679e in QSignalMapper::map (this=0x88ab0c0) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qsignalmapper.cpp:257
#29 0xb66270db in QSignalMapper::qt_metacall (this=0x88ab0c0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbffe432c) at .moc/release-shared/moc_qsignalmapper.cpp:81
#30 0xb6622de8 in QMetaObject::activate (sender=0x88e4560, from_signal_index=29, to_signal_index=30, argv=0xbffe432c) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3069
#31 0xb6623220 in QMetaObject::activate (sender=0x88e4560, m=0xb71521c4, from_local_signal_index=2, to_local_signal_index=3, argv=0xbffe432c)
    at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3163
#32 0xb6f6b681 in QAbstractButton::clicked (this=0x88e4560, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:200
#33 0xb6c96909 in QAbstractButtonPrivate::emitClicked (this=0x88e43e8) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:543
#34 0xb6c98504 in QAbstractButtonPrivate::click (this=0x88e43e8) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:536
#35 0xb6c98796 in QAbstractButton::mouseReleaseEvent (this=0x88e4560, e=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:1115
#36 0xb6910473 in QWidget::event (this=0x88e4560, event=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qwidget.cpp:7516
#37 0xb6c967ae in QAbstractButton::event (this=0x88e4560, e=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:1077
#38 0xb6d41500 in QPushButton::event (this=0x88e4560, e=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qpushbutton.cpp:662
#39 0xb68b98fc in QApplicationPrivate::notify_helper (this=0x806e6e0, receiver=0x88e4560, e=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:4084
#40 0xb68c2531 in QApplication::notify (this=0x8065268, receiver=0x88e4560, e=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3786
#41 0xb77ab56d in KApplication::notify (this=0x8065268, receiver=0x88e4560, event=0xbffe49cc) at /home/trunk/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:307
#42 0xb660cccb in QCoreApplication::notifyInternal (this=0x8065268, receiver=0x88e4560, event=0xbffe49cc) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:602
#43 0xb68c159e in QApplicationPrivate::sendMouseEvent (receiver=0x88e4560, event=0xbffe49cc, alienWidget=0x88e4560, nativeWidget=0x86695e4, buttonDown=0xb715f1c0, lastMouseReceiver=@0xb715f1c4)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:216
#44 0xb6930b3d in QETWidget::translateMouseEvent (this=0x86695e4, event=0xbffe4f2c) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:4425
#45 0xb692f88d in QApplication::x11ProcessEvent (this=0x8065268, event=0xbffe4f2c) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:3543
#46 0xb6959152 in x11EventSourceDispatch (s=0x8071b48, callback=0, user_data=0x0) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:146
#47 0xb50249a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0xb5028063 in ?? () from /usr/lib/libglib-2.0.so.0
#49 0xb5028221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#50 0xb6638578 in QEventDispatcherGlib::processEvents (this=0x8050418, flags={i = -1073852184}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:323
#51 0xb6958895 in QGuiEventDispatcherGlib::processEvents (this=0x8050418, flags={i = -1073852136}) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:202
#52 0xb660b2ea in QEventLoop::processEvents (this=0xbffe518c, flags={i = -1073852072}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#53 0xb660b72a in QEventLoop::exec (this=0xbffe518c, flags={i = -1073852012}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:200
#54 0xb6dcfb13 in QDialog::exec (this=0x86695e4) at /home/trunk/kdesvn/qt-copy/src/gui/dialogs/qdialog.cpp:498
#55 0xa8186664 in WeatherConfig::qt_metacall (this=0x8810710, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbffe52cc) at /home/trunk/kdesvn/kdeplasma-addons/libs/plasmaweather/weatherconfig.cpp:39
#56 0xb6622de8 in QMetaObject::activate (sender=0x8a1bea8, from_signal_index=29, to_signal_index=30, argv=0xbffe52cc) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3069
#57 0xb6623220 in QMetaObject::activate (sender=0x8a1bea8, m=0xb71521c4, from_local_signal_index=2, to_local_signal_index=3, argv=0xbffe52cc)
    at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3163
#58 0xb6f6b681 in QAbstractButton::clicked (this=0x8a1bea8, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:200
#59 0xb6c96909 in QAbstractButtonPrivate::emitClicked (this=0x88e0ef8) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:543
#60 0xb6c98504 in QAbstractButtonPrivate::click (this=0x88e0ef8) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:536
#61 0xb6c98796 in QAbstractButton::mouseReleaseEvent (this=0x8a1bea8, e=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:1115
#62 0xb6910473 in QWidget::event (this=0x8a1bea8, event=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qwidget.cpp:7516
#63 0xb6c967ae in QAbstractButton::event (this=0x8a1bea8, e=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qabstractbutton.cpp:1077
#64 0xb6d41500 in QPushButton::event (this=0x8a1bea8, e=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/widgets/qpushbutton.cpp:662
#65 0xb68b98fc in QApplicationPrivate::notify_helper (this=0x806e6e0, receiver=0x8a1bea8, e=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:4084
#66 0xb68c2531 in QApplication::notify (this=0x8065268, receiver=0x8a1bea8, e=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3786
#67 0xb77ab56d in KApplication::notify (this=0x8065268, receiver=0x8a1bea8, event=0xbffe596c) at /home/trunk/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:307
#68 0xb660cccb in QCoreApplication::notifyInternal (this=0x8065268, receiver=0x8a1bea8, event=0xbffe596c) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:602
#69 0xb68c159e in QApplicationPrivate::sendMouseEvent (receiver=0x8a1bea8, event=0xbffe596c, alienWidget=0x8a1bea8, nativeWidget=0x8937800, buttonDown=0xb715f1c0, lastMouseReceiver=@0xb715f1c4)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:216
#70 0xb6930b3d in QETWidget::translateMouseEvent (this=0x8937800, event=0xbffe5ecc) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:4425
#71 0xb692f88d in QApplication::x11ProcessEvent (this=0x8065268, event=0xbffe5ecc) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication_x11.cpp:3543
#72 0xb6959152 in x11EventSourceDispatch (s=0x8071b48, callback=0, user_data=0x0) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:146
#73 0xb50249a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#74 0xb5028063 in ?? () from /usr/lib/libglib-2.0.so.0
#75 0xb5028221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#76 0xb6638578 in QEventDispatcherGlib::processEvents (this=0x8050418, flags={i = -1073848184}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:323
#77 0xb6958895 in QGuiEventDispatcherGlib::processEvents (this=0x8050418, flags={i = -1073848136}) at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:202
#78 0xb660b2ea in QEventLoop::processEvents (this=0xbffe6130, flags={i = -1073848072}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#79 0xb660b72a in QEventLoop::exec (this=0xbffe6130, flags={i = -1073848008}) at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:200
#80 0xb660dbd9 in QCoreApplication::exec () at /home/trunk/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:880
#81 0xb68b9777 in QApplication::exec () at /home/trunk/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3553
#82 0xb80879d0 in kdemain (argc=1, argv=0xbffe62e4) at /home/trunk/kdesvn/kdebase/workspace/plasma/shells/desktop/main.cpp:50
#83 0x080487d2 in main (argc=5, argv=0x31) at /home/trunk/kdesvn/build/kdebase/workspace/plasma/shells/desktop/plasma-desktop_dummy.cpp:3
Comment 1 Dario Andres 2009-04-17 14:52:54 UTC
What is your Qt version? Thanks
Comment 2 Ben Cooksley 2009-04-17 15:22:44 UTC
Qt-Copy revision 955378 ( Qt 4.5 ) with patches applied using the apply_patches script. Built using kdesvn-build default build configuration.
Comment 3 Petri Damstén 2009-04-17 15:52:10 UTC
Could you try this with latest svn? For me searching Wellington from bbc gives 3 choices and all work ok.
Comment 4 Ben Cooksley 2009-04-17 23:42:54 UTC
It still doesn't work here unfortunately. I checked the API directly:
http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl?x=0&y=0&=Submit&search_query=wellington&tmpl=wap

And got valid information, then I checked the5 day weather url:
http://www.bbc.co.uk//weather/mobile/5day.wml?world=0095

And got valid information there as well. I have cleared the HTTP cache, and tried with Plasmoidviewer, and it doesn't work there either, even with a cleared configuration file.
Comment 5 Ben Cooksley 2009-04-17 23:47:02 UTC
I know what the problem is now. It is the automatically not try to use network dataengines when there is no network work by aseigo. I do have an internet connection, but I use Wicd 1.5.9 which isn't compatible with the Wicd solid backend ( which is compatible with 1.6, which hasn't been released yet )

As a result, Solid believes I am "Offline". Is there a override I can use?
Comment 6 Aaron J. Seigo 2009-05-27 01:40:38 UTC
it now treats Unknown status to mean "maybe we're actually online and are just blind" which should resolve the symptom ..... but WHY is it crashing when there's no network?

ah, i see. it does a split on a string and then doesn't check the size of the returned list before accessing it. brilliant.
Comment 7 Aaron J. Seigo 2009-05-27 01:47:55 UTC
SVN commit 973379 by aseigo:

be careful with indexing into arrays!
BUG:189770


 M  +7 -3      weathervalidator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973379
Comment 8 Dario Andres 2009-06-10 15:30:20 UTC
*** Bug 195887 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2009-09-21 00:32:58 UTC
*** Bug 207763 has been marked as a duplicate of this bug. ***