Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.9k stars 323 forks source link

Hue based curve crashes RawTherapee #6520

Closed rebio closed 2 years ago

rebio commented 2 years ago

Short description The adjustment tool based on chroma channel crashed RT

Steps to reproduce

  1. Open a chroma channel tool (either in L*a*b* Adjustments or HSV Equalizer) chroma channel selector
  2. click on the tool to display vertical indicator line for colour in the are the pointer currently is
  3. Get lucky - or not

Observed behavior RT sometimes crashes, sometimes not. The crash does not seem to follow a logic set of interactions. If the cursor is moved quickly to the image the crash rate seems higher. If you wait for a moment the crash rate seems lower. My observation could be wrong.

Expected behavior No crashes

Additional information Observed on different versions of RT. No idea what the crash is caused by

First observed in the HSV Equalizer. Also observed in xH curves in L*a*b* Adjustments.

First observed on Windows 7. Also observed on Windows 10 and Linux (AppImage).

Benitoite commented 2 years ago

Please provide the backtrace. http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports

rebio commented 2 years ago

This sounds like a lot work for a bug that that occurs randomly and can not be reproduced.

It actually sounds like too much work for a bug that is may based on one of my false assumption (the tool may is not supposed to be used like this or it should crash there to prevent a system crash)

This is report is a headsup for the developers of a bug that didn't happen only once but several times. It happend so often that it heavily effected the workflow. Since I do the slight colour adjustments at the very end and the pp3 file is not saved on crash it results in that you have the fun of spending all the time with the exact same adjustments for the image again only for the RT to may crash again at the same moment.

This report is also for people who google for the crash and are look for an answer.

Benitoite commented 2 years ago

I was not able to reproduce this on macOS: controls respond with no apparent latency, and at any speed the program continues operating as normal, including chromatic changes occuring in the preview in near-realtime.

Lawrence37 commented 2 years ago

Unable to reproduce with a native-built version on Linux and with the AppImage. Are there particular images that lead to the crash? Perhaps certain colors can cause the issue.

rebio commented 2 years ago

The exact moment when the crash occurs is when the button to add points to the curve pressed and the cursor is moved above the image. Instead of showing a vertical line on the hue diagram where the colour in the image would be RT crashes. The behaviour was observed when editing RAW files (CR2 and CR3). I can't think of any time that a JPG made RT crash at this point. unable to reproduce on X is probably the default because I can also not 'reproduce' the bug - it occurs randomly. I don't know of any way to make it consistently show up. It just pays a visit every once in a while. As said: I'm using these sliders at the very end so it could be co related to a long chain of adjustments and that it should do something else when the adjustment is not finished. This would fit my described observation of "If you wait for a moment the crash rate seems lower." That the PC runs out of memory is highly unlikely because it has 32GB of RAM and I use the single editor mode.

rebio commented 2 years ago

I downloaded the debug build, installed TDM-GCC and ran RT through gdb.exe I was not able to reproduce the bug, but it seems to be fault of gdb since at some point it just stops RT before it can be crashed.

The debug build itself crashed like explained: The button to display the vertical line in the hue curve is activated and the cursor is moved over the image which results in a crash. To test my theory that it could be relation of processing the image and having to process the image for the hue diagram at the same time could be true. I activated pretty much every button that changes the image (light, colour, sharpening, etc.) and played with the hue diagram. If the vertical line showed up I changed some setting and retried the same thing in the hue diagram. This crashed RT in the debug build, but did not work with gdb. It closes/stops (?) and tells me --Type <RET> for more, q to quit, c to continue paging--

If that's important: The last line before that was:

[New Thread 6832.0x1dc8]

RT does not always stop on exactly this line. The next runs the last line were

[New Thread 7288.0x13dc] [New Thread 2268.0x1aac] [New Thread 14952.0x36f8]

Any more ideas?

Lawrence37 commented 2 years ago

@rebio GDB automatically pauses the program right before it is about to crash. The thread messages can be ignored. Type c to display more information. When that's complete, get the backtrace information. The steps to do that are described in the RawPedia page for writing bug reports.

rebio commented 2 years ago

I have tried to create the log today: log.txt

What I noticed in the wall of text: function is missing: [...] at D:/a/RawTherapee/RawTherapee/rtengine/helpersse2.h:315 The test image is located on the D partition, but there is no directory called D:\a\* The debug build was located in my downloads folder on my C drive

It also took a little bit longer this time to get to that point and I had to tweak the dials quite a few times.

For RawPedia: In my opinion it would be a good idea to add the information above to rawpedia. It's this small note on the window froze, what am I supposed to do next and the window froze, does gdb say anything about this that helped along

Lawrence37 commented 2 years ago

Thanks for sharing the crash data. I'm investigating. What information in particular do you want to add to RawPedia? It already talks about how RawTherapee will freeze and what to do next.

rebio commented 2 years ago

Thank you for investing time in this issue!

Today I got the same (?) crash bug, but in the curve editor of the tone curve 2 (the same, well: The same result at least). Exact same workflow: I edited the image almost to the end and wanted to use the button to display the vertical in the second tone curve. I clicked the button and a second later RT crashed.

Add RawPedia: If --Type <RET> for more, q to quit, c to continue paging-- is the ordinary thing to show for gdb, this could be included with the note that this means that RT is now halted and the creation of the logfile can start. Since the page on RawPedia looks like it's supposed to be so detailed that everybody can use it, adding a note for such a tiny step is important. I got stuck right at this step. c to continue paging - Do I want to continue now? Should I do this paging now?

rebio commented 2 years ago

Is there any other information you need from the dev debug build?

Lawrence37 commented 2 years ago

@rebio The backtrace tells me where and why the program crashed, but I'm still not sure what created the conditions for the crash. The best way to understand the situation is for me to reproduce the issue, but I have been unable to. Are you able to trigger the crash using the neutral profile and only the HSV tool active? If not, which tools do you typically activate?

Beep6581 commented 2 years ago

I have been unable to reproduce. @rebio a screen recording would help, along with your raw + PP3. You can hit CTRL+SHIFT+s at any time while editing to save the PP3 to disk, so that even if RT crashes in the next step you still have your settings secure.

rebio commented 2 years ago

@Lawrence37 @Beep6581 I have tested this problem with the 5.8-3166-gdff5dd341 build (5.9 rc1) and I was not able to reproduce the crash. This was just testing tough and not using it in a work setting (maybe I do something different there)

Since the issue no longer occurs I'll close the issue for now. If I get the same problem again I'll reopen it.