ImagePtr->Save() throws InvalidCiphertext

Whenver I call ImagePtr->Save() to write an image to disk (as PNG or JPG), the write succeeds, but I get the following logs:

‘tim.exe’ (Win32): Loaded ‘C:\Program Files\STEMMER IMAGING\Common Vision Blox\CVCFile.dll’.
‘tim.exe’ (Win32): Loaded ‘C:\Windows\System32\comdlg32.dll’.
‘tim.exe’ (Win32): Loaded ‘C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.720_none_e6beb5c51314836b\comctl32.dll’.
Exception thrown at 0x00007FF8B8FAA859 in tim.exe: Microsoft C++ exception: CryptoPP::InvalidCiphertext at memory location 0x000000489F6FCE30.
Exception thrown at 0x00007FF8B8FAA859 in tim.exe: Microsoft C++ exception: CryptoPP::InvalidCiphertext at memory location 0x000000489F6FCE10.
‘tim.exe’ (Win32): Unloaded ‘C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.720_none_e6beb5c51314836b\comctl32.dll’
‘tim.exe’ (Win32): Unloaded ‘C:\Windows\System32\comdlg32.dll’
‘tim.exe’ (Win32): Unloaded ‘C:\Program Files\STEMMER IMAGING\Common Vision Blox\CVCFile.dll’

Where is the InvalidCiphertext coming from?

Cheers,
Tim

Hi Tim,

these are exceptions in the CryptoPP library that CVB uses.
They can be safely ignored.

Cheers,
Tim

3 Likes

More importantly: These are first chance exceptions - occasions where the control flow in the application has encountered a throw statement, but the thrown exception has been caught by a catch block (as opposed to uncaught exceptions, where the exception travels up the call stack and eventually terminates the running process.
The latter kind is the kind that gives rise to “crashed” applications. The former one is just a valid way to affect the control flow in the application/library. Unfortunately, every throw statement produces such a line in the trace output, but as @TStadler pointed out these may be safely ignored…