[Differential] [Request, 10 lines] D3143: Fix crash when aborting LoadJobs

elvisangelaccio (Elvis Angelaccio) noreply at phabricator.kde.org
Sun Oct 23 15:37:42 UTC 2016


elvisangelaccio created this revision.
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a subscriber: kde-utils-devel.
Restricted Application added a project: Ark.

REVISION SUMMARY
  LoadJob::onNewEntry() receives an Entry pointer. When we kill a LoadJob, the
  libarchive plugin deletes all the emitted entries, so onNewEntry() (which is
  queued in the events) gets a pointer that points to already free'ed memory.
  
  This patch just delays the deletion of entries by using deleteLater().
  This ensures that all the slots are executed first.
  
  An alternative fix could be using a `DirectConnection` for the entry ->
  onNewEntry connection...

TEST PLAN
  Close Ark while loading the linux tarball with and without patch.

REPOSITORY
  rARK Ark

BRANCH
  fix-loadjob

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

AFFECTED FILES
  plugins/libarchive/libarchiveplugin.cpp
  plugins/libarchive/libarchiveplugin.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: elvisangelaccio, rthomsen
Cc: kde-utils-devel, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20161023/81c26aac/attachment.html>


More information about the Kde-utils-devel mailing list