onekiloparsec / QLFits

The macOS quicklook plugin for FITS files.
http://onekiloparsec.dev/
MIT License
58 stars 5 forks source link

Crash when opening FITS file #5

Open AlexRoman opened 3 years ago

AlexRoman commented 3 years ago

What I noticed

After installing qlfits through brew (brew install qlfits), the FITS preview would spin for a while then "give up" and I would see the icon of the file instead of the preview.

What I did

I ran the qlmanage command on the file:

qlmanage -p /Volumes/schtorage/AP/2021/StellarMate_135mm/Pictures/M81_M82/Light/Luminance/M81_M82_Light_001.fits                                      alex@Alexs-MBP
Testing Quick Look preview with files:
    /Volumes/schtorage/AP/2021/StellarMate_135mm/Pictures/M81_M82/Light/Luminance/M81_M82_Light_001.fits
 GeneratePreviewForURL.m                  37: [QLFits3] Previewing file:///Volumes/schtorage/AP/2021/StellarMate_135mm/Pictures/M81_M82/Light/Luminance/M81_M82_Light_001.fits
 GeneratePreviewForURL.m                  66: [QLFits3] Open FITS file
 GeneratePreviewForURL.m                 113: [QLFits3] Loading FITS Data of HDU at index 0
 GeneratePreviewForURL.m                 124: Creating HDU image
 GeneratePreviewForURL.m                 143: [QLFits3] Drawing a 2D image
[1]    74260 segmentation fault  qlmanage -p 

Crash log attached in a file: qlfits_crash.txt

File that caused the crash: http://dacia.bravewolf.ca/astrophotos/M81_M82_Light_001.fits

onekiloparsec commented 3 years ago

Thanks for the detailed and organised crash report. If I read your crash report file, on line 70, it says that the function DrawObjectName fails. Either in reading it, or in trying to draw an invalid value, this is where to look for debugging. If I have no news since then, I'll have a look this weekend.

AlexRoman commented 3 years ago

Thanks for looking at it so quickly! No rush and I look forward to the fix!

On Thu, May 20, 2021 at 03:50 Cédric Foellmi @.***> wrote:

Thanks for the detailed and organised crash report. If I read your crash report file, on line 70, it says that the function DrawObjectName fails. Either in reading it, or in trying to draw an invalid value, this is where to look for debugging. If I have no news since then, I'll have a look this weekend.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/onekiloparsec/QLFits/issues/5#issuecomment-844823764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMBL6YTWPSQYC73DKL7BALTOS5NDANCNFSM45F7J6DQ .

-- Alex Roman @.***>

onekiloparsec commented 3 years ago

After an hour of investigation, I barely managed to make any progress. However, it is clear now that it is somehow located in the "low-level" (old) C APIs (CFMutableAttributedStringRef).

Apple changed completely the framework of QuickLooks. I have now dozen of compilation warnings. This QuickLook was pretty hard to make since old documentation on it was basically missing at that time. QLFits should be actually left as is and a new v4 version should be rewritten for newer systems...

niu541412 commented 4 months ago

I think this issue is also caused by the same bug and is already fixed with https://github.com/onekiloparsec/QLFits/pull/7.

onekiloparsec commented 4 months ago

@AlexRoman you may check? (I know, this is a bit late...)