-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expose and dev fixes #18245
base: master
Are you sure you want to change the base?
Expose and dev fixes #18245
Conversation
@dterrahe @ralfbrown you both have been working a lot on dev stuff. Would you have a look? |
I really only understand it a little for 5 mins after a deep dive that took a few days. Not something you can dip in and out of. |
@jenshannoschwalm I'm running a clean environment with this PR and it still gets stuck in a loop. What flags would you like me to run with to try and isolate this? |
Likely raw and xmp might be helping too. Do you observe some "jitter" while being in that loop? main canvas slightly moving "around" ? Could you possibly do a video? |
No, no movement at all. That's usually the first clue unless it's the
Maybe, I'd have to figure it out. |
Looking back over the conversation from the last time I tried to figure this out I came across an entry I made saying that it didn't occur with opencl disabled. I turned off opencl and processed 18 images without a hiccup. With opencl I can almost always reproduce in less than 10 images. So, I'll add opencl to the flags. I also added more logging to the script to try and tell you what it's doing. |
Enabled opencl. Reproduced the process image, move to next sequence that results in the processed image being reloaded with bad data. Got the image_reset_on_change_image.txt Here's the XMP from the reset image, If you need the raw too, let me know and I'll load it somewhere and post a link. |
Got a loop. Approximately line 3170 in the log. The last entry before the loop had to do with channelmixerrgb. The one above could have been channelmixerrgb too. Possiblly something with the channelmixerrgb opencl code? |
Another loop. Last before was channelmixerrgb. Log at 72.8997 seconds. The channelmixerrgb preset I'm using is attached. channelmixerrgb_monarch fieldhouse.dtpreset.txt I'll stop now until you've had a chance to look at these. |
Don't know yet what's happening but for me it doesn't look like something related to OpenCL - that just processes the pipe in a slightly different way. What we have from your logs are loops that look slightly different - some examples
I don't know yet if the changed px/py in example 3 should give us a clue
Does this mean that Bill, if you run into such a loop,
|
Aah, i just had a short glance on that. Seems to be "pretty related" to this pr :-) One section in darkroom is pretty identical, i think you missed the logs to be included in the check though :-) |
But calling it has a no effect as the first line on this routine is:
Also, there is other call to |
Right. But it avoids the wrong log message :-)
The cropper always has that function implemented. |
Return to lighttable breaks the loop.
Just did a video that shows the current edit being overwritten when I attempt to change images. I pop back out to lighttable and hover over the image that should have been developed but has a blue cast and the history stack has been reset. Here's a link with the log file, https://drive.google.com/drive/folders/1FpOiePYU9f_MpLNVTIjGLmoNupEtN_Fd?usp=sharing |
I think Boris has nothing to fear from my screencasts 🤣. I meant to have the log scrolling underneath the darktable window, but I was trying to manage too many new things at once. Any recommendations about a better way to create videos will be happily accepted. |
Ah ok, just that, so commit is good for 5.0.x branch. |
run8 is another image reset, but this time it had the Also I've noticed lately that when I crop I'm set to |
run9 is the loop. I had to clean up the mess from run8, then started processing again. Notice the flickering "working" message on the screen and lack of response to the applied processing. Exited to lighttable and then back to darkroom to finish processing. EDIT: I went back to full screen because I wasn't getting the loop. In full screen after 2 or 3 images, I reproduced. A resource issue? EDIT 2:Changed resources from default to small and still got the loop. |
Commit ae42f03 merged in branch 5.0.x. |
Except that I can't reproduce if I turn off opencl |
b83a757
to
4cac472
Compare
I understood that. I just meant, it doesn't seem to be an OpenCL code issue at all, from my understanding of the logs it could be related to "no-opencl-just-one-device" so less chances for a pipe race problem. In fact in thos loops there is no processing at all, it could be a dev gtk redrawing issue. |
Avoid calling _module_gui_post_expose() if the module in focus doesn't have that. Improve readability of '-d expose' logs.
dt_dev_pixelpipe_change() calls the possibly costly dt_dev_pixelpipe_get_dimensions() in all cases in addition to possibly syncing pipe nodes. In dt_dev_process_image_job() we check for situations where we *must* call dt_dev_pixelpipe_change() as we don't have the pipe dimensions available in addition to pipe->changed != DT_DEV_PIPE_UNCHANGED. This leads to a significant performance gain due to less "pixelpipe-runs" just done to get the dimension. In dt_dev_pixelpipe_change() we reduce the amount of syncing if possible as there is another active dt_dev_pixelpipe_change_t flag that includes work to be done. Locking history is also done only if required as nodes/parameters have been changed. Some log improvements reducing misleading noise.
4cac472
to
a6fd915
Compare
Only expose if module has gui_post_expose
Avoid calling
_module_gui_post_expose()
if the module in focus doesn't have that. Improve readability of-d expose
logs.Improved handling of
dt_dev_pixelpipe_change()
dt_dev_pixelpipe_change()
calls the costlydt_dev_pixelpipe_get_dimensions()
in all cases in addition to possibly syncing pipe nodes.In
dt_dev_process_image_job()
we check for situations where we must calldt_dev_pixelpipe_change()
as we don't have the pipe dimensions available in addition topipe->changed != DT_DEV_PIPE_UNCHANGED
leading to a significant performance gain due to less "pixelpipe-runs" just done to get the dimension.In
dt_dev_pixelpipe_change()
we reduce the amount of syncing if possible as there is another activedt_dev_pixelpipe_change_t
flag that includes work to be done. Locking history is also done only if required as nodes/parameters have been changed.Some log improvements reducing misleading noise.