darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.88k stars 1.15k forks source link

Darktable crashing when exporting large JPEG #17659

Open dllu opened 1 month ago

dllu commented 1 month ago

Describe the bug

When I am trying to export a large 32037x12728 file, it crashes.

Steps to reproduce

  1. Open a large TIF file. For your convenience, I have uploaded one here: https://i.dllu.net/hkpeak.tif although please be warned that it is 2.7 GB.
  2. Try to export it as a jpeg, while ensuring that the export size is unlimited. image

Expected behavior

darktable should export an image with the same dimensions as the export size.

Logfile | Screenshot | Screencast

darktable_bt_KZZDV2.txt darktable.log

Commit

No response

Where did you obtain darktable from?

distro packaging

darktable version

4.8.1

What OS are you using?

Linux

What is the version of your OS?

Arch Linux

Describe your system?

Using Arch Linux.

CPU: AMD Ryzen 9 7945HX

RAM: 96 GB

GPU:

  DEVICE:                   0: 'NVIDIA GeForce RTX 4080 SUPER'
   CONF KEY:                 cldevice_v5_nvidiacudanvidiageforcertx4080super
   PLATFORM, VENDOR & ID:    NVIDIA CUDA, NVIDIA Corporation, ID=4318
   CANONICAL NAME:           nvidiacudanvidiageforcertx4080super
   DRIVER VERSION:           560.35.03
   DEVICE VERSION:           OpenCL 3.0 CUDA, SM_20 SUPPORT
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          15966 MB
   MAX MEM ALLOC:            3991 MB
   MAX IMAGE SIZE:           32768 x 32768

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

NVIDIA GeForce RTX 4080 SUPER, driver version 560.35.03

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

At the time of the crash, the system is only using about 50 GB out of 92 GB of available RAM so I am not sure if it is an out of memory issue.

kmilos commented 1 month ago

Possible duplicate of https://github.com/darktable-org/darktable/issues/17643?

ralfbrown commented 1 month ago

Looks like a duplicate.

@dllu can you try other output formats? Does darktable crash on most/all output formats, or only JPEG? (if only JPEG, that would indicate the problem is localized to libjpeg and/or darktable's interface to that library (src/imageio/imageio_jpeg.c)