The error handling in AutoHotkey v1 is somewhat inconsistent, but the general pattern is not to report errors other than outright invalid parameters. Runtime errors may set ErrorLevel, or just be ignored.
A picture control can be added without a picture, and that is exactly what happens when you specify a value that cannot be added as a picture, regardless of the reason. If you give the control a size, you will see that the value you passed is its text. (The text is always set and can be retrieved by ControlGetText or other methods, but you don't see it if a picture loads.)
The lack of error reporting in this specific case is definitely intentional, as per
comments in the AutoHotkey v1.0.24 source code.
Regardless, it is long-standing behaviour that scripts may rely on. For instance, if a runtime error is thrown, any code that has previously been used to detect failure of Gui Add will not be able to execute.
However, it should probably be changed for v2.
CreateFile fails because the sharing mode was specified as 0; it should be
FILE_SHARE_READ, which allows it to succeed even if some other process has the file open for reading (but not writing). There is no reason for it to be 0. Under different circumstances this could produce a more difficult to trace, intermittent failure, so it is perhaps lucky that you have revealed this bug.