Bug 330300 - segfault on PresentWindows activation for PlasmaComponents/Units connects to a 0x0 Q_SLOT
Summary: segfault on PresentWindows activation for PlasmaComponents/Units connects to ...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 4.11.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-01-22 19:55 UTC by andy_90254
Modified: 2016-08-29 07:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Installed packages (98.45 KB, text/plain)
2014-01-23 04:20 UTC, andy_90254
Details
Package Dependencies (441.11 KB, text/plain)
2014-01-23 04:22 UTC, andy_90254
Details
Reverse Dependencies (574.96 KB, application/octet-stream)
2014-01-23 08:59 UTC, andy_90254
Details
Results of find core. (2.17 KB, text/plain)
2014-01-24 04:56 UTC, andy_90254
Details
valgrind with konsole (359.00 KB, text/plain)
2014-01-24 05:06 UTC, andy_90254
Details
stacktrace for Kontact crash (8.74 KB, text/plain)
2014-01-24 05:22 UTC, andy_90254
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andy_90254 2014-01-22 19:55:17 UTC
Application: kwin (4.11.3)
KDE Platform Version: 4.12.0
Qt Version: 4.8.2
Operating System: Linux 3.2.0-58-generic-pae i686
Distribution: Ubuntu 12.04.4 LTS

-- Information about the crash:
- What I was doing when the application crashed:  I woke up from sleeping (literally!).  I moved the mouse... the system was sluggish... I moved the mouse rapidly in circles... it Krashed!

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb775f740 (LWP 18530))]

