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

darkroom display does not update when modules are applied. #18014

Open
wpferguson opened this issue Dec 15, 2024 · 13 comments
Open

darkroom display does not update when modules are applied. #18014

wpferguson opened this issue Dec 15, 2024 · 13 comments
Labels
bug: pending someone needs to start working on that OpenCL Related to darktable OpenCL code priority: high core features are broken and not usable at all, software crashes scope: image processing correcting pixels scope: UI user interface and interactions
Milestone

Comments

@wpferguson
Copy link
Member

Describe the bug

While editing an image in darkroom mode the main display quits updating as edits are applied. The histogram does update.

Steps to reproduce

  1. Open an image in darkroom
  2. Edit the image
  3. Sooner or later notice that the image doesn't update as edits are applied.
  4. I was editing a sequence of images, hitting space to move to the next. Within 10 images I'd encounter the problem.

Expected behavior

display should update when edited

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

git master 12/14

What OS are you using?

Linux

What is the version of your OS?

Ubuntu 22.04

Describe your system?

No response

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Nvidia latest

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

On a hunch I turned off opencl and started editing images. Problem hasn't appeared after 10 images.

The hunch happened when I was looking for a likely commit to start bisecting from when I came across some of the opencl work, so I'm guessing that something in there isn't quite working as expected.

Another note. I'm using a final processing script that applies multiple modules (2 d or s, colorbalancergb, chromatic aberrations) one right after the other. I do check for pixelpipe complete to make sure one is complete before trying the next.

The last heavy editing session I did was 11/30 and I had no problems, so whatever changed was after that.

@ralfbrown ralfbrown added scope: UI user interface and interactions scope: image processing correcting pixels OpenCL Related to darktable OpenCL code labels Dec 15, 2024
@wpferguson
Copy link
Member Author

commit fe99016 is good and things work as they should

@wpferguson
Copy link
Member Author

tried to bisect but didn't come up with anything that made sense. I'll try before and after for each opencl commit and see if I can find it that way.

@jenshannoschwalm
Copy link
Collaborator

What you describe could be a cache problem due to a wrongly calculated hash. As the opencl pipe does use less cache lines this could be more obvious because bad lines would "live longer".

A bisect point would be #17906 for that case.

@wpferguson
Copy link
Member Author

My edits usually start with rotate and perspective as I like my images to be straight. Next I adjust exposure. I apply a style before I start with multiple module instances, but most are turned off except for the defaults.

I would notice the problem with I adjusted the horizon and nothing moved. It was late and I had 2 other problems going on at the same time, so now I've sorted that out in my head and I think I can chase this problem.

@wpferguson
Copy link
Member Author

What debug flags should I run with to see if #17906 is the problem?

I built a new environment to test with, but haven't been able to reproduce yet. I tried adding my style to use more cache lines, but still didn't trigger it. It might be a combination of style, and script which makes the changes fast enough that it might outrun the cache?

I've thought of another way to test.

@wpferguson
Copy link
Member Author

I checked out the commit before and tested 12 images without a problem. I checked out a commit after (one of the translations) and the 3rd image had a problem. I did a rotate and perspective and nothing happened. I applied local contrast, colorbalancergb, d or s, and nothing happened. Then to make sure I did rotate and perspective again (right click and draw) and drew a 45 degree line., Instead of rotating, it zoomed.

