[Differential] [Request, 13 lines] D1453: Fix segfaults when killing running jobs

rthomsen (Ragnar Thomsen) noreply at phabricator.kde.org
Wed Apr 20 20:21:37 UTC 2016


rthomsen created this revision.
rthomsen added a reviewer: elvisangelaccio.
rthomsen set the repository for this revision to rARK Ark.
rthomsen added a project: Ark.
Restricted Application added a subscriber: kde-utils-devel.

REVISION SUMMARY
  Currently Ark segfaults when either stopping a running job using the notifications system tray icon or simply closing Ark while a job is running.
  
  To fix libarchiveplugin we need to connect the finished signal of Job to QThread::terminate() instead of QThread::quit() in the worker thread. This is likely due to the event loop of the worker thread already being dead and hence quit() having no effect.
  
  For CliInterface we simply wait for 1 second after killing the process. This avoids the assertion failure in destructor of CliInterface.
  
  When closing Ark main window while a job is running Ark crashes due to KJob::finished signal being connected to Part::ready and the JobTracker destructor killing the job non-quietly. This is fixed by connecting to KJob::result instead and killing the job quietly (KJob::result is not emitted when job is killed quietly).
  
  Bugs:
  222392 <https://bugs.kde.org/show_bug.cgi?id=222392>
  358937 <https://bugs.kde.org/show_bug.cgi?id=358937>

TEST PLAN
  Test using AddToArchive:
  ark -t <archive_name> <some_folder_with_many_files>
  then stop the job using system tray. Try both with e.g. a tar.xz and a zip archive.
  
  Test using GUI:
  Create a new archive and add a large folder using Add Folder action. Then close Ark while AddJob is running. Again try both with e.g. a tar.xz and a zip archive.

REPOSITORY
  rARK Ark

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

AFFECTED FILES
  kerfuffle/cliinterface.cpp
  kerfuffle/jobs.cpp
  part/jobtracker.cpp
  part/part.cpp

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

To: rthomsen, elvisangelaccio
Cc: kde-utils-devel, tctara


More information about the Kde-utils-devel mailing list