<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>445173</bug_id>
          
          <creation_ts>2021-11-08 18:45:45 +0000</creation_ts>
          <short_desc>Konsole crash when attempting to make new (and renamed) profile &quot;default&quot;</short_desc>
          <delta_ts>2023-03-13 18:49:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsole</product>
          <component>general</component>
          <version>21.08.2</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Ty Wait">tywait13</reporter>
          <assigned_to name="Konsole Bugs">konsole-bugs-null</assigned_to>
          <cc>a.samirh78</cc>
          
          <cf_commitlink>https://invent.kde.org/utilities/konsole/commit/2d0fad18dc3d6fd8a45c50b8fd889889b473e0e2</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2075946</commentid>
    <comment_count>0</comment_count>
    <who name="Ty Wait">tywait13</who>
    <bug_when>2021-11-08 18:45:45 +0000</bug_when>
    <thetext>Application: konsole (21.08.2)

Qt Version: 5.15.3
Frameworks Version: 5.87.0
Operating System: Linux 5.11.0-38-generic x86_64
Windowing System: X11
Distribution: KDE neon User - Plasma 25th Anniversary Edition
DrKonqi: 5.23.2 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:  I had 3 tabs open in one Konsole window.  I had set the history length to 10000 in one of the tabs by clicking &quot;Edit Current Profile...&quot; in Settings.  I used that tab for several commands before going to a second tab (it already existed).  I did some commands with lengthy output and noticed it wasn&apos;t retaining 10000 lines.  I checked the settings for the second tab, discovering it still had a 1000 line history (yes, I&apos;m new to Konsole :).  I again set the history for &quot;current profile&quot; to 10000 lines.  I went into &quot;Manage Profiles...&quot; in Settings and discovered my actions had created two new profiles (Profile 1 and Profile 2).  I renamed Profile 1 to &quot;Local standard&quot;.  I then highlighted Local Standard and clicked &quot;Set as Default&quot;.  Konsole crashed immediately.

I started a new Konsole instance and noticed that the rename had been successful, but not changing &quot;Local standard&quot; to default.  This time I was able to set &quot;Local standard&quot; to default and also remove &quot;Profile 2&quot; without incident.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault

