Crash when avif file is in same directory
Loupe crashes when opening any image if an avif file is in the same directory as it tries to read the avif file. At least in my PC I don't see error messages.
flatpak run org.gnome.Loupe.Devel
2023-01-11T20:29:45.840Z DEBUG loupe::window > Loading file: file:///var/home/eddy/test_crash/test.jpg
2023-01-11T20:29:45.840Z DEBUG loupe::widgets::image_view > first model created
2023-01-11T20:29:45.845Z DEBUG loupe::widgets::image > Loading file /var/home/eddy/test_crash/test.jpg
2023-01-11T20:29:45.845Z DEBUG loupe::widgets::image > Loading EXIF
2023-01-11T20:29:45.845Z DEBUG loupe::image_metadata > Loading metadata for "/var/home/eddy/test_crash/test.jpg"
2023-01-11T20:29:45.847Z DEBUG loupe::file_model > "test.avif" is an image, adding to the list
2023-01-11T20:29:45.847Z DEBUG loupe::widgets::image_view > Currently at file 1 in the directory
2023-01-11T20:29:45.850Z DEBUG loupe::widgets::image_view > Carousel filled, current file at index 1
2023-01-11T20:29:45.851Z DEBUG loupe::widgets::image > Loading image size
2023-01-11T20:29:45.851Z DEBUG loupe::widgets::image > Loading file /var/home/eddy/test_crash/test.avif
2023-01-11T20:29:45.851Z DEBUG loupe::widgets::image > Loading EXIF
2023-01-11T20:29:45.851Z DEBUG loupe::image_metadata > Loading metadata for "/var/home/eddy/test_crash/test.avif"
2023-01-11T20:29:45.864Z DEBUG loupe::widgets::image > Loading complete image
2023-01-11T20:29:45.865Z DEBUG loupe::widgets::image > Loading image size
avif samples: https://github.com/link-u/avif-sample-images
To reproduce:
- Create a folder
- Put a jpg image there
- Put an avif image there
- Try to open the jpg image with Loupe
- Crashes
Expected result: To be able to open the jpg image
Actual result: Loupe cannot open the jpg image and crashes