darktable icon indicating copy to clipboard operation
darktable copied to clipboard

crash in color picker proxy if changing exposure via accelerator while color picker is active

Open MStraeten opened this issue 3 years ago • 5 comments

if exposure is changed (via accelerator midi) filmicrgb while white relative exposure color picker is active darktable crashes (also reproducible with colorbalce rgb 4 HSL pickers):

Process 6717 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x130)
    frame #0: 0x00000001009af33c libdarktable.dylib`_iop_color_picker_pickerdata_ready_callback(instance=0x0000000105d54300, module=0x0000000109fd7600, piece=0x000000011c047b80, user_data=<unavailable>) at color_picker_proxy.c:276:24 [opt]
   273 	  // modules between colorin & colorout may need the work_profile
   274 	  // to work properly. This will force colorin to be run and it
   275 	  // will set the work_profile if needed.
-> 276 	  piece->pipe->changed |= DT_DEV_PIPE_REMOVE;
   277 	  piece->pipe->cache_obsolete = 1;
   278
   279 	  // iops only need new picker data if the pointer has moved
Target 0: (darktable) stopped.
warning: libdarktable.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) frame variable
(gpointer) instance = 0x0000000105d54300
(dt_iop_module_t *) module = 0x0000000109fd7600
(dt_dev_pixelpipe_iop_t *) piece = 0x000000011c047b80
(gpointer) user_data = <Could not evaluate DW_OP_entry_value.>

(dt_iop_color_picker_t *) picker = 0x0000600001b51cc0

To Reproduce define accelerator (e.g. e+scroll) for changing exposure to be able to change exposure without activation exposure module

  1. Go to filmic rgb (or colorbalance rgb 4HSL or masking tab)
  2. Click on color oicker (white relative exposure ord further color picker) to activate (frame is shown in the image)
  3. change exposure via accelerator several times up and down
  4. after a while darktable crashes

Which commit introduced the error not yet bisected, will provide after some investigations

Platform _Please fill as much information as possible in the list given below. Please state "unknown" where you do not know the answer and remove any sections that are not applicable _

  • darktable version : darktable 4.1.0+417~gba5511124
  • OS : OSx

MStraeten avatar Sep 25 '22 14:09 MStraeten

@MStraeten : I cannot reproduce, I have been changing the exposure via accelerator for more than 30s... No crash on my side. So a bisect would be really nice to have. TIA.

TurboGit avatar Sep 25 '22 15:09 TurboGit

back to mid of June and no reproducible good base for bisecting.

image to reproduce: https://mega.nz/file/HXRCQayA#ahU7ImKrg3oD9tJ4W9Kirrb1duMXiVly2MBH-Eva_jw xmp file: 20220911-IMG_5770.CR3.xmp.txt

there are two scenarios that results in a crash:

  1. scenario settings: default scene referred scenario with modern color adaptation fresh start of darktable discard history - open in darkroom execute scenario --> crash
  2. scenario if first scenario didn't crash then after reopen in darkroom the scenario results in a crash

MStraeten avatar Sep 25 '22 17:09 MStraeten

This might be a case for bad iop cache data. AP had reported such an issue some time ago, it might be more evident now as we have more cachelines.

jenshannoschwalm avatar Sep 26 '22 07:09 jenshannoschwalm

maybe be something OSX specific - wasn'table to reproduce with a windows build of current master ...

MStraeten avatar Sep 27 '22 08:09 MStraeten

Let's tag this as MacOS specific, I cannot reproduce on Linux and you cannot on Windows.

TurboGit avatar Sep 27 '22 16:09 TurboGit

@MStraeten , could you recheck this with current master? Also - if you could provide some non-cr3 raw file if the issue persists? (i can't get them working on my system)

jenshannoschwalm avatar Nov 09 '22 04:11 jenshannoschwalm

no longer reproducible - but also a couple of changes in my toolchain (new Xcode, new sdk, new macports packages) so will close it here

MStraeten avatar Nov 09 '22 06:11 MStraeten