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

Bug: Segfault while reordering modules with detail mask #394

Open
2 tasks done
Jiyone opened this issue Jan 8, 2025 · 2 comments
Open
2 tasks done

Bug: Segfault while reordering modules with detail mask #394

Jiyone opened this issue Jan 8, 2025 · 2 comments
Labels
bug priority: low Affects optional and niche functionnalities

Comments

@Jiyone
Copy link
Collaborator

Jiyone commented Jan 8, 2025

Code of Conduct

  • I have read this document and I accept the conditions

Search previous report

  • I have searched my issue

Computer's operating system

Linux

What GPU do you have ?

AMD/ATI

Ansel version

a329ee6

Type of binary

Self-compiled (GCC or Clang)

What happened?

When I change module order in the pipeline containing a detail mask, Ansel crashes.

2019.12.27_01089-26.NEF.xmp.zip

If I reset the module with the detail mask, there is no issue.

Does your problem occur with OpenCL enabled ?

Yes

Does your problem occur with OpenCL disabled ?

Yes

Previous Ansel version that use to work

No response

Output of ansel -d all

OPENCL ON :

https://pastebin.com/NuwatMvf

OPENCL OFF :

https://pastebin.com/WgCcz3wz

Backtrace

WITH OPENCL ON :

Thread 69 "worker res 1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffe75000640 (LWP 43846)]
0x00007ffff79c04e5 in _refine_with_detail_mask_cl._omp_fn.0 () at /home/jiyone/src/ansel/src/develop/blend.c:793
793     mask[idx] = mask[idx] * warp_mask[idx];
(gdb) bt full
#0  0x00007ffff79c04e5 in _refine_with_detail_mask_cl._omp_fn.0 () at /home/jiyone/src/ansel/src/develop/blend.c:793
        idx = <optimized out>
        msize = <optimized out>
        warp_mask = 0x7fffbc049e00
        mask = 0x7fff90800040
        form = <optimized out>
        blendif = 0
        mask_combine = 0
        d = <optimized out>
        mask_mode = 0
        ch = <optimized out>
        xoffs = <optimized out>
        yoffs = <optimized out>
        iwidth = <optimized out>
        iheight = <optimized out>
        owidth = 0
        oheight = 0
        buffsize = <optimized out>
        iscale = <optimized out>
        oscale = <optimized out>
        rois_equal = <optimized out>
        mask_display = DT_DEV_PIXELPIPE_DISPLAY_NONE
        request_mask_display = DT_DEV_PIXELPIPE_DISPLAY_NONE
        blend_csp = <optimized out>
        cst = <optimized out>
        post_operations = {DEVELOP_MASK_POST_NONE, DEVELOP_MASK_POST_NONE, DEVELOP_MASK_POST_NONE}
        post_operations_size = <optimized out>
        opacity = 0
        _mask = <optimized out>
        mask = <optimized out>
        kernel_mask = <optimized out>
        kernel = <optimized out>
        kernel_mask_tone_curve = <optimized out>
        kernel_set_mask = <optimized out>
        kernel_display_channel = <optimized out>
        devid = <optimized out>
        offs = {0, 0}
        sizes = {0, 0, 0}
        err = <optimized out>
        dev_blendif_params = 0x0
        dev_boost_factors = 0x0
        dev_mask_1 = 0x0
        dev_mask_2 = 0x0
        dev_tmp = 0x0
        dev_guide = <optimized out>
        dev_profile_info = 0x0
        dev_profile_lut = 0x0
        profile_info_cl = 0x0
        profile_lut_cl = 0x0
        dev_work_profile_info = 0x0
        dev_work_profile_lut = 0x0
        work_profile_info_cl = 0x0
        work_profile_lut_cl = 0x0
        origin = {0, 0, 0}
        region = {0, 140737353018952, 4564369864818425856}
        parameters = {-0.00784230232, 4.59163468e-41, -5.12983358e+32, 4.59163468e-41, 0.0236876681, 0.00262583606, 0.00145869469, 0 <repeats 72 times>, 1.15887383e-42, 1.61675124e+32, 4.59149455e-41, 1.14175978e+23, 4.59149455e-41, 6.9482709e+10, 4.59149455e-41, 1.40129846e-45, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        profile = {type = DT_COLORSPACE_FILE, filename = '\000' <repeats 140 times>, "\221\267:>\223[\211=MGR=", '\000' <repeats 359 times>, intent = DT_INTENT_PERCEPTUAL, matrix_in = {{0, 0, 0, 0}, {7.43128194e-40, 0, 1.61062093e+09, 4.59149455e-41}, {4.95419263e-40, 0, 3.36311631e-44, 0}, {7.17464814e-43, 0, 1.56945428e-43, 0}}, matrix_out = {{2.47708931e-40, 0, 1.28849674e+10, 4.59149455e-41}, {2.86093583e-29, 7.00404147e-30, 1.76333613e-30, 7.05353711e-30}, {0.176470593, 0.180392161, 0.172549024, 0.168627456}, {0.168627456, 0.168627456, 0.168627456, 0.172549024}}, lutsize = 5524, lut_in = {0x7c, 0x6c, 0x64}, lut_out = {0x54, 0x4c, 0x48}, unbounded_coeffs_in = {{8.40779079e-44, 0, 8.96831017e-44}, {0, 7.28675201e-44, 0}, {6.16571324e-44, 0, 5.60519386e-44}}, unbounded_coeffs_out = {{7.74077272e-42, 0, 5.04467447e-44}, {0, 1.88214221e+09, 4.59149455e-41}, {1.88215501e+09, 4.59149455e-41, 5.3809861e-43}}, nonlinearlut = 0, grey = 4.48415509e-43, matrix_in_transposed = {{6.95044038e-43, 0, 6.72623263e-43, 0}, {6.50202487e-43, 0, 6.27781712e-43, 0}, {6.05360937e-43, 0, 5.82940161e-43, 0}, {5.60519386e-43, 0, 5.15677835e-43, 0}}, matrix_out_transposed = {{4.93257059e-43, 0, 4.70836284e-43, 0}, {4.25994733e-43, 0, 3.81153182e-43, 0}, {3.58732407e-43, 0, 3.36311631e-43, 0}, {4.20389539e-45, 0, 2.91470081e-43, 0}}}
        use_profile = 0
#1  0x00007ffff7e8ac0e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007ffff7494ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736882215920, -891635714420333871, 140730861356608, 0, 140737342162896, 140736882216272, 890780291456344785, 891616622659150545}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007ffff7526850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

WITH OPENCL OFF :

Thread 92 "worker res 0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffe57200640 (LWP 23357)]
0x00007ffff79bf745 in _refine_with_detail_mask._omp_fn.0 () at /home/jiyone/src/ansel/src/develop/blend.c:285
285	    mask[idx] = mask[idx] * warp_mask[idx];
(gdb) bt full
#0  0x00007ffff79bf745 in _refine_with_detail_mask._omp_fn.0 () at /home/jiyone/src/ansel/src/develop/blend.c:285
        idx = <optimized out>
        msize = <optimized out>
        warp_mask = 0x7fffc4047300
        mask = 0x7fff91400040
        form = <optimized out>
        d = <optimized out>
        mask_mode = <optimized out>
        ch = <optimized out>
        xoffs = <optimized out>
        yoffs = <optimized out>
        iwidth = <optimized out>
        iheight = <optimized out>
        owidth = <optimized out>
        oheight = <optimized out>
        buffsize = <optimized out>
        iscale = <optimized out>
        oscale = <optimized out>
        rois_equal = <optimized out>
        request_mask_display = <optimized out>
        blend_csp = <optimized out>
        cst = <optimized out>
        post_operations = {DEVELOP_MASK_POST_NONE, 3497624, DEVELOP_MASK_POST_NONE}
        post_operations_size = <optimized out>
        opacity = <optimized out>
        _mask = <optimized out>
        mask = <optimized out>
#1  0x00007ffff7e8ac0e in  () at /lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007ffff7494ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>

                      unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737029016496, 8113520686380181605, 140730360137280, 0, 140737342162896, 140737029016848, -8113892040758433691, -81135398382692330--Type <RET> for more, q to quit, c to continue without paging--c
51}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#3  0x00007ffff7526850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

@Jiyone Jiyone added the bug label Jan 8, 2025
@Jiyone Jiyone changed the title Bug: Segfault while moving a module with mask Bug: Segfault while reordering a module with mask Jan 8, 2025
@Jiyone Jiyone changed the title Bug: Segfault while reordering a module with mask Bug: Segfault while reordering modules Jan 8, 2025
@Jiyone Jiyone changed the title Bug: Segfault while reordering modules Bug: Segfault while reordering modules with detail mask Jan 8, 2025
@Jiyone
Copy link
Collaborator Author

Jiyone commented Jan 8, 2025

It happens too when undo/redo action and clicking in a past history step.

Opencl ON

https://pastebin.com/QNG74JJV

Opencl OFF :

https://pastebin.com/hhRuHt8E

@aurelienpierre aurelienpierre added the priority: low Affects optional and niche functionnalities label Jan 12, 2025
@aurelienpierre
Copy link
Collaborator

Reproduced.

aurelienpierre added a commit that referenced this issue Jan 12, 2025
Many reasons…

- it doesn't work
- it is so scale-sensitive that it makes the "scale to window" zoom level useless and behaves very differently depending on zoom level
- it is designed as a work-around for bad edge-avoidance in frequency modules - that should be fixed in those modules
- it samples data at demosaicing step, meaning later distortions mess it up and it's not available for non-raw images
- it is broken in many subtle ways. See #394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority: low Affects optional and niche functionnalities
Projects
None yet
Development

No branches or pull requests

2 participants