Thread 4 (Thread 0xae1ffb40 (LWP 18545)):
#0  0x00519416 in __kernel_vsyscall ()
#1  0x008d596b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0x0020d4bc in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0x0068e029 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4  0x0068e06f in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5  0x008d1d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6  0x001ffbae in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 3 (Thread 0xabd03b40 (LWP 18551)):
#0  0x00519416 in __kernel_vsyscall ()
#1  0x008d596b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0x0020d4bc in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0x04075aac in ?? () from /usr/lib/i386-linux-gnu/dri/r300_dri.so
#4  0x008d1d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#5  0x001ffbae in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xaf6b3b40 (LWP 18643)):
#0  0x00b8edcd in clock_gettime () from /lib/i386-linux-gnu/librt.so.1
#1  0x0769a3e5 in do_gettime (frac=0xaf6b30c0, sec=0xaf6b30b8) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0x07784726 in QTimerInfoList::updateCurrentTime (this=0xaec00b34) at kernel/qeventdispatcher_unix.cpp:343
#4  0x07784a7a in QTimerInfoList::timerWait (this=0xaec00b34, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#5  0x0778677e in QEventDispatcherUNIX::processEvents (this=0xaec00488, flags=...) at kernel/qeventdispatcher_unix.cpp:913
#6  0x0774f6ad in QEventLoop::processEvents (this=0xaf6b3240, flags=...) at kernel/qeventloop.cpp:149
#7  0x0774f949 in QEventLoop::exec (this=0xaf6b3240, flags=...) at kernel/qeventloop.cpp:204
#8  0x07638a1c in QThread::exec (this=0xa3c4628) at thread/qthread.cpp:501
#9  0x0772ccfd in QInotifyFileSystemWatcherEngine::run (this=0xa3c4628) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x0763beb0 in QThreadPrivate::start (arg=0xa3c4628) at thread/qthread_unix.cpp:307
#11 0x008d1d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#12 0x001ffbae in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb775f740 (LWP 18530)):
[KCrash Handler]
#7  0x0018a286 in free () from /lib/i386-linux-gnu/libc.so.6
#8  0x02a9f51f in operator delete(void*) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#9  0x02a9f57b in operator delete[](void*) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#10 0x07763c7f in QObjectPrivate::Connection::~Connection (this=0x9805128, __in_chrg=<optimized out>) at kernel/qobject.cpp:945
#11 0x0776791c in cleanConnectionLists (this=<optimized out>) at kernel/qobject.cpp:372
#12 QObjectPrivate::cleanConnectionLists (this=0x9ba1738) at kernel/qobject.cpp:349
#13 0x07768731 in QObjectPrivate::addConnection (this=0x9ba1738, signal=2, c=0xa677888) at kernel/qobject.cpp:346
#14 0x07768956 in QMetaObjectPrivate::connect (sender=0x9c74e18, signal_index=2, receiver=0xaaf0dc0, method_index=1, rmeta=0x6569cd8, type=0, types=0x0) at kernel/qobject.cpp:3195
#15 0x077696e4 in QObject::connect (sender=0x9c74e18, signal=0x656377a "2themeChanged()", receiver=0xaaf0dc0, method=0x0, type=Qt::AutoConnection) at kernel/qobject.cpp:2646
#16 0x06560cbe in Units::Units (this=0xaaf0dc0, parent=0x9540b70) at ../../../../plasma/declarativeimports/plasmacomponents/units.cpp:36
#17 0x06559d7b in PlasmaComponentsPlugin::initializeEngine (this=0x950d448, engine=0xa9a2f88, uri=0xaaf37b0 "org.kde.plasma.components") at ../../../../plasma/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp:89
#18 0x01099a01 in QDeclarativeImportDatabase::importPlugin (this=0xb40433c, filePath=..., uri=..., errorString=0xbfe1a71c) at qml/qdeclarativeimport.cpp:1083
#19 0x0109a192 in QDeclarativeImportsPrivate::importExtension (this=0xbfe1a394, absoluteFilePath=..., uri=..., database=0xb40433c, components=0xbfe1a464, errorString=0xbfe1a71c) at qml/qdeclarativeimport.cpp:388
#20 0x0109acc1 in QDeclarativeImportsPrivate::add (this=0xa80e3a8, qmldircomponentsnetwork=..., uri_arg=..., prefix=..., vmaj=0, vmin=1, importType=QDeclarativeScriptParser::Import::Library, database=0xb40433c, errorString=0xbfe1a71c) at qml/qdeclarativeimport.cpp:515
#21 0x0109de19 in QDeclarativeImports::addImport (this=0xa7462b8, importDb=0x0, uri=..., prefix=..., vmaj=0, vmin=1, importType=QDeclarativeScriptParser::Import::Library, qmldircomponentsnetwork=..., errorString=0x0) at qml/qdeclarativeimport.cpp:821
#22 0x01034592 in QDeclarativeTypeData::resolveTypes (this=0xa746268) at qml/qdeclarativetypeloader.cpp:1080
#23 0x01035456 in QDeclarativeTypeData::allDependenciesDone (this=0xa746268) at qml/qdeclarativetypeloader.cpp:1003
#24 0x01030301 in QDeclarativeDataLoader::setData (this=0xb404318, blob=0xa746268, data=...) at qml/qdeclarativetypeloader.cpp:642
#25 0x010316b8 in QDeclarativeDataLoader::load (this=0xb404318, blob=0xa746268) at qml/qdeclarativetypeloader.cpp:546
#26 0x01032348 in QDeclarativeTypeLoader::get (this=0xb404318, url=...) at qml/qdeclarativetypeloader.cpp:694
#27 0x00fee58e in QDeclarativeComponent::loadUrl (this=0xb33be98, url=...) at qml/qdeclarativecomponent.cpp:536
#28 0x00feea59 in QDeclarativeComponent::QDeclarativeComponent (this=0xb33be98, engine=0xa9a2f88, url=..., parent=0xb28d968) at qml/qdeclarativecomponent.cpp:437
#29 0x00ec226c in QDeclarativeViewPrivate::execute (this=0x9805150) at util/qdeclarativeview.cpp:173
#30 0x0487d3da in KWin::CloseWindowView::CloseWindowView (this=0xb28d968, parent=0x0) at ../../../kwin/effects/presentwindows/presentwindows.cpp:1971
#31 0x04886c90 in setActive (active=true, this=0x949df68) at ../../../kwin/effects/presentwindows/presentwindows.cpp:1492
#32 KWin::PresentWindowsEffect::setActive (this=0x949df68, active=true) at ../../../kwin/effects/presentwindows/presentwindows.cpp:1477
#33 0x048883e9 in toggleActiveAllDesktops (this=<optimized out>) at ../../../kwin/effects/presentwindows/presentwindows.h:197
#34 KWin::PresentWindowsEffect::borderActivated (this=0x949df68, border=KWin::ElectricTopLeft) at ../../../kwin/effects/presentwindows/presentwindows.cpp:516
#35 0x00e2a91d in qt_static_metacall (_a=0xbfe1ac88, _o=0x949df68, _c=<optimized out>, _id=<optimized out>) at ./kwineffects.moc:51
#36 KWin::Effect::qt_static_metacall (_o=0x949df68, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfe1ac88) at ./kwineffects.moc:45
#37 0x07759c3d in QMetaMethod::invoke (this=0xbfe1adec, object=0x949df68, connectionType=Qt::DirectConnection, returnValue=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1664
#38 0x0775c24f in QMetaObject::invokeMethod (obj=0x949df68, member=0x9c35a40 "borderActivated", type=Qt::AutoConnection, ret=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1179
#39 0x00abe39e in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., val4=..., val3=..., val2=..., val1=..., val0=..., ret=..., member=<optimized out>, obj=<optimized out>) at /usr/include/qt4/QtCore/qobjectdefs.h:401
#40 KWin::Edge::handleByCallback (this=0x94a3b38) at ../../kwin/screenedge.cpp:222
#41 0x00abe7c0 in KWin::Edge::handle (this=0x94a3b38, cursorPos=...) at ../../kwin/screenedge.cpp:181
#42 0x00abe883 in check (forceNoPushBack=false, triggerTime=..., cursorPos=..., this=0x94a3b38) at ../../kwin/screenedge.cpp:135
#43 KWin::Edge::check (this=0x94a3b38, cursorPos=..., triggerTime=..., forceNoPushBack=false) at ../../kwin/screenedge.cpp:125
#44 0x00ac0118 in KWin::ScreenEdges::handleEnterNotifiy (this=0x9557958, window=69848753, point=..., timestamp=...) at ../../kwin/screenedge.cpp:1011
#45 0x00ac02ef in KWin::ScreenEdges::isEntered (this=0x9557958, e=0xbfe1b61c) at ../../kwin/screenedge.cpp:976
#46 0x009fbcaa in KWin::Workspace::workspaceEvent (this=0x9531080, e=0xbfe1b61c) at ../../kwin/events.cpp:306
#47 0x009ec0c2 in KWin::Application::x11EventFilter (this=0xbfe1b84c, e=0xbfe1b61c) at ../../kwin/main.cpp:422
#48 0x017cf454 in qt_x11EventFilter (ev=0xbfe1b61c) at kernel/qapplication_x11.cpp:441
#49 qt_x11EventFilter (ev=0xbfe1b61c) at kernel/qapplication_x11.cpp:429
#50 0x017df127 in QApplication::x11ProcessEvent (this=0xbfe1b84c, event=0xbfe1b61c) at kernel/qapplication_x11.cpp:3444
#51 0x0180d9f8 in QEventDispatcherX11::processEvents (this=0x941f150, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#52 0x0774f6ad in QEventLoop::processEvents (this=0xbfe1b7a4, flags=...) at kernel/qeventloop.cpp:149
#53 0x0774f949 in QEventLoop::exec (this=0xbfe1b7a4, flags=...) at kernel/qeventloop.cpp:204
#54 0x0775534a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#55 0x017519c4 in QApplication::exec () at kernel/qapplication.cpp:3817
#56 0x009ef1ae in kdemain (argc=3, argv=0xbfe1baf4) at ../../kwin/main.cpp:597
#57 0x0804850b in main (argc=3, argv=0xbfe1baf4) at kwin_dummy.cpp:3

