WineHQ
Bug Tracking Database – Bug 33890

 Bugzilla

 

Last modified: 2013-11-15 13:40:07 UTC  

Anno 1602 (demo): crash during startup

Bug 33890 - Anno 1602 (demo): crash during startup
Anno 1602 (demo): crash during startup
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: d3d
1.6-rc3
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.annomuseum.de/webseiten/SF...
: download, regression
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-06-26 06:40 UTC by Frédéric Delanoy
Modified: 2013-11-15 13:40 UTC (History)
2 users (show)

See Also:
Regression SHA1: 6560135c64550343be95a83532cad78aa5787f5a
Fixed by SHA1: 769dd6d158ea1ef66e33a1416724511cc4eaf1e5
Distribution: ---
Staged patchset:


Attachments
Terminal log + crash - wine-1.6-rc3-38-g9c49367 (11.24 KB, text/plain)
2013-06-26 06:40 UTC, Frédéric Delanoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Delanoy 2013-06-26 06:40:58 UTC
Created attachment 44987 [details]
Terminal log + crash - wine-1.6-rc3-38-g9c49367

Install the demo version and try to start it
=> crashes after a splash screen is shown for half a second or so

Using wine-1.6-rc3-38-g9c49367
Comment 1 Béla Gyebrószki 2013-08-13 13:09:07 UTC
I can reproduce the problem, still present in Wine 1.7.0.
In fact, this is a regression from Wine-1.6-rc1:

6560135c64550343be95a83532cad78aa5787f5a is the first bad commit
commit 6560135c64550343be95a83532cad78aa5787f5a
Author: Stefan Dösinger <stefan@codeweavers.com>
Date:   Wed Jun 5 10:55:39 2013 +0200

    ddraw: Update the focus window after recreating the swapchain.

:040000 040000 a5de53756a31f03454eb494fcbc113ad5a706ee2 d5c112ee5270900704400b4d1db03ef0bb9ae912 M	dlls
Comment 2 Stefan Dösinger 2013-08-18 13:43:24 UTC
I can reproduce this, will look into it.
Comment 3 Stefan Dösinger 2013-08-21 06:32:26 UTC
I'm not entirely sure what is going on here. The SetWindowPos call in wined3d_device_acquire_focus_window sends a WM_ACTIVATEAPP message, which prompts the app to call SetCooperativeLevel again. During the second call, ddraw attempts to recreate the swapchain. It thinks the application-provided window is a hidden d3d window it itself created because ddraw->dest_window is not set yet. The destruction of the Window causes the app to destroy the ddraw object. During the destruction, SetCooperativeLevel is called recursively another time to set DDSCL_NORMAL, which succeeds. Then, it proceeds with the second SetCooperativeLevel call, which eventually fails because ddraw->wine_d3d is NULL, so wined3d_get_adapter_display_mode segfaults.

I suspect that the WM_ACTIVATEAPP message that triggers the recursion is wrong, but have no proof for that yet. I have to compare with a Wine version before commit 6560135c to see if the ACTIVATEAPP message and recursive calls happen there or not. If they don't, I have to figure out why, because so far that's not obvious. If they happen, and I think they do, I have to find out if this is in line with Windows' behaviour, and if so, how the application got away with the recursive call prior to 6560135c.

A simple workaround for the crash is to set device->filter_messages to 1 for the SetWindowPos call in wined3d_device_acquire_focus_window. However, I don't know if this is correct.
Comment 4 Stefan Dösinger 2013-08-21 07:01:55 UTC
The version prior to 6560135c also have the first recursive SetCooperativeLevel call. The game works because there's no swapchain yet that could be destroyed, so ddraw doesn't destroy the application's window.
Comment 5 Stefan Dösinger 2013-09-03 03:49:32 UTC
Should be fixed by 769dd6d158ea1ef66e33a1416724511cc4eaf1e5.
Comment 6 Alexandre Julliard 2013-09-13 13:20:23 UTC
Closing bugs fixed in 1.7.2.
Comment 7 Alexandre Julliard 2013-11-15 13:40:07 UTC
Removing 1.6.x milestone from bugs included in 1.6.1.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers