Bug 473757 - Crash when opening a fits file
Summary: Crash when opening a fits file
Status: RESOLVED WORKSFORME
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-08-25 19:38 UTC by Lukas Jirkovsky
Modified: 2023-08-26 18:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
the file that causes the crash (56.25 KB, application/fits)
2023-08-25 21:28 UTC, Lukas Jirkovsky
Details
file that doesn't crash (22.50 KB, application/fits)
2023-08-26 18:54 UTC, Lukas Jirkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jirkovsky 2023-08-25 19:38:17 UTC
Application: kstars (3.6.6 Stable)

Qt Version: 5.15.10
Frameworks Version: 5.109.0
Operating System: Linux 6.4.12-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.7 [KCrashBackend]

-- Information about the crash:
When opening the attached fits file, kstars always crash.

The crash can be reproduced every time.

-- Backtrace:
Application: KStars (kstars), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  musable (mem=<optimized out>) at malloc.c:3426
#7  __GI___libc_realloc (oldmem=0x2, bytes=57600) at malloc.c:3433
#8  0x00007fd424c31514 in mem_truncate (handle=0, filesize=57600) at /usr/src/debug/cfitsio/cfitsio-4.3.0/drvrmem.c:263
#9  0x00007fd424c23325 in fftrun (status=0x7fff02a77354, filesize=57600, fptr=0x7fd3dc001a00) at /usr/src/debug/cfitsio/cfitsio-4.3.0/cfileio.c:7698
#10 fftrun (fptr=0x7fd3dc001a00, filesize=57600, status=0x7fff02a77354) at /usr/src/debug/cfitsio/cfitsio-4.3.0/cfileio.c:7682
#11 0x00007fd424c7835e in ffrhdu (fptr=0x7fd3dc001a00, hdutype=0x7fff02a7712c, status=0x7fff02a77354) at /usr/src/debug/cfitsio/cfitsio-4.3.0/fitscore.c:4469
#12 0x00007fd424c6dc01 in ffrdef (fptr=fptr@entry=0x7fd3dc001a00, status=status@entry=0x7fff02a77354) at /usr/src/debug/cfitsio/cfitsio-4.3.0/fitscore.c:6865
#13 0x00007fd424c6d11f in ffchdu (fptr=0x7fd3dc001a00, status=0x7fff02a77354) at /usr/src/debug/cfitsio/cfitsio-4.3.0/fitscore.c:6658
#14 0x00007fd424c24733 in ffflus (status=0x7fff02a77354, fptr=0x7fd3dc001a00) at /usr/src/debug/cfitsio/cfitsio-4.3.0/buffers.c:578
#15 ffflus (fptr=0x7fd3dc001a00, status=0x7fff02a77354) at /usr/src/debug/cfitsio/cfitsio-4.3.0/buffers.c:564
#16 0x000055c2e63150e7 in FITSData::~FITSData() (this=0x55c2eac9db40, this=<optimized out>) at /usr/src/debug/kstars/kstars-3.6.6/kstars/fitsviewer/fitsdata.cpp:126
#17 0x000055c2e6315641 in FITSData::~FITSData() (this=0x55c2eac9db40, this=<optimized out>) at /usr/src/debug/kstars/kstars-3.6.6/kstars/fitsviewer/fitsdata.cpp:132
#18 0x00007fd4238c3f9e in QObject::event(QEvent*) (this=0x55c2eac9db40, e=0x55c2ec5ebbc0) at kernel/qobject.cpp:1334
#19 0x00007fd42457893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55c2eac9db40, e=0x55c2ec5ebbc0) at kernel/qapplication.cpp:3640
#20 0x00007fd42389c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c2eac9db40, event=0x55c2ec5ebbc0) at kernel/qcoreapplication.cpp:1064
#21 0x00007fd4238a165b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55c2e8824580) at kernel/qcoreapplication.cpp:1821
#22 0x00007fd4238e76d8 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55c2e89b64c0) at kernel/qeventdispatcher_glib.cpp:277
#23 0x00007fd42268da31 in g_main_dispatch (context=0x7fd418000ee0) at ../glib/glib/gmain.c:3460
#24 g_main_context_dispatch (context=0x7fd418000ee0) at ../glib/glib/gmain.c:4200
#25 0x00007fd4226eacc9 in g_main_context_iterate.isra.0 (context=context@entry=0x7fd418000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#26 0x00007fd42268b0e2 in g_main_context_iteration (context=0x7fd418000ee0, may_block=1) at ../glib/glib/gmain.c:4343
#27 0x00007fd4238eb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55c2e89bb7d0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007fd42389b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff02a77800, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#29 0x00007fd42389c8a3 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#30 0x00007fd423d3bef2 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#31 0x00007fd424576cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#32 0x000055c2e6093830 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kstars/kstars-3.6.6/kstars/main.cpp:386
[Inferior 1 (process 2947) detached]

Reported using DrKonqi
Comment 1 Lukas Jirkovsky 2023-08-25 21:28:04 UTC
Created attachment 161186 [details]
the file that causes the crash
Comment 2 Jasem Mutlaq 2023-08-26 05:50:34 UTC
Tested locally without crash. Just got a popup that said 1D images are not supported and the dialog was closed fine. Could be an issue with packaging
Comment 3 Lukas Jirkovsky 2023-08-26 18:54:02 UTC
Created attachment 161200 [details]
file that doesn't crash

The interesting thing is that it doesn't crash with other 1D files. Eg. the attached axy.fits correctly complains that 1D files are not supported. Just that wcs.fits causes the crash.

I've cfitsio 4.3.0 installed, which is the latest version. If you have a different version, I guess it might be bug in the cfitsio library.