Reported using DrKonqi
Comment 1 Thomas Lübking 2014-01-22 20:06:52 UTC
PlasmaComponents / Units connects some "themeChanged()" to itself and the SLOT is 0x0 ...

Seems some memory corruption.

-> did you resume from suspend to ram (important) or really just woke up yourself?
-> did you by any chance recently update the system?
Comment 2 andy_90254 2014-01-23 04:16:41 UTC
I meant I myself slept - meaning I didn't touch the computer for at least 6 hours.  I leave it on 24/7.  No suspensions.

I update the system multiple times per day if there are packages available.  I use Muon Update Manager.  I'm attaching 3 files.  A list of packages I have installed, their dependencies, and their reverse dependencies.  Maybe you'll spot something out of the ordinary.

Thank you
Comment 3 andy_90254 2014-01-23 04:20:44 UTC
Created attachment 84810 [details]
Installed packages
Comment 4 andy_90254 2014-01-23 04:22:04 UTC
Created attachment 84811 [details]
Package Dependencies
Comment 5 andy_90254 2014-01-23 08:59:34 UTC
Created attachment 84812 [details]
Reverse Dependencies

OK, I've tried 5 times now.  It simply will not let me upload the third file.  It seems to upload it, then it tells me web page not available. So I'm zipping it up on the assumption that it's simply too large.
Comment 6 Thomas Lübking 2014-01-23 14:49:37 UTC
(In reply to comment #2)
> I update the system multiple times per day if there are packages available. 
> I use Muon Update Manager.

I doubt you'll be able to recreate this backtrace?

We've plenty of "weird" memory corruption crash reports (not only affecting KWin) after running updates on Ubuntu, see eg. #296316

It seems as if (the Ubuntu variant of ) dpkg  to truncate and override files (basically uses "cp" instead of "install") what means that if a process fetches more data from a mmaped library, it will read random junk from the disk - what would fit this backtrace.

if "ls -i /path/to/not_symlink" prints the same number before and after the update of a not_symlink (different md5sum)

In case, this means that you more or less need to restart any non statically linked process after it or one of it's dependencies are updated.
Comment 7 andy_90254 2014-01-23 23:49:30 UTC
>> I doubt you'll be able to recreate this backtrace?

I don't know, but I have a variety of programs that crash randomly.  Konsole crashed when I ran  "konsole --version" as root (but not as regular user).  That's repeatable.  Running it as a regular user but with sudo does NOT crash.  I can't make kwin crash on demand, it's random.

Other randomly crashing programs include LibreOffice, Kontact, Krunner, Konversation, apport-KDE, jitsi, chrome, thunderbird, sflphone and maybe others.  Frequency of crash varies.  I've had some of these programs (Konversation, LibreOffice) crash 5 times in an hour, then not at all for days or weeks.  The others mentioned only crash once in a while.

I have about 3 stack traces saved if you're interested.

I don't understand these two comments (what number are you referring to?):

>> if "ls -i /path/to/not_symlink" prints the same number before and after the update of a not_symlink (different md5sum)

Can you specify a specific file I should track?

Random file with symlink:
  lrwxrwxrwx  1 root          root            18 Jan  1 04:25 python-support -> /usr/lib/pymodules/

Do you mean the 1?  Or the 18?  Or do you mean the md5sum?  Or something else?

>> In case, this means that you more or less need to restart any non statically linked process after it or one of it's dependencies are updated.

If I understand what you're saying, then once the program crashes - then the next time the program runs it shouldn't crash again - since it has been restarted.

For the record, I have a brand new disk I received today, that I was planning on using to clone my current setup.  However, I was also thinking that in light of these crashes, maybe I should install it fresh, perhaps use rsync... the choices are wide open - and I'm happy to use whatever method you think might help debug this.  I installed the current setup using the mini-iso and debootstrap, and followed up with apt-get install kubuntu-desktop.  Followed up by adding various repos and programs, the "final" result of which you see in the previous attachments.  I did it that way because I only have 700MB CDs, and the full install ISO wouldn't fit.... 

Open to ideas here...

I'm also happy to give you a login to take a look around... whatever you need to get this resolved.

Thank you
Comment 8 Thomas Lübking 2014-01-24 00:35:20 UTC
(In reply to comment #7)
> I don't know, but I have a variety of programs that crash randomly.  Konsole
> crashed when I ran  "konsole --version" as root (but not as regular user). 
> That's repeatable.  Running it as a regular user but with sudo does NOT
> crash. 
Processes of different users can not share (mmapped) library memory (that would be a major security flaw), but pollution of mmapped memory should only affect running processes (unless maybe for also broken timestamps)

> I have about 3 stack traces saved if you're interested.
Post'em - but frequent crashes all over the place are indeed very suspicious.
Eg. I can frankly not recall the last crash (that I didn't cause myself during development) - in any client.
If you can make "konsole --version" crash and cause backtraces at will, dump two or three of them to see whether they're equal.

> Do you mean the 1?  Or the 18?  Or do you mean the md5sum?  Or something
> else?
The inode is the position of a file on the harddrive.
   $ ls -i /usr/lib/libQtCore.so.4.8.5
   552532 /usr/lib/libQtCore.so.4.8.5*
   ^^^^^^ <- that number, passing "-i" to ls is the relevant bit

You shall *not* inspect a symlink, eg.
   $ ls -i /usr/lib/libQtCore.so 
   552438 /usr/lib/libQtCore.so@
because the symlink itself is not relevant to the linker.

Assume you updated qt-4
This would write an update to /usr/lib/libQtCore.so.4.8.5, therefore the inode of this file really should change. If it does not, that's crash prone.

The actual library to check would of course depend on the package you actually updated.

> If I understand what you're saying, then once the program crashes - then the
> next time the program runs it shouldn't crash again - since it has been
> restarted.
Not for this reason, yes.
Random crashes in various applications using even different toolkits would then suggest a bug in a very fundamental library, linked by all those applications (eg. libX11 or libfreetype, maybe libGL)

> However, I was also thinking that in light of these crashes, maybe I should 
> install it fresh, perhaps use rsync... the choices are wide open
Iff indeed the files are systematically truncated and re-used on updates, the way you install initially doesn't matter. They'd get corrupted on every subsequent update.

> and I'm happy to use whatever method you think might help debug this.
Valgrind.
The only reliable way to debug the source of memory corruptions.
Comment 9 andy_90254 2014-01-24 04:52:31 UTC
________________________________
 


> I have about 3 stack traces saved if you're interested.
Post'em - but frequent crashes all over the place are indeed very suspicious.
Eg. I can frankly not recall the last crash (that I didn't cause myself during
development) - in any client.

I'll attach the files I saved.

> If you can make "konsole --version" crash and cause backtraces at will, dump
two or three of them to see whether they're equal.

I don't get backtraces.... I get coredumps.  Or so it implies:

konsole --version
No protocol specified
No protocol specified
Segmentation fault (core dumped)
Problem is, I can't find the actual core.  I'll attach results of a find.


> Do you mean the 1?  Or the 18?  Or do you mean the md5sum?  Or something
> else?
The inode is the position of a file on the harddrive.
   $ ls -i /usr/lib/libQtCore.so.4.8.5
   552532 /usr/lib/libQtCore.so.4.8.5*
   ^^^^^^ <- that number, passing "-i" to ls is the relevant bit

Right.  I thought it was a lower case L, which is why I couldn't understand what you were saying.

Assume you updated qt-4
This would write an update to /usr/lib/libQtCore.so.4.8.5, therefore the inode
of this file really should change. If it does not, that's crash prone.

That I didn't know.

The actual library to check would of course depend on the package you actually
updated.

The following is waiting for me to update it.  So, what file should I check its inode?

 
Version 3.15.4-0ubuntu0.12.04.1:
This update was issued on 01/22/14 07:16 AM
* SECURITY UPDATE: MITM attack via TLS False Start
- CVE-2013-1740
* Adjusted packaging for new upstream release 3.15.4:
- debian/patches/*: refreshed.
- debian/libnss3.symbols: added new symbols.
> Random crashes in various applications using even different toolkits would then
suggest a bug in a very fundamental library, linked by all those applications
(eg. libX11 or libfreetype, maybe libGL)

I'm reasonably sure I didn't have this problem prior to installing kubuntu-desktop.

> and I'm happy to use whatever method you think might help debug this.
Valgrind.
The only reliable way to debug the source of memory corruptions.

I can run valgrind against the konsole program....  what options would you like me to give it?
Comment 10 andy_90254 2014-01-24 04:56:29 UTC
Created attachment 84823 [details]
Results of find core.
Comment 11 andy_90254 2014-01-24 05:06:07 UTC
Created attachment 84824 [details]
valgrind with konsole

I ran valgrind --leak-check=yes konsole --version
Comment 12 andy_90254 2014-01-24 05:22:05 UTC
Created attachment 84825 [details]
stacktrace for Kontact crash
Comment 13 andy_90254 2014-01-24 05:28:11 UTC
TypeError: prepare() takes no arguments (1 given)
self.pyrunner.prepare()
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyrunner.py", line 78, in prepare
krunner crashed with TypeError in prepare(): prepare() takes no arguments (1 given)
 kde-workspace-bin 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 [origin: LP-PPA-kubuntu-ppa-backports]
The problem cannot be reported:  This is not an official Ubuntu package. Please remove any third party package and try again
Comment 14 andy_90254 2014-01-24 05:29:59 UTC
Krunner crash.

TypeError: prepare() takes no arguments (1 given)
self.pyrunner.prepare()
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyrunner.py", line 78, in prepare
krunner crashed with TypeError in prepare(): prepare() takes no arguments (1 given)
 kde-workspace-bin 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 [origin: LP-PPA-kubuntu-ppa-backports]
The problem cannot be reported:  This is not an official Ubuntu package. Please remove any third party package and try again
Comment 15 andy_90254 2014-01-24 05:42:30 UTC
I don't know if this is relevant, but at this very moment I'm  unable to interact with icons on my desktop.  If a program is already running, then I can type and mouse in it.  I can switch virtual desktops and use things in the task bar and type in windows already open such as this one.  But I'm unable to start anything new - from the desktop.  I have 6 virtual desktops active.  I CAN start programs from the K menu.
Comment 16 andy_90254 2014-01-24 06:14:48 UTC
Klipper crash: https://bugs.kde.org/show_bug.cgi?id=330125

sflphone crash:

I tried to copy & paste a phone number in LibreOffice Calc, into the dialing field.  I copied it from the "formula bar" in Calc, and used my mouse wheel to paste - by clicking it.  Yes, my mouse wheel clicks.  I think, but am not positive, that it's the same as clicking both left and right mouse buttons on other mice.

Application: SFLphone KDE Client (sflphone-client-kde), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb7791740 (LWP 15362))]

Thread 2 (Thread 0xb4e01b40 (LWP 15393)):
#0 0x00e32416 in __kernel_vsyscall ()
#1 0x088b2460 in poll () from /lib/i386-linux-gnu/libc.so.6
#2 0x01cd8a3b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3 0x01ccb06e in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4 0x01ccb1c1 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5 0x047dcde7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#6 0x047a86ad in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#7 0x047a8949 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#8 0x04691a1c in QThread::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#9 0x04785cfd in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#10 0x04694eb0 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#11 0x00ec6d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#12 0x088c0bae in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb7791740 (LWP 15362)):
[KCrash Handler]
#7 0x046e1bd0 in QString::left(int) const () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#8 0x00b8f44d in NumberCompletionModel::getRange(QMap<QString, PhoneDirectoryModel::NumberWrapper*>, QString const&, QSet<PhoneNumber*>&) () from /usr/lib/libqtsflphone.so.1.3.0
#9 0x00b8fab1 in NumberCompletionModel::locateNameRange(QString const&, QSet<PhoneNumber*>&) () from /usr/lib/libqtsflphone.so.1.3.0
#10 0x00b8fbac in NumberCompletionModel::updateModel() () from /usr/lib/libqtsflphone.so.1.3.0
#11 0x00b8ff88 in NumberCompletionModel::setPrefix(QString const&) () from /usr/lib/libqtsflphone.so.1.3.0
#12 0x00bb67d4 in ?? () from /usr/lib/libqtsflphone.so.1.3.0
#13 0x047c0bb1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#14 0x00bb0165 in Call::dialNumberChanged(QString const&) () from /usr/lib/libqtsflphone.so.1.3.0
#15 0x00b29209 in Call::setDialNumber(QString const&) () from /usr/lib/libqtsflphone.so.1.3.0
#16 0x080a09ae in ?? ()
#17 0x047c0bb1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#18 0x014a04b5 in QLineEdit::textChanged(QString const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#19 0x014a0877 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#20 0x047c0bb1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#21 0x01751dc5 in QLineControl::textChanged(QString const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#22 0x014a5b3a in QLineControl::finishChange(int, bool, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#23 0x014a79c5 in QLineControl::insert(QString const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0x0149fb9c in QLineEdit::insert(QString const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0x014a0210 in QLineEdit::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0x003d25b4 in KLineEdit::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#27 0x0106fffc in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0x0149e60b in QLineEdit::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0x003d1de2 in KLineEdit::event(QEvent*) () from /usr/lib/libkdeui.so.5
#30 0x01015df4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0x0101be74 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#32 0x002fd161 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#33 0x0807c440 in _start ()
Comment 17 andy_90254 2014-01-24 06:32:36 UTC
A while back one of the developers for sflphone kde client, was kind enough to take a look around my system, and told me that his code was tickling a bug in DBUS - and subsequently killing my system.  He changed his code to no longer tickle the bug.  

I reported his comments, but i don't know if anything was ever done about it.  I saw massive updates come down soon after reporting it, but I don't know if it was related or not.   My system "got better", but I don't know if it was a result of his changes to his code to no longer tickle the bug,  or if someone fixed something in DBUS - or both.  I have no idea if that bug in DBUS still exists or not or if it's in any way related.
Comment 18 andy_90254 2014-01-26 07:09:37 UTC
I've been thinking about this, and it seems to me that if  
>> (the Ubuntu variant of ) dpkg  to truncate and override files (basically uses "cp" instead of "install")
then EVERYONE would be seeing these crash problems.

I have determined the following.  I have 4 different versions of libqtcore4 installed:

Package: libqtcore4
Version: 4:4.8.2+dfsg-2ubuntu1~precise1~ppa6
Package: libqtcore4
Version: 4:4.8.1-0ubuntu4.6
Package: libqtcore4
Version: 4:4.8.1-0ubuntu4.5
Package: libqtcore4
Version: 4:4.8.1-0ubuntu4

Is this in any way normal?  Could this possibly be part of the problem?
Comment 19 Thomas Lübking 2014-01-26 14:56:56 UTC
(In reply to comment #18)
> then EVERYONE would be seeing these crash problems.
a) right after an update
b) for processes running during the update
c) and load so far unused parts of the library into memory (do sth. they've not done before)

All I can say for sure for the moment is that there is an unusually high amount of Ubuntu users reporting "i updated and then KDE suddenly crashed"

This does however not hold in your particular case, since the crashes apparently affect processes that started after the update.

> I have determined the following.  I have 4 different versions of libqtcore4
> installed:
>  ......
> Is this in any way normal?
No - certainly not.

Could this possibly be part of the problem?
"Possibly". Despite Qt being ABI stable some QtGui function could try to access some internal funtion/member that's only present in eg. QtCore 4.8.2 but resolves 4.8.1 and this way causes memory corruption.
It also seems fishy that there's "ubuntu4, ubuntu4.5 and ubuntu4.6" - sounds as if Ubuntu had introduces binary incompatible downstream patches and then you're really in trouble.

On a wider aspect, this should really be impossible because the packages should conflict.

On the provided crashes:
----------
Kontact crashes on QObject deconstruction from some "todo" plugin. From there in QStyleSheetStyle and then QHash - this crosses QtGui -> QtCore, but that doesn't mean anything.

Slphone is hard to say - it crashes in QString::left what either means a memory corruption or a dangeling QString pointer in slphone (the trace doesn't tell that)

Konsole crashes in an exotic codepath, because there's no QX11Info::display(), ie. compositingActive() has been called before or after the lifetime of a QApplication instance - what is strange enough alone.
The crash is however in the most common function of KWindowSystem - if it was buggy, the entire system (except esp. kwin, as it can not use this module) would do nothing but segfault all the time.

Overmore it seems to happen in sprintf() and apparently because the Display parameter is apparently NULL what means that XOpenDisplay failed.

Long story short:
The typical way to get to this was that konsole lacks the DISPLAY environment, eg. was started from VT1 or such.
(Whether or not that codepath would be unsecured and pot. triggered by konsole, i can't say)

However, if DISPLAY was unknown, *NO* GUI process could ever run in this environment (since it would not know "where" to run), so i assume this is due to a specific way how konsole is started.

FYI: "core dumped" means that the memory has been written to "some" file, it does not imply anything about the filename (usually it's the process name and the PID)
Comment 20 andy_90254 2014-01-26 20:06:08 UTC
OK I can probably clear up the mystery on the DISPLAY parameter.  First, I login through KDE/plasma as a regular user (apb).  Then, I open several Konsole windows/terminals from my desktop.  Then
I "sudo -i" in some of them - and that's where I'm starting Konsole when I get the crash.  I imagine there's some conflict with the permissions on the window system when I try to start Konsole as root.  DISPLAY is set to ":0" in both instances (apb & root).
Comment 21 Thomas Lübking 2014-01-26 20:29:21 UTC
Yes, but you've no permission to access it.

Other clients will quit by "cannot connect to X server :0", but i can confirm konsole to segfault (so it will likely try to access the compositing state before opening a QtApplication and w/o checking whether it can access the X11 server)

Running a KDE application as different user will require some setup (environment/permissions)
In general, just use "kdesu" to launch a KDE application as root/other user, but in the case of konsole, rather DO NOT!

Instead, create a new profile ("rootshell"), make "sudo -i" the command and launch "konsole --profile rootshell" - this will prevent the GUI process to run with root permissions for no reason.
Comment 22 andy_90254 2014-01-26 20:50:12 UTC
I appreciate the workaround (assuming I can remember it later...)

The one and only reason I ran konsole as root, was to find the version strings.  I simply picked a random open terminal window and was surprised that it crashed... since there seems to be a pattern of crashing I thought you might find it useful information in determining what the heck is going on.

>> It also seems fishy that there's "ubuntu4, ubuntu4.5 and ubuntu4.6" - sounds as if Ubuntu had introduces binary incompatible downstream patches and then you're really in trouble.
>> On a wider aspect, this should really be impossible because the packages should conflict.

Have you checked out the attachments I posted regarding installed packages & dependencies?  There IS conflict.
Comment 23 Thomas Lübking 2014-01-27 21:30:43 UTC
(In reply to comment #22)
> Have you checked out the attachments I posted regarding installed packages &
> dependencies?  There IS conflict.
Yes, but
a) I can't see the conflict (not using dpkg, what am i looking for?)
b) would expect that the conflict had forbidden the installation of the package - as that's the point of a conflict...
Comment 24 andy_90254 2014-01-28 01:08:53 UTC
Search for the pattern "Conflict".
Comment 25 andy_90254 2014-01-28 05:23:29 UTC
I apologize, I gave you false information.  I should have given you complete info. so that you could correct my mistake from the start.  The following is the complete info.

apt-cache policy libqtcore4
libqtcore4:
Installed: 4:4.8.2+dfsg-2ubuntu1~precise1~ppa6
Candidate: 4:4.8.2+dfsg-2ubuntu1~precise1~ppa6
Version table:
*** 4:4.8.2+dfsg-2ubuntu1~precise1~ppa6 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
100 /var/lib/dpkg/status
4:4.8.1-0ubuntu4.6 0
500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
4:4.8.1-0ubuntu4.5 0
500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
4:4.8.1-0ubuntu4 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages

As you can see, I actually have version 4:4.8.2+dfsg-2ubuntu1~precise1~ppa6 installed. The others listed are what are still in the repository; which is what I didn't understand when I posted the original statement.

Now the following statement is highly confusing to me:
~~~~~~~~~~~~~~~~~~~~
Harald Sitter 2014-01-15 14:01:27 UTC
The reason in that case is: Last someone (not me) checked, KDE did not claim to support Qt versions released after the release of a given KDE SC version (in fact I seem to recall an incident where mixing  a newer Qt maintenance release with an older plasma-desktop release actually went south). Or more generally put, because changing the entire version of a toolkit library has too great potential to go wrong only selective fix backporting is done. So, since Kubuntu 12.04 contains KDE SC 4.8 it uses Qt 4.8.1.

On that note, the report is definitely not from an actually supported Kubuntu 12.04 because it indicates Qt 4.8.2... handling this in the new downstream report though.
~~~~~~~~~~~~~~~~~

As you can see, Harald claims Qt 4.8.2 is NOT supported and yet that is what the backport repository contains.  As nobody seems to know why all of these programs are crashing, I'm willing to believe that this could be one of the reasons.  What remains to be determined, is why the repo contains a non-supported library, why it was installed on my system, what installed it and whether I should remove it.  

And of course - is this library the reason for the crashes?  And finally, what other backports lurk on my system that are unsupported and should probably not have been installed if in fact they are any part of the reason for all of these crashes?
Comment 26 Martin Flöser 2016-08-29 07:08:00 UTC
The code in question changed a lot with Plasma 5 due to the change from QtQuick 1 to QtQuick 2. Also the Plasma Theme, which is a null slot here, is no longer a singleton class. This means overall that the crash cannot happen on latest version any more.

If you can still see such a crash with Plasma 5 please provide a new backtrace.