• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Number of threads for ExifTool calculation bug.

Offline
#1 cppasm
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.
Offline
#2 Gunther
Major bummer. Thanks for analyzing this - I will fix it asap!
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.
Offline
#3 Gunther
Fixed in 6.0.6. Please update: https://lrtimelapse.com/download/
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.

...also check out: