Beep6581 / RawTherapee

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

RT crashes, when try to create the 100th version of the same file in the same folder #1667

Closed Beep6581 closed 8 years ago

Beep6581 commented 8 years ago

Originally reported on Google Code with ID 1683

During the optimization of RGB_denoise I detected this failure. For sure, nobody will
do that, except at testing...

Reported by heckflosse@i-weyrich.de on 2013-01-14 17:49:15

Beep6581 commented 8 years ago
Which behavior do you suggest?

I think that we don't expect anybody else than you to reach the maximum number if tries
:), so it should be pretty safe to raise it up to 500. :)

Reported by natureh.510 on 2013-02-25 00:42:50


Beep6581 commented 8 years ago
Ermm... maybe we would like to avoid the crash ? :)

Reported by natureh.510 on 2013-02-25 00:47:54

Beep6581 commented 8 years ago
I get around it even without a change, as I know what to do, when it crashes.

Reported by heckflosse@i-weyrich.de on 2013-02-25 10:33:41

Beep6581 commented 8 years ago
My question was "what should be the expected behavior if the mamximum number of tries
has been reached?". Cancelling the save process?

Reported by natureh.510 on 2013-02-25 14:08:43

Beep6581 commented 8 years ago
Sounds good to me :-)

Reported by heckflosse@i-weyrich.de on 2013-02-25 15:03:28

Beep6581 commented 8 years ago
Why not do it while filename exists tries++ and try again? Why should there be an upper
limit?

Reported by entertheyoni on 2013-02-25 15:10:13

Beep6581 commented 8 years ago
I like this idea very much! The patch would be so simple then :D

Reported by natureh.510 on 2013-02-25 15:13:17

Beep6581 commented 8 years ago
I'm thinking of unlikely but possible situations where someone processes thousands of
images through RT, such as video frames, and relies in RT's filename incrementation
instead of doing the incrementation himself. There is at least one program that processes
thousands of photos through RT - DeSERt (for making timelapse videos; it uses RT to
smooth out and control the exposure etc.). It doesn't rely on RT incrementing the filename,
it does that itself, but there might be other programs out that we don't know about
that do. If this is a 1 minute fix, why not remove the upper limit altogether?

Reported by entertheyoni on 2013-02-25 15:16:26

Beep6581 commented 8 years ago
Re #7: In fact, i don't like infinite loop, but it might be safe in this case.

Here is the patch.

Reported by natureh.510 on 2013-03-07 22:21:52


Beep6581 commented 8 years ago
:-) programmers don't like infinite loops. I'm with you, Hombre!

Reported by heckflosse@i-weyrich.de on 2013-03-07 22:53:31

Beep6581 commented 8 years ago
Electronics technicians know nothing continues perpetually ;]

Reported by entertheyoni on 2013-03-07 23:02:05

Beep6581 commented 8 years ago
;-) Nothing lasts longer than a good workaround! 

Reported by heckflosse@i-weyrich.de on 2013-03-07 23:09:57

Beep6581 commented 8 years ago
I'm a bite doubtful about the fact of seeing a directory with as much as 1000 images
in it. But maybe Linux can do it with showing any slow down (unlike other systems ;)).

This is a low priority issue, but all we have to do is make a choice first between:
- raising the number of tries up to e.g. 1000 and open an alert window indicating
  that the file has reached the maximum number the 1000th tries, and ask for a
  "Continue" or "Cancel" choice. On command line option, there won't be any choice,
  it would skip the file with a printed alert.
- making an infinite loop (but i don't like this options, even if simpler to do)
  iterating more than 1000 files on each file saving can be time consuming,
  but i can only guess, i was never faced to this situation :)
- ... any other option?

Reported by natureh.510 on 2013-03-09 00:07:40

Beep6581 commented 8 years ago
I would like to close this one for the following reasons:

1.) It doesn't crash anymore when reaching the 100-files-limit
2.) It doesn't write a file when reaching the 100-files-limit (which is great for testing,
when no output is needed ;-)
3.) No normal user will reach the 100-files-limit, I think...

Ingo

Reported by heckflosse@i-weyrich.de on 2013-10-23 22:11:25

Beep6581 commented 8 years ago

Reported by heckflosse@i-weyrich.de on 2015-05-27 22:21:24