Age of Empires 3 crashes after a few minutes

Questions about Wine on Linux
Locked
Isaac Horvath
Level 1
Level 1
Posts: 5
Joined: Fri Nov 16, 2012 9:55 pm

Age of Empires 3 crashes after a few minutes

Post by Isaac Horvath »

Hello all. I'm trying to run a relatively old game, Age of Empires 3, and the expansions, on my Fedora 17 64-bit Linux laptop. Unfortunately, the game crashes after a few minutes. I have reason to believe it's a graphics problem. I'll try to provide as much information as possible.

Specs:
Model: Lenovo Ideapad Z580
Graphics: Intel HD Graphics 4000
CPU: Intel Core i7
Memory: 8.0GB, 1600 MHz
HD: 500GB, 5400 rpm

Steps taken to install the game:
I started with a fresh install of wine-1.5.16. I created a 32-bit prefix (which is necessary to install the game), and ran the following command:

Code: Select all

sh winetricks amstream corefonts d3dx9 d3dx9_43 d3dxof devenum dinput8 dirac directmusic directplay dmsynth dotnet20 dsound dxdiag dxdiagn ffdshow icodecs l3codecx msxml4 quartz vb5run vcrun2003 vcrun2005 vcrun2008 vcrun2010 vcrun6
This is simply what I copied off the latest test, which installs the game on openSUSE. I copied the three install discs into a folder, symlinked d: to point to that folder, and installed without fault. I then used the same method to install each expansion.

Running the game:
I can set the graphics settings pretty high and the game barely slows. However, it has a two graphics problems that I can see; one where certain objects, such as flags and terrain details, flash polygons of colour throughout the viewport, and another where the fog of war appears white.
Screenshot.jpg
The main problem is after a few minutes the game crashes. I get the infamous "Age of Empires 3 has encountered a problem and needs to close. We are sorry for the inconvenience." Here is the debug file I get with that:

Code: Select all

Unhandled exception: page fault on write access to 0x6e3291a0 in 32-bit code (0x00344007).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:00344007 ESP:0033f888 EBP:0033fab8 EFLAGS:00010202(  R- --  I   - - - )
 EAX:6e3291a0 EBX:0033fac4 ECX:0033f890 EDX:00000000
 ESI:0155e530 EDI:0155e5b0
Stack dump:
0x0033f888:  00000001 6e3291a0 43e48c42 40d28727
0x0033f898:  43256899 3e120dce bf3468ce 3f31492c
0x0033f8a8:  3f14ac0c bf03f5bc bf217496 3f300000
0x0033f8b8:  3f6c0000 43e483bc 40e3e774 43251377
0x0033f8c8:  bcf052ee 3f7bc326 bdd567e2 be586a1d
0x0033f8d8:  bddebd74 bf79f49a 3f140000 3f200000
Backtrace:
=>0 0x00344007 in deformerdlly (+0x4007) (0x0033fab8)
0x00344007: 	
Modules:
Module	Address			Debug info	Name (138 modules)
PE	  340000-  351000	Export          deformerdlly
PE	  400000-  f22000	Export          age3y
PE	  f30000- 1183000	Deferred        d3dx9_25
PE	 4c40000- 4df5000	Deferred        dxdiagn
PE	10000000-10014000	Deferred        rockalldll
PE	18000000-18038000	Deferred        binkw32
PE	1c400000-1c418000	Deferred        l3codecx.ax
PE	35500000-35708000	Deferred        quartz
ELF	437c3000-437cc000	Deferred        librt.so.1
PE	50000000-50083000	Deferred        granny2
PE	51080000-510e1000	Deferred        dsound
PE	69b10000-69c5e000	Deferred        msxml4
PE	6ce10000-6cebf000	Deferred        dinput8
PE	772b0000-7731c000	Deferred        riched20
ELF	7b800000-7ba3d000	Deferred        kernel32<elf>
  \-PE	7b810000-7ba3d000	\               kernel32
ELF	7bc00000-7bcd5000	Deferred        ntdll<elf>
  \-PE	7bc10000-7bcd5000	\               ntdll
ELF	7bf00000-7bf04000	Deferred        <wine-loader>
ELF	7c92d000-7c96d000	Deferred        winspool<elf>
  \-PE	7c930000-7c96d000	\               winspool
ELF	7c96d000-7c9da000	Deferred        setupapi<elf>
  \-PE	7c980000-7c9da000	\               setupapi
ELF	7c9da000-7ca00000	Deferred        dxgi<elf>
  \-PE	7c9e0000-7ca00000	\               dxgi
