mvIMPACT Acquire SDK C++
Calling 'imageRequestWaitFor' Never Returns / An Application No Longer Terminates After Upgrading To mvIMPACT Acquire 2.32.0 Or Greater


After updating mvIMPACT Acquire to version 2.32.0 or greater while a version smaller than 2.32.0 was running before a client application no longer terminates. When attaching a debugger it can be seen that the function mvIMPACT::acquire::FunctionInterface::imageRequestWaitFor never returns.


The default value of the property mvIMPACT::acquire::BasicDeviceSettings::imageRequestTimeout_ms has been changed according to the following table:

mvIMPACT Acquire versionDefault value of the 'ImageRequestTimeout_ms' property
< 2.32.0 (May 8, 2019)2000 ms
>= 2.32.0 infinite

This was done as in the past the timeout caused by this property was a always a great source of confusion because effectively there are 2 timeouts affecting the overall behavior of the acquisition engine as explained here: Timeouts

This change however has potential effects on applications not dealing with abort conditions properly. Applications not cleaning up e.g. by calling mvIMPACT::acquire::FunctionInterface::imageRequestReset AND calling mvIMPACT::acquire::FunctionInterface::imageRequestWaitFor with an infinite timeout AND not explicitly setting the value of the mvIMPACT::acquire::BasicDeviceSettings::imageRequestTimeout_ms property might suffer from this change as now by default a buffer never times out. So in an application where e.g. triggered images are no longer arriving (because the trigger signal has already been switched off) now the application might wait forever when shutting down while previously the application did shut down eventually after some time.


The affected application can be changed

Several things can be done to overcome potential problems. All the guidelines presented here should be followed in any case and not just because of the problem described here!

The affected application can not be changed

If the affected application can not be modified the previous behavior can still be restored if a setting is loaded by the application(from a file or (on Windows) from the Registry). When this is the case simply edit the mvIMPACT::acquire::BasicDeviceSettings::imageRequestTimeout_ms parameter by removing the default flag and/or the actual value of the property:

Setting in a file

In the setting XML file locate the property:

<Property name="ImageRequestTimeout_ms" default="1" position="16" flags="7" size="1" formatString="%d ms" valType="1">
  <Value index="0" val="2000 ms"></Value>

You can change it removing the default flag like this to restore the previous behavior:

<Property name="ImageRequestTimeout_ms" default="0" position="16" flags="7" size="1" formatString="%d ms" valType="1">
  <Value index="0" val="2000 ms"></Value>

Setting within the Windows Registry

ImageRequestTimeout_ms property in the Windows Registry