WINED3D: Implement GetCreationParameters

Francois Gouget fgouget at
Wed Mar 8 04:02:05 CST 2006

On Tue, 7 Mar 2006, Peter Beutner wrote:
> Unless some app relies on this crashing behaviour(which I doubt), I don't think wine
> should implement bugs just because MS does it.
> Seems a bit obscure strategy to me to crash in case of an error instead of proper
> error checking/reporting.

This has been discussed many times before (but maybe not in the recent 
past). There are two cases to consider:

  * either some applications do pass NULL thus causing a segfault and 
then expect to catch that exception. As you said, this is pretty 
unlikely here but it has happened with other (non-DirectX) APIs.
    In this case, then Wine must segfault too otherwise the application 
will fail.

  * or the application does not pass a NULL here because it would cause 
it to crash on Windows. But if we merely return an error the application 
will merrily go on, only to crash or report that DirectX does not work a 
while later. By then the source of the problem will be very hard to find 
due to all that happened since this function call.
    The point is that we need to fix the bug that causes the application 
to pass a NULL to Wine in the first place. And the best way to spot it, 
and thus fix it, is if Wine segfaults in the same way as Windows when 
given a NULL.

So segfaulting like Windows does is really the right thing to do.

It may warrant a comment in the code though, especially if there is a 
test with a message right before.

Francois Gouget <fgouget at>    
      You can have my guns when you pry them from my kids cold, dead hands.

More information about the wine-devel mailing list