ELF	7cb12000-7cb3d000	Deferred        wbemprox<elf>
  \-PE	7cb20000-7cb3d000	\               wbemprox
ELF	7cb3d000-7cb45000	Deferred        libogg.so.0
ELF	7cb45000-7cb72000	Deferred        libvorbis.so.0
ELF	7cb72000-7ccea000	Deferred        libvorbisenc.so.2
ELF	7ccea000-7cd29000	Deferred        libflac.so.8
ELF	7cd29000-7cd35000	Deferred        libgsm.so.1
ELF	7cd35000-7cd50000	Deferred        libnsl.so.1
ELF	7cd50000-7cd9a000	Deferred        libdbus-1.so.3
ELF	7cd9a000-7cda1000	Deferred        libasyncns.so.0
ELF	7cda1000-7ce0a000	Deferred        libsndfile.so.1
ELF	7ce0a000-7ce71000	Deferred        libpulsecommon-1.1.so
ELF	7ce71000-7cebf000	Deferred        libpulse.so.0
ELF	7cebf000-7cfa5000	Deferred        libasound.so.2
ELF	7cfc4000-7cff3000	Deferred        winealsa<elf>
  \-PE	7cfd0000-7cff3000	\               winealsa
ELF	7cff3000-7d018000	Deferred        mmdevapi<elf>
  \-PE	7d000000-7d018000	\               mmdevapi
ELF	7d018000-7d460000	Deferred        libdricore9.0.0.so.1
ELF	7d5ea000-7d5f4000	Deferred        libwrap.so.0
ELF	7d5f4000-7d5ff000	Deferred        libpciaccess.so.0
ELF	7d6e8000-7d70a000	Deferred        libdrm_intel.so.1
ELF	7d70a000-7d7fc000	Deferred        i965_dri.so
ELF	7d7fc000-7d809000	Deferred        libdrm.so.2
ELF	7d809000-7d822000	Deferred        libxcb-glx.so.0
ELF	7d822000-7d894000	Deferred        libgl.so.1
ELF	7d894000-7d99d000	Deferred        opengl32<elf>
  \-PE	7d8b0000-7d99d000	\               opengl32
ELF	7d99d000-7da0e000	Deferred        ddraw<elf>
  \-PE	7d9a0000-7da0e000	\               ddraw
ELF	7db91000-7dbb0000	Deferred        libglapi.so.0
ELF	7dbb3000-7dbba000	Deferred        libxtst.so.6
ELF	7dbba000-7dbc3000	Deferred        libjson.so.0
ELF	7dbc3000-7dbca000	Deferred        libasound_module_pcm_pulse.so
ELF	7dbcf000-7dbf3000	Deferred        gameux<elf>
  \-PE	7dbd0000-7dbf3000	\               gameux
ELF	7dbf3000-7dc26000	Deferred        msctf<elf>
  \-PE	7dc00000-7dc26000	\               msctf
ELF	7dc26000-7dc3a000	Deferred        shfolder<elf>
  \-PE	7dc30000-7dc3a000	\               shfolder
ELF	7dc3a000-7dc70000	Deferred        uxtheme<elf>
  \-PE	7dc40000-7dc70000	\               uxtheme
ELF	7dc89000-7dc8f000	Deferred        libxfixes.so.3
ELF	7dc8f000-7dc9a000	Deferred        libxcursor.so.1
ELF	7dc9f000-7dca2000	Deferred        libx11-xcb.so.1
ELF	7dcd6000-7dcff000	Deferred        libexpat.so.1
ELF	7dcff000-7dd34000	Deferred        libfontconfig.so.1
ELF	7dd34000-7dd44000	Deferred        libxi.so.6
ELF	7dd44000-7dd4d000	Deferred        libxrandr.so.2
ELF	7dd4d000-7dd6f000	Deferred        libxcb.so.1
ELF	7dd6f000-7dea7000	Deferred        libx11.so.6
ELF	7dea7000-7deb9000	Deferred        libxext.so.6
ELF	7deb9000-7ded3000	Deferred        libice.so.6
ELF	7def2000-7df84000	Deferred        winex11<elf>
  \-PE	7df00000-7df84000	\               winex11
ELF	7df84000-7e024000	Deferred        libfreetype.so.6
ELF	7e024000-7e04f000	Deferred        msvfw32<elf>
  \-PE	7e030000-7e04f000	\               msvfw32
ELF	7e04f000-7e094000	Deferred        avifil32<elf>
  \-PE	7e060000-7e094000	\               avifil32
ELF	7e094000-7e1c0000	Deferred        oleaut32<elf>
  \-PE	7e0b0000-7e1c0000	\               oleaut32
ELF	7e1c0000-7e2c4000	Deferred        comctl32<elf>
  \-PE	7e1d0000-7e2c4000	\               comctl32
ELF	7e2c4000-7e338000	Deferred        shlwapi<elf>
  \-PE	7e2d0000-7e338000	\               shlwapi
ELF	7e338000-7e561000	Deferred        shell32<elf>
  \-PE	7e350000-7e561000	\               shell32
ELF	7e561000-7e57a000	Deferred        libresolv.so.2
ELF	7e580000-7e58a000	Deferred        libxrender.so.1
ELF	7e58a000-7e590000	Deferred        libxxf86vm.so.1
ELF	7e590000-7e599000	Deferred        libsm.so.6
ELF	7e599000-7e5be000	Deferred        iphlpapi<elf>
  \-PE	7e5a0000-7e5be000	\               iphlpapi
ELF	7e5be000-7e6fb000	Deferred        wined3d<elf>
  \-PE	7e5d0000-7e6fb000	\               wined3d
ELF	7e6fb000-7e737000	Deferred        d3d9<elf>
  \-PE	7e700000-7e737000	\               d3d9
ELF	7e737000-7e75b000	Deferred        imm32<elf>
  \-PE	7e740000-7e75b000	\               imm32
ELF	7e75b000-7e7f9000	Deferred        msvcrt<elf>
  \-PE	7e770000-7e7f9000	\               msvcrt
ELF	7e7f9000-7e82d000	Deferred        ws2_32<elf>
  \-PE	7e800000-7e82d000	\               ws2_32
ELF	7e82d000-7e858000	Deferred        msacm32<elf>
  \-PE	7e830000-7e858000	\               msacm32
ELF	7e858000-7e983000	Deferred        ole32<elf>
  \-PE	7e870000-7e983000	\               ole32
ELF	7e983000-7ea99000	Deferred        gdi32<elf>
  \-PE	7e990000-7ea99000	\               gdi32
ELF	7ea99000-7eab6000	Deferred        libgcc_s.so.1
ELF	7eab6000-7ec0c000	Deferred        user32<elf>
  \-PE	7ead0000-7ec0c000	\               user32
ELF	7ec0c000-7ecbf000	Deferred        winmm<elf>
  \-PE	7ec10000-7ecbf000	\               winmm
ELF	7ecbf000-7ed29000	Deferred        advapi32<elf>
  \-PE	7ecd0000-7ed29000	\               advapi32
ELF	7ed29000-7eda9000	Deferred        rpcrt4<elf>
  \-PE	7ed30000-7eda9000	\               rpcrt4
ELF	7eda9000-7edb6000	Deferred        libnss_files.so.2
ELF	7efb6000-7efe1000	Deferred        libm.so.6
ELF	7efe2000-7efe6000	Deferred        libxdamage.so.1
ELF	7efe6000-7f000000	Deferred        version<elf>
  \-PE	7eff0000-7f000000	\               version
ELF	f73b3000-f73b8000	Deferred        libdl.so.2
ELF	f73b8000-f756a000	Deferred        libc.so.6
ELF	f756a000-f7584000	Deferred        libpthread.so.0
ELF	f7584000-f76c8000	Dwarf           libwine.so.1
ELF	f76c8000-f76cc000	Deferred        libxinerama.so.1
ELF	f76cc000-f76d0000	Deferred        libxau.so.6
ELF	f76e0000-f76e6000	Deferred        libuuid.so.1
ELF	f76e8000-f7709000	Deferred        ld-linux.so.2
ELF	f7709000-f770a000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
0000000e services.exe
	00000020    0
	0000001f    0
	00000015    0
	00000010    0
	0000000f    0
00000012 winedevice.exe
	0000001d    0
	00000019    0
	00000014    0
	00000013    0
0000001b plugplay.exe
	00000021    0
	0000001e    0
	0000001c    0
00000022 explorer.exe
	00000023    0
00000024 (D) C:\Program Files\Microsoft Games\Age of Empires III\age3y.exe
	00000037    0
	00000035   15
	00000034   15
	0000002e   15
	00000027    0
	00000026    0
	00000025    0 <==
System information:
    Wine build: wine-1.5.16
    Platform: i386
    Host system: Linux
    Host version: 3.6.6-1.fc17.x86_64
This happens with each expansion.

Steps I have tried to understand/fix the problem:
I played around with the graphics settings in the game. It tends to last longer with the settings down, but oddly enough it lasts much longer with shader and shadow settings on high.
I recompiled Mesa 9.0 to with the --enable-texture-float flag so as to have support for a higher version of OpenGL (3.0).
I tried messing around with driconf, namely enabling S3TC compression, but nothing I do in driconf seems to have an effect on my system - is it obsolete? My driver is i965.
I searched through the 100000 or so lines of WINEDEBUG=+relay output that occur before the crash, but it's all wine Direct3D and a couple of trivial kernel32 calls. This is another reason I think it's a graphics problem.
I tried monitoring my GPU temperature with lm_sensors, and it increases during gameplay, but there's no noticeable spike before the crash, nor does it go above the temperature marked "high".
I tried monitoring my GPU usage with intel_gpu_top, but running any demanding graphics application alongside it freezes everything and I have to power off my computer and restart.

I'm not entirely sure where to go from here. I'm pretty positive it's a graphics issue but I have no concrete evidence. Any suggestions on steps to get the game working or even debug it?
User avatar
dimesio
Moderator
Moderator
Posts: 13207
Joined: Tue Mar 25, 2008 10:30 pm

Re: Age of Empires 3 crashes after a few minutes

Post by dimesio »

You have installed a lot of winetricks; the AppDB howto only mentions 4 native dlls being needed. Try reinstalling to a clean wineprefix and following the actual howto rather than some random person's test report.
Isaac Horvath
Level 1
Level 1
Posts: 5
Joined: Fri Nov 16, 2012 9:55 pm

Re: Age of Empires 3 crashes after a few minutes

Post by Isaac Horvath »

I should have specified that I tried that first, and got a feature error (1603) during the install. The winetricks took away that problem. I did some testing to see how many scripts I could avoid installing, but I could only eliminate a few.
I also tried compiling wine-0.9.53 from source (the last known version to work with AoE3) but that was a horrendous task and I gave up.
User avatar
dimesio
Moderator
Moderator
Posts: 13207
Joined: Tue Mar 25, 2008 10:30 pm

Re: Age of Empires 3 crashes after a few minutes

Post by dimesio »

Isaac Horvath wrote:I also tried compiling wine-0.9.53 from source (the last known version to work with AoE3)
Where did you get that idea? The most recent test report--the one you copied the list of winetricks from--is for 1.4, and rates it gold.
Isaac Horvath
Level 1
Level 1
Posts: 5
Joined: Fri Nov 16, 2012 9:55 pm

Re: Age of Empires 3 crashes after a few minutes

Post by Isaac Horvath »

It's down the list of how-to's. I did it because I figured there was nothing to lose by trying. I don't need wine for much other than AoE3 right now.
So you suggest I try 1.4 instead of 1.5.16? I suppose I'll give that a shot. I was considering submitting a bug report or test results, but I don't know whether it's wine or just my machine being unable to handle the game. I don't have any other high-graphics games to test (native Minecraft works fine) my system with, nor do I have another computer with better graphics to try it on.

Thanks for your help so far, though. It really means a lot.
Isaac Horvath
Level 1
Level 1
Posts: 5
Joined: Fri Nov 16, 2012 9:55 pm

Re: Age of Empires 3 crashes after a few minutes

Post by Isaac Horvath »

Sorry for the double post - I couldn't figure out how to edit.

I also should mention that the game works fine on my copy of Windows 7 on the same laptop. I couldn't find an RPM for Wine 1.4 and compiling from source was taking an incredibly long time. I tried the trial version of Crossover with the same result. Another bit of information is that with "export vblank_mode=0" the game behaves the same but crashes almost immediately.
User avatar
dimesio
Moderator
Moderator
Posts: 13207
Joined: Tue Mar 25, 2008 10:30 pm

Re: Age of Empires 3 crashes after a few minutes

Post by dimesio »

What it does on Windows doesn't matter. The hardware may be the same, but drivers are not, and Intel's Linux drivers are notoriously bad.
Isaac Horvath
Level 1
Level 1
Posts: 5
Joined: Fri Nov 16, 2012 9:55 pm

Re: Age of Empires 3 crashes after a few minutes

Post by Isaac Horvath »

I fixed the problem. After some Google searching of the phrase "Too many declaration changes or converting dynamic buffer, stopping converting", I downloaded the source of the latest development version, 1.5.17, and made an edit to the source code so wine would continue converting regardless. It installed fine and now runs very well at max settings, with the exception of the fog of war being white. Because this is so specific to Intel architecture and performance on other, newer high-end graphical applications might nosedive with this configuration, I'm not going to file a bug report or submit test results or anything. If anyone encounters this problem in the future, PM me and I'll get an email can help you out.

Thanks again, dimesio.
Locked