So, it seems the process is something like this:

  1. I open an image.
  2. Style is automatically applied (I'll include below).
  3. I do a couple of edits.
  4. I have the script apply the final modules (d or s AA, d or s local contrast, colorbalancergb, chromatic aberrations).
  5. space bar to the next image
  6. style loads
  7. etc

It may be the apply final modules, move to new image and apply defaults, then apply style automatically, then try an edit. Too many things in to short a time.

style.zip

@jenshannoschwalm
Copy link
Collaborator

Some ideas:

  1. A simple one, if it is a pipe-cache issue just drag around while being slightly zoomed in. That should immediately "repair" your issue as for sure the hash will be different.
  2. use '-d pipe' and spot modules not being processed that have been just added.
  3. i don't know about lua but we used to have the modules having the order as natural numbers, always the next module having "+1". Since some weeks the iop order of a module is in the hundreds just making sure the next modules order is larger. Could that be an issue with lua?

@wpferguson
Copy link
Member Author

The lua question is probably better for @dterrahe. I access them by name and instance using dt.gui.action. The top most module is instance 0, then the instance number increases by 1 as you go down the stack. For instance, in the style I included there are 4 Diffuse or Sharpen modules. The local contrast one is instance 0. The AA sharpen is instance 1. The denoise medium is instance 2 and denoise fine is instance 3. I don't think that is a problem though, since it seems to work and the history stack updates with the appropriate entries.

I'll try the drag test.

@wpferguson
Copy link
Member Author

 121.9917 pipe state changing           [full]                                        
  121.9917 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  121.9917 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  121.9917 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  121.9918 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  121.9918 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  122.0345 pipe state changing           [full]                                        
  122.0345 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  122.0346 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  122.0346 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  122.0347 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  122.0347 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  122.0761 pipe state changing           [full]                                        
  122.0761 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  122.0761 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  122.0761 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  122.0762 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  122.0762 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  122.5942 pipe state changing           [full]                                        
  122.5942 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  122.5942 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  122.5942 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  122.5944 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  122.5945 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  122.6352 pipe state changing           [full]                                        
  122.6352 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  122.6353 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  122.6353 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  122.6354 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  122.6354 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  122.6745 pipe state changing           [full]                                        
  122.6745 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  122.6745 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  122.6745 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  122.6746 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  122.6746 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  123.1956 pipe state changing           [full]                                        
  123.1957 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  123.1957 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  123.1957 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  123.1958 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  123.1958 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  123.2532 pipe state changing           [full]                                        
  123.2532 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  123.2532 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  123.2532 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  123.2534 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  123.2534 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  123.3041 pipe state changing           [full]                                        
  123.3042 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  123.3042 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  123.3042 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  123.3043 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  123.3043 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx3070tilaptopgpu
  123.7920 pipe state changing           [full]                                        
  123.7920 modify roi OUT                [full]           rawprepare              100 (   0/   0) 7128x4732 scale=1.0000 --> (   0/   0) 6984x4660 scale=1.0000  ID=70090
  123.7921 modify roi OUT                [full]           ashift                 1600 (   0/   0) 6984x4660 scale=1.0000 --> (   0/   0) 6686x4461 scale=1.0000  ID=70090
  123.7921 modify roi OUT                [full]           flip                   1700 (   0/   0) 6686x4461 scale=1.0000 --> (   0/   0) 4461x6686 scale=1.0000  ID=70090
  123.7922 pipe cache check              [full]                                        64 lines (important=19, used=0). Freed 0MB. Using using 0MB, limit=498MB
  123.7922 pipe starting             CL0 [full]                                       (   0/   0) 1251x1875 scale=0.2804 --> (   0/   0) 1251x1875 scale=0.2804  ID=70090, nvidiacudanvidiageforcertx

While I was experimenting (with -d pipe on) I saw the flashing working. I stopped the scrolling, copied a chunk, and started writing this. I just checked and it's still going. Seems to be caught in some kind of endless loop.

@wpferguson
Copy link
Member Author

I also forgot one thing in my processing description. When I hit spacebar to load the new image, I generate the thumbtable cache in background for the previous image.

@wpferguson
Copy link
Member Author

Here's a run from I'd just finished processing an image and was still in darkroom view.

I hit the space bar, processed the next image, then hit the space bar and processed another image.

output1.txt

@dterrahe
Copy link
Member

I access them by name and instance using dt.gui.action. The top most module is instance 0, then the instance number increases by 1 as you go down the stack.

These are "instance numbers". Different from the iop order numbers Hanno is referring to.

@kofa73
Copy link
Contributor

kofa73 commented Jan 19, 2025

How can I help testing this? I've just started with a clean config + DB, and a directory of 74 pristine images. I opened the first one, created a random style with local contrast, DoS, color balance rgb, contrast EQ and denoise (profiled), then assigned it a hotkey and stepped through all images in the darkroom, and applied the style. No problem (on master).

  • Should I en/disable OpenCL?
  • Small/default/large resource?
  • Do image dimensions matter? These were small (~10 MPx) images.

At first I had full-res processing disabled in the darkroom, then I enabled it about half way through.

Update: I've now added 100 copies of the raw from https://discuss.pixls.us/t/how-do-i-satisfy-the-oe-warning/47734, which originally triggered my problem, used the same style (large and small resources, full-res enabled or not, even created a snapshot for comparison, zoomed in-out, panned), and I'm unable to reproduce it. I'll try with some masks.

@TurboGit TurboGit added the bug: pending someone needs to start working on that label Jan 23, 2025
@TurboGit TurboGit added this to the 5.2 milestone Jan 23, 2025
@TurboGit TurboGit added the priority: high core features are broken and not usable at all, software crashes label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending someone needs to start working on that OpenCL Related to darktable OpenCL code priority: high core features are broken and not usable at all, software crashes scope: image processing correcting pixels scope: UI user interface and interactions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants