Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Darktable git crashes in toneequal.c:783 when opening images from database created with 3.4.1 #9002

Closed
piratenpanda opened this issue May 19, 2021 · 4 comments

Comments

@piratenpanda
Copy link
Contributor

piratenpanda commented May 19, 2021

Describe the bug/issue

When opening files that have been imported into the database by darktable 3.4.1 darktable git (I'm running 2292~gc90260a97 right now) crashes when trying to open the image.

To Reproduce
Please provide detailed steps to reproduce the behaviour, for example:

  1. Open images that have been imported into darktable with a previous version 3.4.1. in my case
  2. Click on images to open them in darkroom
  3. Some open, some don't
  4. Those who don't lead to the crash stacktrace below

Expected behavior

Images should be opened without crashing and transferring the problematic xmp content to a newer version I suppose

Platform

  • darktable version : e.g. 3.5.0+2292~gc90260a97
  • OS : Linux 5.12.4-arch1-2
  • Linux - Distro : Arch Linux
  • Memory : 32 GB
  • Graphics card : RX 580 (Radeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.12.4-arch1-2, LLVM 11.1.0)
  • Graphics driver : Mesa 21.1.0
  • OpenCL installed : yes
  • OpenCL activated : yes
  • Xorg : 1.20.11
  • Desktop : Gnome Shell 40.1
  • GTK+ : 3.24.29
  • gcc : 11.1.0

Additional context

stacktrace obtained with gdb

Thread 14 "worker res 0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffabfff640 (LWP 1966)]
0x00007fff564d4087 in pixel_correction (exposure=<optimized out>, 
    factors=factors@entry=0x55555ab3bc90, sigma=sigma@entry=1.41421354)
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:783
783	    result += gaussian_func(expo - centers_ops[i], gauss_denom) * factors[i];
(gdb) bt full
#0  0x00007fff564d4087 in pixel_correction
    (exposure=<optimized out>, factors=factors@entry=0x55555ab3bc90, sigma=sigma@entry=1.41421354)
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:783
        result = 0
        gauss_denom = <optimized out>
        expo = <optimized out>
#1  0x00007fff564d4184 in compute_lut_correction._omp_fn.0 ()
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:1430
        x = <optimized out>
        k = <optimized out>
        LUT = 0x55555ab3bcd0
        scaling = <optimized out>
        offset = <optimized out>
        sigma = <optimized out>
        factors = 0x55555ab3bc90
#2  0x00007ffff753ec06 in GOMP_parallel
    (fn=0x7fff564d40f0 <compute_lut_correction._omp_fn.0>, data=0x7fffabfede80, num_threads=4, flags=0) at /build/gcc/src/gcc/libgomp/parallel.c:178
#3  0x00007fff564b35c3 in compute_lut_correction
    (g=<optimized out>, offset=<optimized out>, scaling=<optimized out>)
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:1421
        LUT = <optimized out>
        factors = <optimized out>
        sigma = <optimized out>
#4  0x00007fff564f53cb in update_curve_lut (self=self@entry=0x555559d37730)
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:1475
        p = <optimized out>
        g = 0x55555ab3bc90
        valid = 1
#5  0x00007fff564f65c9 in commit_params (self=0x555559d37730, p1=0x55555a0c99b0, pipe=<optimized out>, piece=<optimized out>)
    at /home/panda/Downloads/dtcompile/darktable/src/iop/toneequal.c:1537
        p = 0x55555a0c99b0
        d = 0x7fff307f4010
        g = 0x55555ab3bc90
#6  0x00007ffff7d12191 in dt_iop_commit_params
    (module=0x555559d37730, params=0x55555a0c99b0, blendop_params=0x55555a135400, pipe=pipe@entry=0x5555573e3b00, piece=0x7fffa4027610) at /home/panda/Downloads/dtcompile/darktable/src/develop/imageop.c:1763
#7  0x00007ffff7d59856 in dt_dev_pixelpipe_synch_all (pipe=0x5555573e3b00, dev=0x5555573f1af0)
    at /home/panda/Downloads/dtcompile/darktable/src/develop/pixelpipe_hb.c:411
        piece = <optimized out>
        nodes = 
          0x7fffa40595a0 = {0x7fffa4027610, 0x7fffa40279c0, 0x7fffa4062440, 0x7fffa40627f0, 0x7fffa405d940, 0x7fffa4052d10, 0x7fffa40530c0, 0x7fffa4065be0, 0x7fffa4065f90, 0x7fffa40449c0, 0x7fffa4044d70, 0x7fffa40076d0, 0x7fffa4007aa0, 0x7fffa4060010, 0x7fffa40603c0, 0x7fffa4060790, 0x7fffa4060b40, 0x7fffa404a430, 0x7fffa404a800, 0x7fffa40646c0, 0x7fffa4064a70, 0x7fffa4064e20, 0x7fffa40651d0, 0x7fffa4065680, 0x7fffa405a860, 0x7fffa405ac10, 0x7fffa405afc0, 0x7fffa405b370, 0x7fffa405b870, 0x7fffa40178e0, 0x7fffa4018c90, 0x7fffa4019010, 0x7fffa402add0, 0x7fffa402b290, 0x7fffa402b640, 0x7fffa402ba10, 0x7fffa402bde0, 0x7fffa402c190, 0x7fffa402c540, 0x7fffa402c910, 0x7fffa402cce0, 0x7fffa4011150, 0x7fffa4011520, 0x7fffa40118f0, 0x7fffa4011ca0, 0x7fffa4012040, 0x7fffa403ddd0, 0x7fffa403f180, 0x7fffa403f550, 0x7fffa403f900, 0x7fffa403fcd0, 0x7fffa4040080, 0x7fffa4040450, 0x7fffa4040820, 0x7fffa4040bd0, 0x7fffa4040f80, 0x7fffa4041360, 0x7fffa40123f0, 0x7fffa40127a0}
        history = <optimized out>
#8  0x00007ffff7d59c80 in dt_dev_pixelpipe_change (pipe=0x5555573e3b00, dev=dev@entry=0x5555573f1af0)
    at /home/panda/Downloads/dtcompile/darktable/src/develop/pixelpipe_hb.c:458
#9  0x00007ffff7d0b7e7 in dt_dev_process_image_job (dev=0x5555573f1af0)
    at /home/panda/Downloads/dtcompile/darktable/src/develop/develop.c:575
        buf = 
          {size = DT_MIPMAP_FULL, imgid = 34219, width = 6880, height = 4544, iscale = 1, buf = 0x7ffed8704080 "\377\a\006\b\375\a\001\b\b\b\375\a\b\b\002\b\a\b\006\b\377\a\002\b\003\b\370\a\t\b\003\b\374\a\005\b\374\a\003\b\376\a\002\b\002\b\373\a\376\a\001\b\374\a\376\a\377\a\b\b\003\b\002\b\375\a\001\b\377\a\373\a\370\a\375\a\376\a\002\b\377\a\001\b\375\a\002\b\005\b\001\b\003\b\006\b\002\b\002\b\375\a\002\b\003\b\376\a\005\b\003\b\001\b\001\b\t\b\003\b\005\b\376\a\002\b\a\b\002\b\372\a\374\a\376\a\374\a\375\a\003\b\002\b\374\a\375\a\002\b\002\b\001\b\002\b\001\b\001\b\n\b\363\a\a\b\005\b\375\a\002\b\377\a\003\b\004\b\002\b\376\a\376\a\376\a\375\a\374\a\372\a\004\b\001\b\370\a\001\b"..., color_space = DT_COLORSPACE_NONE, cache_entry = 0x5555588d6f60}
        start = {clock = 330818537.04573399, user = 9.3015019999999993}
        zoom = <optimized out>
        zoom_x = 0
        zoom_y = 0
        scale = <optimized out>
        window_width = <optimized out>
        window_height = <optimized out>
        x = <optimized out>
        y = <optimized out>
        closeup = <optimized out>
        pipe_changed = (DT_DEV_PIPE_SYNCH | DT_DEV_PIPE_ZOOMED)
        wd = <optimized out>
        ht = <optimized out>
        __FUNCTION__ = "dt_dev_process_image_job"
#10 0x00007ffff7ca3f81 in dt_dev_process_image_job_run (job=<optimized out>)
    at /home/panda/Downloads/dtcompile/darktable/src/control/jobs/develop_jobs.c:55
        dev = <optimized out>
#11 0x00007ffff7c9c56a in dt_control_run_job_res (res=0, control=0x55555562dab0)
    at /home/panda/Downloads/dtcompile/darktable/src/control/jobs.c:215
        job = 0x55555b15d720
        params = <optimized out>
        s = 0x55555562dab0
        name = "worker res 0\000\000\000"
        threadid_res = 0
#12 dt_control_work_res (ptr=<optimized out>) at /home/panda/Downloads/dtcompile/darktable/src/control/jobs.c:519
        params = <optimized out>
        s = 0x55555562dab0
        name = "worker res 0\000\000\000"
        threadid_res = 0
#13 0x00007ffff774a259 in start_thread () at /usr/lib/libpthread.so.0
#14 0x00007ffff22e05e3 in clone () at /usr/lib/libc.so.6
  • Are the steps above reproducible with a fresh edit (i.e. after discarding history)? no

  • If the issue is with the output image, attach an XMP file if (you'll have to change the extension to .txt)

_V9A1347.CR2.xmp.txt

  • Is the issue still present using an empty/new config-dir (e.g. start darktable with --configdir "/tmp")? no
@piratenpanda piratenpanda changed the title Darktable crashes in toneequal.c:783 when opening images from stable import into database Darktable git crashes in toneequal.c:783 when opening images from database created with 3.4.1 May 19, 2021
@aurelienpierre
Copy link
Member

I see you use GCC11. dt is not tested with it yet.

@piratenpanda
Copy link
Contributor Author

Seems to be the case. Thanks, it's been a long time since the last time I compiled anything. After installing and compiling with GCC-10 and as Release build it works fine and much snappier

@aurelienpierre
Copy link
Member

Sounds concerning for the future, though. Or maybe it is a regression on GCC side and/or GCC11 is still beta ?

@marxin
Copy link

marxin commented Jun 30, 2021

Can please anybody create a reproducer so that I can narrow down the GCC issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants