Color Threshold big files freeze

I use the color threshold to select parts of large images - up to 30 megapixels. The function works at the start but then freezes. Sometimes I can get it to work again, but the original image has been changed. I have set the memory to 12 Gb, which should be enough.
I should mention that if I use debug mode then it works as intended.

Dear @MDH,

What do you mean by “at the start”? Do you work with multiple large images and the color threshold works on some of them and then crashes?

How exactly has it been changed?

Could you start Plugins > Utilities > Monitor Memory before trying to reproduce the issue and see if the memory consumption increases over time and if it hits the 12G limit?



Hi Stefan (@stelfrich)

I start with a single image (6100 by 5600 pixels RGB). The problem is intermittent. When I adjust the sliders, sometimes the plug-in freezes and sometimes the original image is changed. In the latter if I use a red threshold colour then this is incorporated in the image shown with the ‘original’ button. I have to use revert to get back to the original image. If I use the monitor memory then the memory never rises above 5%.

Thanks, Michael

I can confirm with the Clown sample scaled to 16000x10000px that Color Threshold gets a little unresponsive, but I couldn’t get it to freeze on my machine.

I guess that the plugin somehow runs into an inconsistent state (maybe induced by the freezing). Could you please follow the instructions for Command line debugging before you use the color threshold to see whether there are any exceptions/errors that are not shown via the user interface?

1 Like

I do not see any extra exceptions or errors with command line debugging. Recently the freezing seems less common, but I still see the modification of the original image. In some cases I only see the bottom part of the original image with added red pixels from the thresholding.