Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus Konsole when --new-tab is used #4

Closed
wants to merge 1 commit into from
Closed

Focus Konsole when --new-tab is used #4

wants to merge 1 commit into from

Conversation

C0rn3j
Copy link

@C0rn3j C0rn3j commented Jul 27, 2020

Fixes https://bugs.kde.org/show_bug.cgi?id=421408
Thanks to @pontaoski for help with this!

Welp looks like PRs go to http://invent.kde.org

@C0rn3j C0rn3j closed this Jul 27, 2020
kdesysadmin pushed a commit that referenced this pull request Jun 5, 2024
…ation in some cases

happens only on rare ocassions when we try to emit some warning on
close, e.g. when the shell process crashed or terminated not savely

backtrace for such a case

Thread 1 (Thread 0x7f6ff288db00 (LWP 248665)):
[KCrash Handler]
#4  0x00007f6ff8a79efc in __pthread_kill_implementation () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#5  0x00007f6ff8a29e86 in raise () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#6  0x00007f6ff8a12935 in abort () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#7  0x00007f6ff904ec9c in qAbort() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#8  0x00007f6ff90974ae in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#9  0x00007f6ff904fa93 in QMessageLogger::fatal(char const*, ...) const () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#10 0x00007f6ff904ec06 in qt_assert(char const*, char const*, int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#11 0x00007f6fc444820e in Konsole::Emulation::receiveData (this=<optimized out>, text=<optimized out>, length=<optimized out>) at /home/cullmann/projects/kde/src/konsole/src/Emulation.cpp:227
#12 0x00007f6fc451fe05 in Konsole::Session::terminalWarning (this=this@entry=0x5613d3818900, message=...) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:426
#13 0x00007f6fc451c0db in Konsole::Session::done (this=0x5613d3818900, exitCode=<optimized out>, exitStatus=QProcess::CrashExit) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:1089
#14 0x00007f6ff9170f80 in void doActivate<false>(QObject*, int, void**) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#15 0x00007f6ff932ac08 in QProcess::finished(int, QProcess::ExitStatus) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#16 0x00007f6ff9338654 in QProcessPrivate::waitForFinished(QDeadlineTimer const&) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#17 0x00007f6ff932c897 in QProcess::waitForFinished(int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#18 0x00007f6ff9076542 in QProcess::~QProcess() [clone .cold] () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#19 0x00007f6fd4038c20 in KPtyProcess::~KPtyProcess (this=0x5613d1220ff0) at /home/cullmann/projects/kde/src/kpty/src/kptyprocess.cpp:87
#20 0x00007f6fc4462ef9 in Konsole::Pty::~Pty (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/Pty.cpp:77
#21 0x00007f6fc451b9c7 in Konsole::Session::~Session (this=0x5613d3818900) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:134
#22 0x00007f6fc451bc99 in Konsole::Session::~Session (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:130
#23 0x00007f6ff91627e7 in QObject::event(QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#24 0x00007f6ffa32ed21 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Widgets.so.6
#25 0x00007f6ff910de30 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#26 0x00007f6ff9111a41 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#27 0x00007f6ff9116d73 in QCoreApplication::exec() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#28 0x00005613cd0d7e53 in main (argc=1, argv=<optimized out>) at /home/cullmann/projects/kde/src/kate/apps/kate/main.cpp:537
kdesysadmin pushed a commit that referenced this pull request Jun 5, 2024
…ation in some cases

happens only on rare ocassions when we try to emit some warning on
close, e.g. when the shell process crashed or terminated not savely

backtrace for such a case

Thread 1 (Thread 0x7f6ff288db00 (LWP 248665)):
[KCrash Handler]
#4  0x00007f6ff8a79efc in __pthread_kill_implementation () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#5  0x00007f6ff8a29e86 in raise () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#6  0x00007f6ff8a12935 in abort () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#7  0x00007f6ff904ec9c in qAbort() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#8  0x00007f6ff90974ae in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#9  0x00007f6ff904fa93 in QMessageLogger::fatal(char const*, ...) const () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#10 0x00007f6ff904ec06 in qt_assert(char const*, char const*, int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#11 0x00007f6fc444820e in Konsole::Emulation::receiveData (this=<optimized out>, text=<optimized out>, length=<optimized out>) at /home/cullmann/projects/kde/src/konsole/src/Emulation.cpp:227
#12 0x00007f6fc451fe05 in Konsole::Session::terminalWarning (this=this@entry=0x5613d3818900, message=...) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:426
#13 0x00007f6fc451c0db in Konsole::Session::done (this=0x5613d3818900, exitCode=<optimized out>, exitStatus=QProcess::CrashExit) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:1089
#14 0x00007f6ff9170f80 in void doActivate<false>(QObject*, int, void**) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#15 0x00007f6ff932ac08 in QProcess::finished(int, QProcess::ExitStatus) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#16 0x00007f6ff9338654 in QProcessPrivate::waitForFinished(QDeadlineTimer const&) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#17 0x00007f6ff932c897 in QProcess::waitForFinished(int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#18 0x00007f6ff9076542 in QProcess::~QProcess() [clone .cold] () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#19 0x00007f6fd4038c20 in KPtyProcess::~KPtyProcess (this=0x5613d1220ff0) at /home/cullmann/projects/kde/src/kpty/src/kptyprocess.cpp:87
#20 0x00007f6fc4462ef9 in Konsole::Pty::~Pty (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/Pty.cpp:77
#21 0x00007f6fc451b9c7 in Konsole::Session::~Session (this=0x5613d3818900) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:134
#22 0x00007f6fc451bc99 in Konsole::Session::~Session (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:130
#23 0x00007f6ff91627e7 in QObject::event(QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#24 0x00007f6ffa32ed21 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Widgets.so.6
#25 0x00007f6ff910de30 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#26 0x00007f6ff9111a41 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#27 0x00007f6ff9116d73 in QCoreApplication::exec() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#28 0x00005613cd0d7e53 in main (argc=1, argv=<optimized out>) at /home/cullmann/projects/kde/src/kate/apps/kate/main.cpp:537
kdesysadmin pushed a commit that referenced this pull request Jun 5, 2024
…ation in some cases

happens only on rare ocassions when we try to emit some warning on
close, e.g. when the shell process crashed or terminated not savely

backtrace for such a case

Thread 1 (Thread 0x7f6ff288db00 (LWP 248665)):
[KCrash Handler]
#4  0x00007f6ff8a79efc in __pthread_kill_implementation () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#5  0x00007f6ff8a29e86 in raise () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#6  0x00007f6ff8a12935 in abort () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#7  0x00007f6ff904ec9c in qAbort() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#8  0x00007f6ff90974ae in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#9  0x00007f6ff904fa93 in QMessageLogger::fatal(char const*, ...) const () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#10 0x00007f6ff904ec06 in qt_assert(char const*, char const*, int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#11 0x00007f6fc444820e in Konsole::Emulation::receiveData (this=<optimized out>, text=<optimized out>, length=<optimized out>) at /home/cullmann/projects/kde/src/konsole/src/Emulation.cpp:227
#12 0x00007f6fc451fe05 in Konsole::Session::terminalWarning (this=this@entry=0x5613d3818900, message=...) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:426
#13 0x00007f6fc451c0db in Konsole::Session::done (this=0x5613d3818900, exitCode=<optimized out>, exitStatus=QProcess::CrashExit) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:1089
#14 0x00007f6ff9170f80 in void doActivate<false>(QObject*, int, void**) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#15 0x00007f6ff932ac08 in QProcess::finished(int, QProcess::ExitStatus) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#16 0x00007f6ff9338654 in QProcessPrivate::waitForFinished(QDeadlineTimer const&) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#17 0x00007f6ff932c897 in QProcess::waitForFinished(int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#18 0x00007f6ff9076542 in QProcess::~QProcess() [clone .cold] () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#19 0x00007f6fd4038c20 in KPtyProcess::~KPtyProcess (this=0x5613d1220ff0) at /home/cullmann/projects/kde/src/kpty/src/kptyprocess.cpp:87
#20 0x00007f6fc4462ef9 in Konsole::Pty::~Pty (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/Pty.cpp:77
#21 0x00007f6fc451b9c7 in Konsole::Session::~Session (this=0x5613d3818900) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:134
#22 0x00007f6fc451bc99 in Konsole::Session::~Session (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:130
#23 0x00007f6ff91627e7 in QObject::event(QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#24 0x00007f6ffa32ed21 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Widgets.so.6
#25 0x00007f6ff910de30 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#26 0x00007f6ff9111a41 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#27 0x00007f6ff9116d73 in QCoreApplication::exec() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#28 0x00005613cd0d7e53 in main (argc=1, argv=<optimized out>) at /home/cullmann/projects/kde/src/kate/apps/kate/main.cpp:537
kdesysadmin pushed a commit that referenced this pull request Jun 5, 2024
kill process before emulation, e.g. QProcess::finished will use _emulation
in some cases.  Happens only on rare ocassions when we try to emit
some warning on close, e.g. when the shell process crashed or
terminated not saved

