Fix bug which may be causing the fits crashes.
ClosedPublic

Authored by murveit on Feb 3 2020, 4:42 AM.

Details

Summary

It looks like the thread which is writing the fits files is using memory (QString filename) that is a
local variable in a method which likely ends before the write thread ends.
Change this filename variable to a class variable which should be safe memory.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Feb 3 2020, 4:42 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptFeb 3 2020, 4:42 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Feb 3 2020, 4:42 AM
murveit updated this revision to Diff 74885.Feb 3 2020, 5:04 AM

Made sure the filename was not overwritten when waiting for the thread to complete

murveit updated this revision to Diff 74886.Feb 3 2020, 5:21 AM

Made the filename arg passed to writeImageFile a const.

mutlaqja accepted this revision.Feb 3 2020, 5:42 AM
This revision is now accepted and ready to land.Feb 3 2020, 5:42 AM
This revision was automatically updated to reflect the committed changes.