LRTimelapse Forum
Number of threads for ExifTool calculation bug. - Printable Version

+- LRTimelapse Forum (https://forum.lrtimelapse.com)
+-- Forum: LRTimelapse (https://forum.lrtimelapse.com/Forum-lrtimelapse)
+--- Forum: LRTimelapse 6 - Bug reports (https://forum.lrtimelapse.com/Forum-lrtimelapse-6-bug-reports)
+---- Forum: Closed Topics (https://forum.lrtimelapse.com/Forum-closed-topics)
+---- Thread: Number of threads for ExifTool calculation bug. (/Thread-number-of-threads-for-exiftool-calculation-bug)



Number of threads for ExifTool calculation bug. - cppasm - 2022-06-03

Hi.
There is a bug in the LRTimelapse 6.0.5 with the calculation of number of threads for ExifTool.
Currently it is calculated like this:
NumberOfThreadsForExifTool=min(NumberOfCPUThreads, 32)/4;
For CPUs with less than 4 threads (1, 2 or 3 - I've faced this on AMD CPU with 3 threads) NumberOfThreadsForExifTool will be calculated as 0.
This leads to LRTimelapse crash at startup with division by zero exception (log shows "Using 0 threads for ExifTool.").
This happens if config does not have option for numberOfThreadsExifTool (fresh install).
Also, this does not happen in trial mode - then numberOfThreadsExifTool defaults to 4 threads.
In my opinion this should be fixed by changing division to round up:
NumberOfThreadsForExifTool=(min(NumberOfCPUThreads, 32)+3)/4;
Or, if the intension really was to have only 1 ExifTool thread on CPU with 6 threads, then it should be:
NumberOfThreadsForExifTool=min(NumberOfCPUThreads, 32)/4;
if(NumberOfThreadsForExifTool<1) NumberOfThreadsForExifTool=1;
Please fix this.
Thankyou.


RE: Number of threads for ExifTool calculation bug. - Gunther - 2022-06-04

Major bummer. Thanks for analyzing this - I will fix it asap!


RE: Number of threads for ExifTool calculation bug. - Gunther - 2022-06-08

Fixed in 6.0.6. Please update: https://lrtimelapse.com/download/