Bug 266032 - Kwrite crashes when called from root konsole cli
Summary: Kwrite crashes when called from root konsole cli
Status: RESOLVED DUPLICATE of bug 246404
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 272793 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-10 23:00 UTC by Dave Plater
Modified: 2011-05-08 22:16 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (1.64 KB, text/plain)
2011-02-16 16:47 UTC, Bzzz
Details
New crash information added by DrKonqi (1.64 KB, text/plain)
2011-02-16 16:47 UTC, Bzzz
Details
New crash information added by DrKonqi (1.64 KB, text/plain)
2011-02-16 16:47 UTC, Bzzz
Details
New crash information added by DrKonqi (1.65 KB, text/plain)
2011-03-20 13:40 UTC, Waldemar Haag
Details
New crash information added by DrKonqi (1.67 KB, text/plain)
2011-03-24 13:42 UTC, Unknown
Details
New crash information added by DrKonqi (1.71 KB, text/plain)
2011-04-10 23:28 UTC, jose maturana
Details
New crash information added by DrKonqi (2.29 KB, text/plain)
2011-04-19 14:15 UTC, paschuller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Plater 2011-02-10 23:00:38 UTC
Application: kwrite (4.6.00 (4.6.0))
KDE Platform Version: 4.6.00 (4.6.0)
Qt Version: 4.7.1
Operating System: Linux 2.6.34.7-0.7-desktop x86_64
Distribution: "openSUSE 11.3 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
I wanted to open the new macros.python so from a root konsole (I could have and should have used user kwrite I only wanted to examine) I did :

Arbuthnot:/etc/rpm # /usr/bin/kwrite macros.python3
kwrite(8032): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 

KCrash: Application 'kwrite' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-Arbuthnot/kdeinit4__0

[1]+  Stopped                 /usr/bin/kwrite macros.python3
Arbuthnot:/etc/rpm #

-- Backtrace:
Application: KWrite (kwrite), signal: Aborted
[KCrash Handler]
#6  0x00007f89753969e5 in raise () from /lib64/libc.so.6
#7  0x00007f8975397ee6 in abort () from /lib64/libc.so.6
#8  0x00007f8972e73864 in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>) at global/qglobal.cpp:2282
#9  0x00007f89747327de in QDebug::~QDebug (this=0x7fff22a40180, __in_chrg=<value optimized out>) at /usr/include/QtCore/qdebug.h:85
#10 0x00007f89746c9e72 in KApplicationPrivate::init (this=<value optimized out>, GUIenabled=<value optimized out>) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:514
#11 0x00007f89746caf89 in KApplication::KApplication (this=0x7fff22a40320, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:352
#12 0x00007f89756d65f8 in ?? () from /usr/lib64/libkdeinit4_kwrite.so
#13 0x00007f89756d30e9 in kdemain () from /usr/lib64/libkdeinit4_kwrite.so
#14 0x00007f8975382b7d in __libc_start_main () from /lib64/libc.so.6
#15 0x0000000000400699 in _start ()

This bug may be a duplicate of or related to bug 246404.

Possible duplicates by query: bug 246404.

Reported using DrKonqi
Comment 1 Dario Andres 2011-02-12 17:20:11 UTC
[Comment from a bug triager]
See https://bugs.kde.org/show_bug.cgi?id=246404#c3
Regards
Comment 2 Dave Plater 2011-02-12 19:30:27 UTC
My kdesu kwrite run as root works fine and that is what I normally use for stuff that needs root privileges or mcedit from a root console but you need to put a block on kwrite starting from a root console if it causes a crash.

As for kde#246404 I searched novell bugzilla and didn't find anything to match the reporters complaint.
I used to run kde3.0 or somewhere around that version, there was a pretty wallpaper with bombs, as root with SuSE 7.3 out of need.
Comment 3 Bzzz 2011-02-16 16:47:03 UTC
Created attachment 57302 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0)) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:

opened sudo kwrite from console, which crashed instantly

-- Backtrace (Reduced):
#9  0x00007fccb9ac598d in QDebug::~QDebug (this=0x7fff23ce7550, __in_chrg=<value optimized out>) at /usr/include/qt4/QtCore/qdebug.h:85
#10 0x00007fccb9ba7053 in KApplicationPrivate::init (this=0x1682ee0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:514
#11 0x00007fccb9ba8008 in KApplication::KApplication (this=0x7fff23ce76b0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:352
#12 0x00007fccbac97ce6 in KWriteApp::KWriteApp (this=0x7fff23ce76b0, m_args=0x1641c60) at ../../../apps/kwrite/kwriteapp.cpp:31
#13 0x00007fccbac94936 in kdemain (argc=2, argv=<value optimized out>) at ../../../apps/kwrite/kwritemain.cpp:676
Comment 4 Bzzz 2011-02-16 16:47:06 UTC
Created attachment 57303 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0)) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:

opened sudo kwrite from console, which crashed instantly

-- Backtrace (Reduced):
#9  0x00007fccb9ac598d in QDebug::~QDebug (this=0x7fff23ce7550, __in_chrg=<value optimized out>) at /usr/include/qt4/QtCore/qdebug.h:85
#10 0x00007fccb9ba7053 in KApplicationPrivate::init (this=0x1682ee0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:514
#11 0x00007fccb9ba8008 in KApplication::KApplication (this=0x7fff23ce76b0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:352
#12 0x00007fccbac97ce6 in KWriteApp::KWriteApp (this=0x7fff23ce76b0, m_args=0x1641c60) at ../../../apps/kwrite/kwriteapp.cpp:31
#13 0x00007fccbac94936 in kdemain (argc=2, argv=<value optimized out>) at ../../../apps/kwrite/kwritemain.cpp:676
Comment 5 Bzzz 2011-02-16 16:47:06 UTC
Created attachment 57304 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0)) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:

opened sudo kwrite from console, which crashed instantly

-- Backtrace (Reduced):
#9  0x00007fccb9ac598d in QDebug::~QDebug (this=0x7fff23ce7550, __in_chrg=<value optimized out>) at /usr/include/qt4/QtCore/qdebug.h:85
#10 0x00007fccb9ba7053 in KApplicationPrivate::init (this=0x1682ee0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:514
#11 0x00007fccb9ba8008 in KApplication::KApplication (this=0x7fff23ce76b0, GUIenabled=true) at ../../kdeui/kernel/kapplication.cpp:352
#12 0x00007fccbac97ce6 in KWriteApp::KWriteApp (this=0x7fff23ce76b0, m_args=0x1641c60) at ../../../apps/kwrite/kwriteapp.cpp:31
#13 0x00007fccbac94936 in kdemain (argc=2, argv=<value optimized out>) at ../../../apps/kwrite/kwritemain.cpp:676
Comment 6 Waldemar Haag 2011-03-20 13:40:33 UTC
Created attachment 58189 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0) "release 6") on KDE Platform 4.6.00 (4.6.0) "release 6" using Qt 4.7.1

- What I was doing when the application crashed:

I also opened kwrite in the console as root and kwrite crashed right away.

-- Backtrace (Reduced):
#9  0x00007fc0af29430e in QDebug::~QDebug (this=0x7fff9c4ec230, __in_chrg=<value optimized out>) at /usr/include/QtCore/qdebug.h:85
#10 0x00007fc0af22e182 in KApplicationPrivate::init (this=<value optimized out>, GUIenabled=<value optimized out>) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:514
#11 0x00007fc0af22f279 in KApplication::KApplication (this=0x7fff9c4ec3d0, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:352
#12 0x00007fc0b02365f8 in KWriteApp::KWriteApp (this=0x7fff9c4ec3d0, m_args=0x627c20) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwriteapp.cpp:31
#13 0x00007fc0b02330e9 in kdemain (argc=1, argv=0x7fff9c4eceb8) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwritemain.cpp:676
Comment 7 Unknown 2011-03-24 13:42:14 UTC
Created attachment 58306 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0) "release 6") on KDE Platform 4.6.00 (4.6.0) "release 6" using Qt 4.7.1

- What I was doing when the application crashed:

As user running a konsole terminal, opened root session by saying "su"

-- Backtrace (Reduced):
#11 0xb725cbb0 in QDebug::~QDebug (this=0xbfd2e520, __in_chrg=<value optimized out>) at /usr/include/QtCore/qdebug.h:85
#12 0xb71e83c0 in KApplicationPrivate::init (this=0x80a2960, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:514
#13 0xb71e95a4 in KApplication::KApplication (this=0xbfd2e640, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:352
#14 0xb77e3552 in KWriteApp::KWriteApp (this=0xbfd2e640, m_args=0x80689a8) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwriteapp.cpp:31
#15 0xb77df6db in kdemain (argc=1, argv=0xbfd2e994) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwritemain.cpp:676
Comment 8 jose maturana 2011-04-10 23:28:14 UTC
Created attachment 58784 [details]
New crash information added by DrKonqi

kwrite (4.6.00 (4.6.0) "release 6") on KDE Platform 4.6.00 (4.6.0) "release 6" using Qt 4.7.1

- What I was doing when the application crashed:
Launching kwrite from cli as root user. 

Usually. it should returns a message showing that this process cannot be launched, not a crash
As usual, launching this from "su -"  works fine.

-- Backtrace (Reduced):
#9  0x00007f457f2ac30e in QDebug::~QDebug (this=0x7fff373b4b50, __in_chrg=<value optimized out>) at /usr/include/QtCore/qdebug.h:85
#10 0x00007f457f246182 in KApplicationPrivate::init (this=<value optimized out>, GUIenabled=<value optimized out>) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:514
#11 0x00007f457f247279 in KApplication::KApplication (this=0x7fff373b4cf0, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.0/kdeui/kernel/kapplication.cpp:352
#12 0x00007f458024e5f8 in KWriteApp::KWriteApp (this=0x7fff373b4cf0, m_args=0x627c20) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwriteapp.cpp:31
#13 0x00007f458024b0e9 in kdemain (argc=2, argv=0x7fff373b57d8) at /usr/src/debug/kdebase-4.6.0/apps/kwrite/kwritemain.cpp:676
Comment 9 paschuller 2011-04-19 14:15:20 UTC
Created attachment 59131 [details]
New crash information added by DrKonqi

kwrite (4.6.2 (4.6.2) "release 3") on KDE Platform 4.6.2 (4.6.2) "release 3" using Qt 4.7.2

- What I was doing when the application crashed:

working as user, opened terminal console, launched 'su', root shell is bash, launched 'kwrite'

terminal error message: 
kwrite(4327): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 

KCrash: Application 'kwrite' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-<mymachinename>/kdeinit4__0


KDE information from 'kwin -v':
Qt: 4.7.2
KDE Development Platform: 4.6.2 (4.6.2) "release 3"
KWin: 4.6.2 (4.6.2) "release 3"

installed from community supported repositories mentioned at http://en.opensuse.org/KDE_repositories#Upstream_release_aka._KR46_.28KDE_SC_4.6.29 (stable versions)

-- Backtrace (Reduced):
#11 0xb72eb0f0 in QDebug::~QDebug (this=0xbfabb720, __in_chrg=<value optimized out>) at /usr/include/QtCore/qdebug.h:85
#12 0xb7276740 in KApplicationPrivate::init (this=0x80dd258, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.2/kdeui/kernel/kapplication.cpp:516
#13 0xb7277924 in KApplication::KApplication (this=0xbfabb840, GUIenabled=true) at /usr/src/debug/kdelibs-4.6.2/kdeui/kernel/kapplication.cpp:352
#14 0xb7872552 in KWriteApp::KWriteApp (this=0xbfabb840, m_args=0x8068758) at /usr/src/debug/kdebase-4.6.2/kwrite/kwriteapp.cpp:31
#15 0xb786e6db in kdemain (argc=1, argv=0xbfabbb94) at /usr/src/debug/kdebase-4.6.2/kwrite/kwritemain.cpp:676
Comment 10 paschuller 2011-04-19 15:37:58 UTC
(In reply to comment #9)
> [...]
> 
> working as user, opened terminal console, launched 'su', root shell is bash,
> launched 'kwrite'
> 
> terminal error message: 
> kwrite(4327): Session bus not found 
> To circumvent this problem try the following command (with Linux and bash) 
> export $(dbus-launch) 
> 
> KCrash: Application 'kwrite' crashing...
> KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
> sock_file=/root/.kde4/socket-<mymachinename>/kdeinit4__0
> 
> [...]

Indeed, using 'su -' instead of 'su' made my problem disappear!

This seems to be a little known aspect of the su command. To spread the knowledge: 

https://bugzilla.novell.com/show_bug.cgi?id=655751#c12
https://bugzilla.novell.com/show_bug.cgi?id=682726
http://en.opensuse.org/SDB:Login_as_root#A_longer_terminal_session_as_root
http://forums.opensuse.org/forums/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/424498-become-su-terminal-howto.html
Comment 11 Dominik Haumann 2011-04-19 16:59:42 UTC
Solution is to use `su -` instead of su. Already reported in bug #246404.

*** This bug has been marked as a duplicate of bug 246404 ***
Comment 12 Dario Andres 2011-05-08 22:16:30 UTC
*** Bug 272793 has been marked as a duplicate of this bug. ***