http://bugs.winehq.org/show_bug.cgi?id=18015
Summary: Regression: roller coaster tycoon fails to start Product: Wine Version: unspecified Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput AssignedTo: wine-bugs@winehq.org ReportedBy: awaters1@gmail.com
RollerCoaster Tycoon fails to start with an unhandled exception, here is the git bisect results from wine-1.1.15 to wine-1.1.17
a966293f593e8b75e796a0a923626a1e73403a20 is first bad commit commit a966293f593e8b75e796a0a923626a1e73403a20 Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Jan 16 10:14:24 2009 +0100
wined3d: Add an IWineD3DDeviceParent interface.
Other than being a bit nicer than passing function pointers all over the place, this helps dxgi/d3d10. While the swapchain itself is created in dxgi, its surfaces are constructed in d3d10core, which makes it impractical for dxgi to pass the appropriate function pointers.
:040000 040000 7e5f0e3ca6b8c26e504e1221ce79e8082c44f632 cd852644af310cc9e18110728f9458cc4bde8f0b M dlls :040000 040000 4a2a3d84533d119e4588ae49a5bad8a8ce069d57 51835e3f57b6dc5950559090732503074a5b045e M include
http://bugs.winehq.org/show_bug.cgi?id=18015
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-dinput |directx-d3d Keywords| |regression Summary|Regression: roller coaster |Roller coaster tycoon fails |tycoon fails to start |to start Version|unspecified |1.1.17
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #1 from H. Verbeet hverbeet@gmail.com 2009-04-13 02:39:48 --- Do you have a backtrace?
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #2 from Anthony Waters awaters1@gmail.com 2009-04-13 07:42:09 --- Created an attachment (id=20418) --> (http://bugs.winehq.org/attachment.cgi?id=20418) WINEDEBUG=+relay of application executing
is this what you are talking about?
wine doesn't actually crash when executing, the application displays an error message and then quits
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #3 from Anthony Waters awaters1@gmail.com 2009-04-13 07:48:25 --- hmm let me rephrase the issue,
the unhandled exception is caught by the application and it shows a dialog box, the message says
"Exception Raised - Access Violation, Error Location:Unknown"
so wine isn't actually crashing, the application gives an error message
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #4 from H. Verbeet hverbeet@gmail.com 2009-04-13 08:19:12 --- Ok, this uses ddraw, right? Could you run with WINEDEBUG="+seh,+ddraw,+d3d", preferably with a recent version from git?
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #5 from Anthony Waters awaters1@gmail.com 2009-04-13 11:00:41 --- Created an attachment (id=20422) --> (http://bugs.winehq.org/attachment.cgi?id=20422) wine output with +seh,+ddraw,+d3d latest git
here is the output from latest git
trace:ddraw:DDRAW_Create WineD3D created at 0x131950
happens before the exception shows up
http://bugs.winehq.org/show_bug.cgi?id=18015
Anthony Waters awaters1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #20422|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #6 from H. Verbeet hverbeet@gmail.com 2009-04-13 14:17:32 --- Is the demo supposed to have the same issue? It seems to work for me. Going by the logs, it appears to crash after the HeapAlloc() call in IWineD3DImpl_CreateDevice(), but before the "Created WineD3DDevice object @ %p\n" TRACE. The only way I can see that happen is if ppReturnedDeviceInterface would be an invalid pointer, but that's assigned as &wineD3DDevice in DDRAW_Create(). You could try to add some traces to IWineD3DImpl_CreateDevice() to verify that's the place it crashes (eg. print object and ppReturnedDeviceInterface right after the HeapAlloc() call).
I also noticed a different exception caused by a call to IoQueryDeviceDescription() earlier in the log. That's probably unrelated, but please try with a clean Wine prefix to rule that out as the cause.
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #7 from Anthony Waters awaters1@gmail.com 2009-04-13 16:39:05 --- this weekend I'll dive deeper into it, for now I have to do my taxes
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #8 from Anthony Waters awaters1@gmail.com 2009-04-18 08:29:07 --- Yup it fails at the line
*ppReturnedDeviceInterface = (IWineD3DDevice *)object;
If I comment it out it works, but has an exception later on
Also it happens for the demo as well, would my version of mesa matter?
from looking at the commit it doesn't look like much changed in the directx.c file to cause an issue
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #9 from Anthony Waters awaters1@gmail.com 2009-04-18 08:32:14 --- Created an attachment (id=20525) --> (http://bugs.winehq.org/attachment.cgi?id=20525) output with printing ppReturnedDeviceInterface
the raise_exception info[1] points to ppReturnedDevciceInterface, I don't know if that means anything special
http://bugs.winehq.org/show_bug.cgi?id=18015
Anthony Waters awaters1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #20525|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=18015
--- Comment #10 from H. Verbeet hverbeet@gmail.com 2009-04-18 17:21:52 --- (In reply to comment #8)
Yup it fails at the line
*ppReturnedDeviceInterface = (IWineD3DDevice *)object;
If I comment it out it works, but has an exception later on
It looks like some kind of stack corruption. You may want to print both wineD3DDevice and &wineD3DDevice at the start of DDRAW_Create() and right before the IWineD3D_CreateDevice() call in DDRAW_Create(). Also print it at the start of IWineD3DImpl_CreateDevice(), and compare the different values.
Note that the value of *ppReturnedDeviceInterface, 0x65726944 is different from the NULL it was initialized with in DDRAW_Create(). Also note that 0x65726944 looks like character data ("Dire...").
Also it happens for the demo as well, would my version of mesa matter?
Considering the demo works for me with the nvidia drivers, it might. If this is caused by Mesa, the corruption would have to occur inside the pWineDirect3DCreate() call from DDRAW_Create().
from looking at the commit it doesn't look like much changed in the directx.c file to cause an issue
I doubt the commit is the cause of the problem, but it does add an extra parameter to IWineD3D_CreateDevice(), and changes the position of the output parameter. That changes the layout of the data on the stack, which could make already existing stack corruption more visible.
(In reply to comment #9)
the raise_exception info[1] points to ppReturnedDevciceInterface, I don't know if that means anything special
That's the address is tries to write to. Code c0000005 means EXCEPTION_ACCESS_VIOLATION, 00000001 in info[0] means EXCEPTION_WRITE_FAULT.
http://bugs.winehq.org/show_bug.cgi?id=18015
Anthony Waters awaters1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #11 from Anthony Waters awaters1@gmail.com 2009-04-19 21:31:30 --- ok so I cleared out my ~/.wine directory and added a symlink from drive_c/Program Files to the actual directory that contained RollerCoasterTycoon(RCT)'s files
After doing this the demo ran fine, no errors
so I did WINEDEBUG="+seh,+ddraw,+d3d,+dinput,+loaddll,+relay,+msgbox"
for both the demo and the full version, turns out the demo tries to load some stuff from the registry and after that it loads fine. However, the full version also tries to load stuff from the registry, but fails because it is not in there (cleaned out the .wine prefix so the old registry was not there anymore)
copied the old register into the .wine prefix and after that running RCT works now
Now that I think about it the issue was most likely due to a rogue .dll file that was compatable with wine-1.1.15, but was broken in wine-1.1.17 and later
thanks for your time
http://bugs.winehq.org/show_bug.cgi?id=18015
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Component|directx-d3d |-unknown
--- Comment #12 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-19 23:02:01 --- Closing invalid.