[New LWP 28252]
[New LWP 28264]
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.
0x00007f3f75da0aff in __GI___poll (fds=0x7fffd7f8eaf8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
__preamble__
[Current thread is 1 (Thread 0x7f3f708899c0 (LWP 28207))]

Thread 3 (Thread 0x7f3f6f01f700 (LWP 28264)):
#0  0x00007f3f75da0aff in __GI___poll (fds=0x7f3f60004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f3f7430a36e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3f7430a4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3f7636e61b in QEventDispatcherGlib::processEvents (this=0x7f3f60000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f3f763128ab in QEventLoop::exec (this=this@entry=0x7f3f6f01ebb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#5  0x00007f3f7612c2c2 in QThread::exec (this=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f3f751b4f4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f3f7612d45c in QThreadPrivate::start (arg=0x7f3f75238d80) at thread/qthread_unix.cpp:329
#8  0x00007f3f74ccb609 in start_thread (arg=&lt;optimized out&gt;) at pthread_create.c:477
#9  0x00007f3f75dad293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f3f6fd1c700 (LWP 28252)):
#0  0x00007f3f75da0aff in __GI___poll (fds=0x7f3f6fd1bae8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f3f73f03c1a in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f3f73f0590a in xcb_wait_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f3f7046ae88 in QXcbEventQueue::run (this=0x55b32296b6b0) at qxcbeventqueue.cpp:228
#4  0x00007f3f7612d45c in QThreadPrivate::start (arg=0x55b32296b6b0) at thread/qthread_unix.cpp:329
#5  0x00007f3f74ccb609 in start_thread (arg=&lt;optimized out&gt;) at pthread_create.c:477
#6  0x00007f3f75dad293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f3f708899c0 (LWP 28207)):
[KCrash Handler]
#4  0x00007f3f775fd077 in ?? () from /lib/x86_64-linux-gnu/libkonsoleprivate.so.21
#5  0x00007f3f776a39ec in Konsole::ProfileList::updateAction(QAction*, QExplicitlySharedDataPointer&lt;Konsole::Profile&gt;) () from /lib/x86_64-linux-gnu/libkonsoleprivate.so.21
#6  0x00007f3f776a40ae in Konsole::ProfileList::profileChanged(QExplicitlySharedDataPointer&lt;Konsole::Profile&gt; const&amp;) () from /lib/x86_64-linux-gnu/libkonsoleprivate.so.21
#7  0x00007f3f7634adce in QtPrivate::QSlotObjectBase::call (a=0x7fffd7f8f8c0, r=0x55b322b277e0, this=0x55b322b29510) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate&lt;false&gt; (sender=0x7f3f77725080, signal_index=5, argv=0x7fffd7f8f8c0) at kernel/qobject.cpp:3886
#9  0x00007f3f7769d519 in Konsole::ProfileManager::profileChanged(QExplicitlySharedDataPointer&lt;Konsole::Profile&gt; const&amp;) () from /lib/x86_64-linux-gnu/libkonsoleprivate.so.21
#10 0x00007f3f776a7163 in Konsole::ProfileManager::setDefaultProfile(QExplicitlySharedDataPointer&lt;Konsole::Profile&gt; const&amp;) () from /lib/x86_64-linux-gnu/libkonsoleprivate.so.21
#11 0x00007f3f7775c5d0 in ?? () from /lib/x86_64-linux-gnu/libkonsoleapp.so.21
#12 0x00007f3f7634adce in QtPrivate::QSlotObjectBase::call (a=0x7fffd7f8fa50, r=0x55b323f70650, this=0x55b323def7e0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate&lt;false&gt; (sender=0x55b323f96dd0, signal_index=9, argv=0x7fffd7f8fa50) at kernel/qobject.cpp:3886
#14 0x00007f3f76344197 in QMetaObject::activate (sender=sender@entry=0x55b323f96dd0, m=m@entry=0x7f3f773c7600 &lt;QAbstractButton::staticMetaObject&gt;, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffd7f8fa50) at kernel/qobject.cpp:3946
#15 0x00007f3f76fa8cb6 in QAbstractButton::clicked (this=this@entry=0x55b323f96dd0, _t1=&lt;optimized out&gt;) at .moc/moc_qabstractbutton.cpp:308
#16 0x00007f3f76fa8ede in QAbstractButtonPrivate::emitClicked (this=0x55b323ecaf10) at widgets/qabstractbutton.cpp:415
#17 0x00007f3f76faa3b3 in QAbstractButtonPrivate::click (this=0x55b323ecaf10) at widgets/qabstractbutton.cpp:408
#18 0x00007f3f76faa575 in QAbstractButton::mouseReleaseEvent (this=0x55b323f96dd0, e=0x7fffd7f90010) at widgets/qabstractbutton.cpp:1044
#19 0x00007f3f76ef3cf6 in QWidget::event (this=0x55b323f96dd0, event=0x7fffd7f90010) at kernel/qwidget.cpp:8664
#20 0x00007f3f76fab7a3 in QAbstractButton::event (this=this@entry=0x55b323f96dd0, e=e@entry=0x7fffd7f90010) at widgets/qabstractbutton.cpp:1001
#21 0x00007f3f7704edd3 in QPushButton::event (this=0x55b323f96dd0, e=0x7fffd7f90010) at widgets/qpushbutton.cpp:709
#22 0x00007f3f76eb0dc3 in QApplicationPrivate::notify_helper (this=&lt;optimized out&gt;, receiver=0x55b323f96dd0, e=0x7fffd7f90010) at kernel/qapplication.cpp:3632
#23 0x00007f3f76eb9e77 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3076
#24 0x00007f3f76313daa in QCoreApplication::notifyInternal2 (receiver=0x55b323f96dd0, event=0x7fffd7f90010) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#25 0x00007f3f76eb90a7 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x55b323f96dd0, event=event@entry=0x7fffd7f90010, alienWidget=alienWidget@entry=0x55b323f96dd0, nativeWidget=0x55b323f904d0, buttonDown=&lt;optimized out&gt;, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2614
#26 0x00007f3f76f0ef44 in QWidgetWindow::handleMouseEvent (this=0x55b323f570e0, event=0x7fffd7f90490) at /usr/include/c++/9/bits/atomic_base.h:413
#27 0x00007f3f76f12264 in QWidgetWindow::event (event=0x7fffd7f90490, this=0x55b323f570e0) at kernel/qwidgetwindow.cpp:300
#28 QWidgetWindow::event (this=0x55b323f570e0, event=0x7fffd7f90490) at kernel/qwidgetwindow.cpp:239
#29 0x00007f3f76eb0dc3 in QApplicationPrivate::notify_helper (this=&lt;optimized out&gt;, receiver=0x55b323f570e0, e=0x7fffd7f90490) at kernel/qapplication.cpp:3632
#30 0x00007f3f76eb9bb8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3156
#31 0x00007f3f76313daa in QCoreApplication::notifyInternal2 (receiver=0x55b323f570e0, event=0x7fffd7f90490) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#32 0x00007f3f767ba4d8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at kernel/qguiapplication.cpp:2282
#33 0x00007f3f767bbb45 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x55b32353af60) at kernel/qguiapplication.cpp:2002
#34 0x00007f3f767937ac in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#35 0x00007f3f7046beae in xcbSourceDispatch (source=&lt;optimized out&gt;) at qxcbeventdispatcher.cpp:105
#36 0x00007f3f7430a17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f3f7430a400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f3f7430a4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f3f7636e602 in QEventDispatcherGlib::processEvents (this=0x55b322a442e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#40 0x00007f3f763128ab in QEventLoop::exec (this=this@entry=0x7fffd7f90830, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#41 0x00007f3f7631aa64 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#42 0x000055b321d060d6 in ?? ()
#43 0x00007f3f75cb20b3 in __libc_start_main (main=0x55b321d05ac0, argc=3, argv=0x7fffd7f90b28, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7fffd7f90b18) at ../csu/libc-start.c:308
#44 0x000055b321d0643e in ?? ()
[Inferior 1 (process 28207) detached]

Possible duplicates by query: bug 442496, bug 441765, bug 441215, bug 441206, bug 440512.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2075980</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Samir">a.samirh78</who>
    <bug_when>2021-11-08 19:39:49 +0000</bug_when>
    <thetext>I tested with your steps to reproduce, and I don&apos;t see this issue with the master branch; there has been various changes to the profile dialog(s), and so I assume it&apos;s been fixed in master.

FWIW, when you edit the &quot;built-in&quot; profile, the code creates a new profile because the built-in one is immutable, it acts as a global fallback if you have no profiles at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2076054</commentid>
    <comment_count>2</comment_count>
    <who name="Ty Wait">tywait13</who>
    <bug_when>2021-11-08 21:34:05 +0000</bug_when>
    <thetext>   Ahmad -

   Thanks for your reply. I noticed there were several bugs involving
   Konsole&apos;s profile, so I&apos;m amenable to your assessment. I&apos;m running a
   KDE Neon system update now that includes a Konsole update. Maybe I
   should have applied that update earlier :-)

   I noticed the immutability of the &quot;built-in&quot; profile, and the
   rationale you present for such a profile being a global fallback makes
   a lot of sense.

   Thanks for the quick response!!

   -Ty

   On 11/8/21 2:39 PM, Ahmad Samir wrote:

     https://bugs.kde.org/show_bug.cgi?id=445173          
     Ahmad Samir      &lt;a.samirh78@gmail.com&gt; [1]      changed:
     
                What    |Removed                     |Added
     ----------------------------------------------------------------------------
                      CC|                            |     a.samirh78@gmail.com [1]     
     --- Comment #1 from Ahmad Samir      &lt;a.samirh78@gmail.com&gt; [1]      ---
     I tested with your steps to reproduce, and I don&apos;t see this issue with the
     master branch; there has been various changes to the profile dialog(s), and so
     I assume it&apos;s been fixed in master.
     
     FWIW, when you edit the &quot;built-in&quot; profile, the code creates a new profile
     because the built-in one is immutable, it acts as a global fallback if you have
     no profiles at all.


   

   1. mailto:a.samirh78@gmail.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2215948</commentid>
    <comment_count>3</comment_count>
    <who name="Waqar Ahmed">waqar.17a</who>
    <bug_when>2023-03-13 18:49:09 +0000</bug_when>
    <thetext>Git commit 2d0fad18dc3d6fd8a45c50b8fd889889b473e0e2 by Waqar Ahmed.
Committed on 13/03/2023 at 18:31.
Pushed by hindenburg into branch &apos;master&apos;.

Fix crash in ProfileSettings

Fixes the following crash

- Open Settings -&gt; Manage Profiles...
- Click on a non default profile and edit it
- In &quot;Edit Profile Dialog&quot;, check &quot;Default&quot; to make this profile default
- Click Ok, Now we are back in &quot;Manage Profiles&quot; dialog.
- See that &quot;Set as Default&quot; is still clickable, clicking it crashes konsole
Related: bug 423136, bug 454986

M  +6    -0    src/settings/ProfileSettings.cpp

https://invent.kde.org/utilities/konsole/commit/2d0fad18dc3d6fd8a45c50b8fd889889b473e0e2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>