Posts: 2
Threads: 2
Joined: Jun 2022
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.
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.