OpenDroneMap / WebODM

User-friendly, commercial-grade software for processing aerial imagery. 🛩
https://www.opendronemap.org/webodm/
GNU Affero General Public License v3.0
2.83k stars 944 forks source link

Duplicating task prior to processing results in tasks that are entangled #1528

Open smathermather opened 1 month ago

smathermather commented 1 month ago

How did you install WebODM (docker, installer, etc.)?

Docker deploy on Ubuntu 24.04

What's your browser and operating system? (Copy/paste the output of https://www.whatismybrowser.com/)

Brave, Chromium, Firefox

What is the problem?

If one uploads images to a new task, processes the data, and the duplicates the task, everything works as expected.

If one uploads images to a new task, cancels the task before finishing processing, and then duplicates the canceled task, WebODM seems to confuse the two tasks, for example, restarting each task will result in seeing the same logging showing in each task.

How can we reproduce this? (What steps trigger the problem? What parameters are you using for processing? Include screenshots. If you are having issues processing a dataset, you must include a copy of your dataset uploaded on Dropbox, Google Drive or https://dronedb.app)

If one uploads images to a new task, cancels the task before finishing processing, and then duplicates the canceled task, WebODM seems to confuse the two tasks, for example, restarting each task will result in seeing the same logging showing in each task.

Happens with any dataset, but to keep the bot happy, here's a link: link.com

lfeldb commented 1 month ago

I can confirm this issue. Also it does not only seem to happen on canceling the task manually, but also when tasks are completed (succesfully with an error) and then copied.

I also just noticed when i create a copy, the field 'name' is not updated in /var/www/data/tasks.json in nodeodm docker container. It seems that this file is created not at start-time, but later on in the process.

What does the 'off-by-one error' tag mean? Can I assist with some way?

smathermather commented 1 month ago

Thanks for confirming! I've taken occasionally to switching tasks between nodes to un-conjoin tasks when this happens which is a bit messy.

If you want to take a swing at revising the logic, take a look at the pull request this functionality came in on. https://github.com/OpenDroneMap/WebODM/pull/1031

I noticed no additional logic added to the NodeODM API at that same time, but it could be that some munging of task name needs to happen to avoid conflicts.

(The off-by-one tag is a bit misleading. You can ignore that tag. It's just flippant and not particularly funny "humor" in this case)

lfeldb commented 1 month ago

OK, I'll look into it as soon as I have some time. Thank you for the pull request reference, this saves me some time getting familiar with the code.

( Alright! I thought off-by-one might have suggested an indexing error, or it was one fix away from being fixed :-)

smathermather commented 1 month ago

OK, I'll look into it as soon as I have some time. Thank you for the pull request reference, this saves me some time getting familiar with the code.

Awesome. Thanks!

( Alright! I thought off-by-one might have suggested an indexing error, or it was one fix away from being fixed :-)

It was a tag I added a long time ago as a joke, and sometimes it is at least almost apropos. :slightly_smiling_face: