D19642: Fixes crash when using the Copy Input To All Tabs feature

David Hallas noreply at phabricator.kde.org
Sat Mar 9 18:04:51 GMT 2019


hallas created this revision.
hallas added a reviewer: Konsole.
Herald added a project: Konsole.
Herald added a subscriber: konsole-devel.
hallas requested review of this revision.

REVISION SUMMARY
  Fixes crash when using the Copy Input To All Tabs feature. The crash is
  caused because the sessions are removed from the SessionManager before
  the MainWindow is updated. When the MainWindow receives the
  activeViewChanged signal it assumes that the
  SessionManager::sessionProfile returns a valid Profile pointer, but in
  this case it has already been freed and is therefore nullptr. The fix is
  to simply check if the new active Session has a valid Profile, if not
  simply ignore it.

TEST PLAN
  1. Open Konsole window
  2. Open multiple tabs within that Konsole window
  3. (apparently an important piece) Scroll through the tabs and go back to the first one opened, on the far left of the tab bar
  4. Select Edit menu -> Copy Input To -> All Tabs in Current Window
  5. Type a ctrl-D to issue logout command to all tabs in window
  
  BUG: 405158

REPOSITORY
  R319 Konsole

BRANCH
  fix_crash_on_copy_input_to_all_tabs (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D19642

AFFECTED FILES
  src/MainWindow.cpp

To: hallas, #konsole
Cc: konsole-devel, gennad, maciejn, thsurrel, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20190309/f38a3d7f/attachment.html>


More information about the konsole-devel mailing list