[Bug 20838] New: Morrowind Graphics Extender's d3d8.dll replacement fails to load

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 26 17:26:27 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=20838

           Summary: Morrowind Graphics Extender's d3d8.dll replacement
                    fails to load
           Product: Wine
           Version: 1.1.33
          Platform: PC
               URL: http://morrgraphext.sourceforge.net/
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kernel32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: chris.kcat at gmail.com


Morrowind Graphics Extender enhances Morrowind's graphics by providing its own
d3d8.dll that calls to d3d9, and catches certain calls to provide enhanced
functionality. Under Wine, the provided d3d8.dll fails to load with exception
c0000005 (sigsegv).

Being open source, I was able to trace the crash to the handling of the
STARTUPINFO provided by GetStartupInfo. As you can see in DllMain here:
https://morrgraphext.svn.sourceforge.net/svnroot/morrgraphext/d3d8/main.cpp
it calls GetStartupInfo then goes right to parsing the lpTitle field to find
the executable name.

Under Wine, though, the returned STARTUPINFO.lpTitle field will either be an
empty string (for the unicode version) or NULL (the ansi version, and sometimes
the unicode version), as opposed to the full application path/exe. Being that
the code uses the ansi version, it gets a NULL lpTitle and segfaults when it
derefs it while looking for the directory separator.

To reproduce, you'll have to install MGE, then run Morrowind using
WINEDLLOVERRIDES="d3d8=n,b;dinput8=n,b"
(it has to be n,b since the dll will also try to load the system/built-in dll).
The crash is reproduceable with any d3d8 app, but will likely not work properly
when fixed if it's not Morrowind.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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