hobuinc / untwine

GNU General Public License v3.0
48 stars 21 forks source link

"Failure writing to" when rerunning after incomplete run #145

Closed m-kuhn closed 7 months ago

m-kuhn commented 9 months ago

When cancelling an untwine run (Ctrl+C) and then rerunning the process with the same output path, it will crash. Running it once again, it will continue and complete.

./untwine/build/untwine --files /home/ubuntu/pc_input/ -o /home/ubuntu/output.copc.laz --single_file
terminate called after throwing an instance of 'untwine::FatalError'
  what():  Failure writing to '/home/ubuntu/output.copc.laz_tmp/8-68-4-1.bin'.
Aborted (core dumped)

Steps to reproduce

  1. Start untwine and kill it before it ends
  2. Start untwine again (crash)
  3. Start untwine again (success)

It looks like in step 2 it does some cleanup before crashing, so in step 3 it doesn't run into the same situation.

It would be good if either step 2 would already succeed (cleanup and then retry) or if it would print a message (something like "Temporary files cleaned up, please rerun untwine").

Might be related to https://github.com/hobuinc/untwine/issues/140

abellgithub commented 7 months ago

Fixed by #153