Try #2 IDirectDraw_CreateSurface Failure on WINE test in dsurface.c code

chris ahrendt celticht32 at yahoo.com
Tue Oct 14 15:34:41 CDT 2008


Yes if we need to move this off list please let me know....

Michael Karcher wrote:
> That's why I suggested you to introduce the err2 label. The end of the
> function should look like this:
>   
Ya, Ich versteh....


here is the first patch to fix exception 1.  I did have the patch with
the skip but decided to try this:

      if (surface4)IDirectDrawSurface_Release(surface4);
      if (surface3) IDirectDrawSurface_Release(surface3);
      if (surface2) IDirectDrawSurface_Release(surface2);
      if (surface1) IDirectDrawSurface_Release(surface1);

If I do the above I get the same exception on :  if (surface3)
IDirectDrawSurface_Release(surface3);
So to fix that exception I have to do the following:

      if (FAILED(hr)) {
        skip("failed to create surface3\n");
        if (surface2) IDirectDrawSurface_Release(surface2);
        if (surface1) IDirectDrawSurface_Release(surface1);
        return;
      }

This is for IDirectDraw_CreateSurface failure which was not caught
before for 3. The following is for the 4th surface :

      if (FAILED(hr)) {
        skip("failed to create surface4\n");
        if (surface2) IDirectDrawSurface_Release(surface3);
        if (surface2) IDirectDrawSurface_Release(surface2);
        if (surface1) IDirectDrawSurface_Release(surface1);
        return;
      }

Next Exception # 2 is caused by lines at 1138 :
      hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface1, NULL);
      ok(hr==DD_OK,"CreateSurface returned: %x\n",hr);

To Fix that exception I have to add the below.

      if (FAILED(hr)) {
        skip("failed to create surface1\n");
        return;
      }

After that exception I have to close the window and reopen a new one to
continue. make test refuses to run or acts strange..
So I figured the env. got hosed by the last exception.

Clean up the ok files and .o and shared object and run make test.

The run 3 is the final output.

The two .ok files contain nothing.

Chris






      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hardware
Type: application/octet-stream
Size: 2312 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081014/1c70d1d5/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exception_2_with_first_set_of_fixes
Type: application/octet-stream
Size: 9111 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081014/1c70d1d5/attachment-0005.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_3
Type: application/octet-stream
Size: 4598 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081014/1c70d1d5/attachment-0006.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exception_1_no_fixes
Type: application/octet-stream
Size: 7753 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081014/1c70d1d5/attachment-0007.obj 


More information about the wine-devel mailing list