D12371: fix always reproducible crash

Jaime Torres Amate noreply at phabricator.kde.org
Fri Apr 20 08:26:07 UTC 2018


jtamate created this revision.
jtamate added reviewers: dfaure, Frameworks.
Restricted Application added a project: Frameworks.
jtamate requested review of this revision.

REVISION SUMMARY
  Don't take ownership of KDirLister in KDirModel.
  When KDirModel is destroyed, it also deleted the dirlister, but KCoreDirListerCache didn't knew anything about this deletion, and when it consulted listersCurrentlyHolding in slotRedirection resulted always in a crash.
  
  As a side effect, it also fixes the crash I got in D10989 <https://phabricator.kde.org/D10989>

TEST PLAN
  With samba started locally.
  Execute kwrite
  Press "save as" and go to network, then Samba shared resources, wait for the error. Then change to smb://127.0.0.1 and press enter, select a place to save the file in the local samba.
  Again press "save as" and go to network, then Samba shared resources. 
  Previously, always crash. 
  Now, again the error message (Next thing to investigate).
  
  In my [limited] tests this doens't introduce memory leaks.

REPOSITORY
  R241 KIO

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

AFFECTED FILES
  src/widgets/kdirmodel.cpp
  src/widgets/kdirmodel.h

To: jtamate, dfaure, #frameworks
Cc: michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180420/09410f8d/attachment.html>


More information about the Kde-frameworks-devel mailing list