Bug 245177 - Opening muon makes it crash
Summary: Opening muon makes it crash
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Applications
Component: libqapt (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
: 246063 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-19 22:58 UTC by Mirza
Modified: 2012-03-05 19:24 UTC (History)
2 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 Mirza 2010-07-19 22:58:52 UTC
Application: muon (0.3.0)
KDE Platform Version: 4.4.5 (KDE 4.4.5)
Qt Version: 4.6.3
Operating System: Linux 2.6.31-21-generic i686
Distribution: Ubuntu 10.04.1 LTS

-- Information about the crash:
Just after opening muon it crashes.
Console output says:
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
KCrash: Application 'muon' crashing...
sock_file=/home/mirza/.kde/socket-Mirza-Laptop/kdeinit4__0
<unknown program name>(31668)/: Communication problem with  "muon" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "



 -- Backtrace:
Application: Muon Package Manager (muon), signal: Aborted
[KCrash Handler]
#6  0x00f67422 in __kernel_vsyscall ()
#7  0x04873651 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0x04876a82 in *__GI_abort () at abort.c:92
#9  0x00d1252f in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#10 0x00d10465 in ?? () from /usr/lib/libstdc++.so.6
#11 0x00d104a2 in std::terminate() () from /usr/lib/libstdc++.so.6
#12 0x00d105e1 in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0x00ca757f in std::__throw_logic_error(char const*) () from /usr/lib/libstdc++.so.6
#14 0x00cebb82 in ?? () from /usr/lib/libstdc++.so.6
#15 0x00cebcf6 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/libstdc++.so.6
#16 0x00ed1ce0 in QApt::Backend::reloadCache() () from /usr/lib/libqapt.so.0
#17 0x00ed2991 in QApt::Backend::init() () from /usr/lib/libqapt.so.0
#18 0x080597cc in MainWindow::initObject (this=0x8ff6668) at /build/buildd/muon-0.3.0/src/MainWindow.cpp:120
#19 0x0805e80e in MainWindow::qt_metacall (this=0x8ff6668, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbf84de9c) at /build/buildd/muon-0.3.0/obj-i486-linux-gnu/src/MainWindow.moc:126
#20 0x010d147a in QMetaObject::metacall (object=0x8ff6668, cl=31530, idx=48, argv=0xbf84de9c) at kernel/qmetaobject.cpp:237
#21 0x010dffbb in QMetaObject::activate (sender=0x91e8e78, m=0x11e0188, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3295
#22 0x010e7827 in QSingleShotTimer::timeout (this=0x91e8e78) at .moc/release-shared/qtimer.moc:82
#23 0x010e793c in QSingleShotTimer::timerEvent (this=0x91e8e78) at kernel/qtimer.cpp:308
#24 0x010dca64 in QObject::event (this=0x91e8e78, e=0x6) at kernel/qobject.cpp:1212
#25 0x018bce8c in QApplicationPrivate::notify_helper (this=0x8f9c448, receiver=0x91e8e78, e=0xbf84e3d0) at kernel/qapplication.cpp:4302
#26 0x018c3a0e in QApplication::notify (this=0xbf84e730, receiver=0x91e8e78, e=0xbf84e3d0) at kernel/qapplication.cpp:3706
#27 0x0082140a in KApplication::notify (this=0xbf84e730, receiver=0x91e8e78, event=0xbf84e3d0) at ../../kdeui/kernel/kapplication.cpp:302
#28 0x010cc13b in QCoreApplication::notifyInternal (this=0xbf84e730, receiver=0x91e8e78, event=0xbf84e3d0) at kernel/qcoreapplication.cpp:726
#29 0x010fb5c6 in QCoreApplication::sendEvent (this=0x8f9339c) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#30 QTimerInfoList::activateTimers (this=0x8f9339c) at kernel/qeventdispatcher_unix.cpp:603
#31 0x010f8144 in timerSourceDispatch (source=0x8f93368) at kernel/qeventdispatcher_glib.cpp:184
#32 0x078925e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#33 0x078962d8 in ?? () from /lib/libglib-2.0.so.0
#34 0x078964b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#35 0x010f7e35 in QEventDispatcherGlib::processEvents (this=0x8f76020, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#36 0x0197ce15 in QGuiEventDispatcherGlib::processEvents (this=0x8f76020, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x010ca759 in QEventLoop::processEvents (this=0xbf84e694, flags=) at kernel/qeventloop.cpp:149
#38 0x010cabaa in QEventLoop::exec (this=0xbf84e694, flags=...) at kernel/qeventloop.cpp:201
#39 0x010cfe3f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#40 0x018bcf27 in QApplication::exec () at kernel/qapplication.cpp:3581
#41 0x08059129 in main (argc=5, argv=0xbf84e854) at /build/buildd/muon-0.3.0/src/main.cpp:54

Reported using DrKonqi
Comment 1 Jonathan Thomas 2010-07-20 00:07:12 UTC
Could you install qapt-dbg and get paste the new backtrace? The current one is missing some important details. Thanks.
Comment 2 Jonathan Thomas 2010-07-20 06:22:39 UTC
Nevermind, I got it. :)

It seems that your system has a package in it that is without a section, and that trying to get the section from APT results in referencing a null pointer (a crash). ;)

A package without a section is in violation of Debian packaging policy, but obviously Muon should not crash when it encounters such misbehaving packages.

I should have a solution to solve this crash quite soon, and it will definitely make it in to the beta release, scheduled a week from Wednesday. Thanks for the report!
Comment 3 Jonathan Thomas 2010-07-20 06:29:19 UTC
SVN commit 1151987 by jmthomas:

Apparently libapt-pkg returns null const char pointers when you try to call Section() on a package that lacks a section. :/
I naively thought that we might live in a world where all libraries would be like Qt and gracefully return an empty string on failure. We do not live in such a world.

BUG: 245177


 M  +1 -1      backend.cpp  
 M  +6 -1      package.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1151987
Comment 4 Mirza 2010-07-20 19:11:36 UTC
:D nice comment :D
Comment 5 Jonathan Thomas 2010-07-28 22:43:23 UTC
*** Bug 246063 has been marked as a duplicate of this bug. ***