Victor Vran Investigation (Patreon)
Content
Wine bugs.
https://bugs.winehq.org/show_bug.cgi?id=47387
https://bugs.winehq.org/show_bug.cgi?id=42695
This game actually has a native port but sometimes running a game under wine can show possible issues that user might experience under windows.
This game actually had some analysis already that suggested that COM was implicit initialized. Which turns out to be case here and also with another game "Path of Exile".
When using COM, you are required to call a function CoInitialize, which allow these objects to be created on windows. Assuming this function is called is a dangerous practice and can lead to crashes which are hard to diagnose.
When does this Implicit initialization occur?
Scenario: When a Window is created that supports IME and is visible.
Windows don't have to be visible when they are created and tests show that only once the window becomes visible does the initialization occur. Even though a lot of people will never use an IME window for input, Windows likes to make sure applications support it automatically for you in the background.
Now that tests have been written and there is a patch for implicit COM floating around (Hopefully just a simple rebase). Hopefully these games will work without issues in the future.
NOTE: A Path of Exile patch changed the code to explicit call CoInitialize now, so it no longer relies on this undefined behavior.