Skip to content

Make sure we don't crash if we issue a notification before showing the window

Aleix Pol Gonzalez requested to merge work/apol/knoticrash into master

Could reproduce running konsole -e "cat unexisting.file"

See:

* 0  QWidget::windowHandle (this=0x0) at /home/apol/devel/frameworks/qt6/qtbase/src/widgets/kernel/qwidget.cpp:2498
* 1  0x00007ffff7d38070 in Konsole::Session::done (this=0x55555572cf50, exitCode=1, exitStatus=QProcess::NormalExit) at /home/apol/devel/frameworks6/konsole/src/session/Session.cpp:1099
* 2  0x00007ffff7d49b01 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<int, QProcess::ExitStatus>, void, void (Konsole::Session::*)(int, QProcess::ExitStatus)>::call (
    f=(void (Konsole::Session::*)(Konsole::Session * const, int, QProcess::ExitStatus)) 0x7ffff7d37db0 <Konsole::Session::done(int, QProcess::ExitStatus)>, o=0x55555572cf50, arg=0x7fffffffd350) at /home/apol/devel/kde6/include/QtCore/qobjectdefs_impl.h:145
* 3  0x00007ffff7d49a3d in QtPrivate::FunctionPointer<void (Konsole::Session::*)(int, QProcess::ExitStatus)>::call<QtPrivate::List<int, QProcess::ExitStatus>, void> (
    f=(void (Konsole::Session::*)(Konsole::Session * const, int, QProcess::ExitStatus)) 0x7ffff7d37db0 <Konsole::Session::done(int, QProcess::ExitStatus)>, o=0x55555572cf50, arg=0x7fffffffd350) at /home/apol/devel/kde6/include/QtCore/qobjectdefs_impl.h:182
* 4  0x00007ffff7d49965 in QtPrivate::QCallableObject<void (Konsole::Session::*)(int, QProcess::ExitStatus), QtPrivate::List<int, QProcess::ExitStatus>, void>::impl (which=1, this_=0x555555a3e2f0, r=0x55555572cf50, a=0x7fffffffd350, ret=0x0)
    at /home/apol/devel/kde6/include/QtCore/qobjectdefs_impl.h:520
* 5  0x00007ffff3fbc525 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd350, r=0x55555572cf50, this=0x555555a3e2f0) at /home/apol/devel/frameworks/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:433
* 6  doActivate<false> (sender=sender@entry=0x555555a888e0, signal_index=<optimized out>, argv=<optimized out>, argv@entry=0x7fffffffd350) at /home/apol/devel/frameworks/qt6/qtbase/src/corelib/kernel/qobject.cpp:4021
* 7  0x00007ffff3fb277b in QMetaObject::activate (sender=sender@entry=0x555555a888e0, m=m@entry=0x7ffff41ce300 <QProcess::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd350)
    at /home/apol/devel/frameworks/qt6/qtbase/src/corelib/kernel/qobject.cpp:4081
* 8  0x00007ffff4124c3a in QProcess::finished (this=this@entry=0x555555a888e0, _t1=<optimized out>, _t2=<optimized out>) at /home/apol/build-devel/qt6/qtbase/src/corelib/Core_autogen/include/moc_qprocess.cpp:503

Merge request reports