backtrace for such a case

```
Thread 1 (Thread 0x7f6ff288db00 (LWP 248665)):
[KCrash Handler]
#4  0x00007f6ff8a79efc in __pthread_kill_implementation () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#5  0x00007f6ff8a29e86 in raise () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#6  0x00007f6ff8a12935 in abort () from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6
#7  0x00007f6ff904ec9c in qAbort() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#8  0x00007f6ff90974ae in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#9  0x00007f6ff904fa93 in QMessageLogger::fatal(char const*, ...) const () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#10 0x00007f6ff904ec06 in qt_assert(char const*, char const*, int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#11 0x00007f6fc444820e in Konsole::Emulation::receiveData (this=<optimized out>, text=<optimized out>, length=<optimized out>) at /home/cullmann/projects/kde/src/konsole/src/Emulation.cpp:227
#12 0x00007f6fc451fe05 in Konsole::Session::terminalWarning (this=this@entry=0x5613d3818900, message=...) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:426
#13 0x00007f6fc451c0db in Konsole::Session::done (this=0x5613d3818900, exitCode=<optimized out>, exitStatus=QProcess::CrashExit) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:1089
#14 0x00007f6ff9170f80 in void doActivate<false>(QObject*, int, void**) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#15 0x00007f6ff932ac08 in QProcess::finished(int, QProcess::ExitStatus) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#16 0x00007f6ff9338654 in QProcessPrivate::waitForFinished(QDeadlineTimer const&) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#17 0x00007f6ff932c897 in QProcess::waitForFinished(int) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#18 0x00007f6ff9076542 in QProcess::~QProcess() [clone .cold] () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#19 0x00007f6fd4038c20 in KPtyProcess::~KPtyProcess (this=0x5613d1220ff0) at /home/cullmann/projects/kde/src/kpty/src/kptyprocess.cpp:87
#20 0x00007f6fc4462ef9 in Konsole::Pty::~Pty (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/Pty.cpp:77
#21 0x00007f6fc451b9c7 in Konsole::Session::~Session (this=0x5613d3818900) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:134
#22 0x00007f6fc451bc99 in Konsole::Session::~Session (this=0x3cb59) at /home/cullmann/projects/kde/src/konsole/src/session/Session.cpp:130
#23 0x00007f6ff91627e7 in QObject::event(QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#24 0x00007f6ffa32ed21 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Widgets.so.6
#25 0x00007f6ff910de30 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#26 0x00007f6ff9111a41 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#27 0x00007f6ff9116d73 in QCoreApplication::exec() () from /nix/store/ikqvl8jq0d7vlp25d9zlbh44m4hljahc-qtbase-6.7.1/lib/libQt6Core.so.6
#28 0x00005613cd0d7e53 in main (argc=1, argv=<optimized out>) at /home/cullmann/projects/kde/src/kate/apps/kate/main.cpp:537
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant