The automation uses 3 bots to extract information from remittances using the DU module. Occasionally, some bots encounter the error described below, while others continue to operate without issue. Retrying the task in the same bot results in the same exception but attempting it in other bots successfully extracts the information.
UiPath.Vision.OCR.OCRException: No valid input file/image specified InvalidInputImage ---> System.TypeInitializationException: The type of initializer for 'NativeMagickSettings' threw an exception.
---> System.TypeInitializationException: The type of initializer for 'X64' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Magick.Native-Q8-x64.dll': The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
at ImageMagick.Environment.NativeMethods.X64.Environment_SetEnv(IntPtr name, IntPtr value)
at ImageMagick.Environment.NativeEnvironment.SetEnv(String name, String value)
at ImageMagick.MagickNET.InitializePrivate(ConfigurationFiles configFiles, String newPath)
at ImageMagick.Environment.NativeMethods.X64..cctor()
--- End of inner exception stack trace ---
at ImageMagick.Environment.NativeMethods.X64.Environment_Initialize()
at ImageMagick.Environment.Initialize()
at ImageMagick.MagickSettings.NativeMagickSettings..cctor()
--- End of inner exception stack trace ---
at ImageMagick.MagickSettings.NativeMagickSettings..ctor()
at ImageMagick.MagickSettings..ctor()
at ImageMagick.MagickImage..ctor()
at UiPath.Vision.Core.Shared.Engines.VisionImage.FromByteArray(Byte[] imageData)
--- End of inner exception stack trace ---",
In essence, an exception occurs when attempting to load a DLL file inside the processes of UiPath.VisionHost.Exe.
This can arise from three scenarios:
- DLL is somehow corrupted
- Another process is holding (or leaking a handle) and preventing the VisionHost.exe from loading that binary file
- An actual issue with the MagickNET library
When this occurs, the process hangs, and VisionHost crashes in a strange manner. This issue needs to be fixed to prevent blocking the Main thread.
Ensure that all machines have UIPATH_HEADLESS_WITH_USER = TRUE configured and have been rebooted