[Bug 51345] Regression: Visual Studio 2005 "package load failure"

WineHQ Bugzilla wine-bugs at winehq.org
Sun Jun 27 03:48:17 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51345

--- Comment #4 from Damjan Jovanovic <damjan.jov at gmail.com> ---
One definite regression caused by those startup-related patches is the
following:

winetricks -q 7zip
-> winemenubuilder crashes

Why?
1. In winemenubuilder, to thumbnail the shortcut, open_module_icon() is called.
2. It calls:
    hModule = LoadLibraryExW(szFileName, 0, LOAD_LIBRARY_AS_DATAFILE);
3. The szFileName in this case is a .chm file, so loading fails.
4. open_module_icon() returns with the error:
            return HRESULT_FROM_WIN32(GetLastError());
5. But GetLastError() == 0 with this startup-related patchset (which it didn't
before), so HRESULT_FROM WIN32() returns 0.
6. The caller wrongly sees success.
7. The caller thus accesses the invalid IStream pointer -> CRASH.

Hacking winemenubuilder to always return a failed HRESULT when LoadLibraryExW()
fails stops it from crashing, but it still does not fix this bug. Maybe this
bug is caused by the same problem happening somewhere other than
winemenubuilder. Or, there are additional regressions introduced by that
patchset.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list