how to fix timeSetEvent exception page fault

Questions about Wine on Linux
Locked
sponsor61
Level 3
Level 3
Posts: 59
Joined: Tue Apr 07, 2020 10:05 pm

how to fix timeSetEvent exception page fault

Post by sponsor61 »

When I installed a patch to the PC sim Rowan's Battle Of Britain, (which I already mentioned in this post: viewtopic.php?f=8&t=34544) and tried to run it under Ubuntu 20.04/wine 5.0, I got a "mfc42.dll not found" error.

I fixed this with the command "winetricks mfc42".

Now I'm stuck on a timeSetEvent exception (see complete backtrace below). timeSetEvent is apparently in winmm.dll, but this dll is already present:

When I issue the command "find . -print | grep winmm" in the wineprefix directory I get the output
./drive_c/windows/syswow64/winmm.dll
./drive_c/windows/system32/winmm.dll

How can I fix this error?

Thanks!

full backtrace:
---------------
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0xf7c6572a).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:006b GS:0063
EIP:f7c6572a ESP:0032fc48 EBP:0032fc68 EFLAGS:00210246( R- -- I Z- -P- )
EAX:00000000 EBX:00000000 ECX:00000001 EDX:00000000
ESI:00000001 EDI:00000000
Stack dump:
0x0032fc48: 005e76c0 7f4ea29b 00000001 0000000a
0x0032fc58: 0032fc74 00000000 01540308 0032fc80
0x0032fc68: 0032fcdc 0040b9ca 0040ba1a 00230067
0x0032fc78: 0032fc94 0040b9ca 00000001 0000000a
0x0032fc88: 00ce40d4 005e76dc 0062ef98 3fff8000
0x0032fc98: 5f403ed0 0154048c 0032fcb8 5f4d00d8
Backtrace:
=>0 0xf7c6572a (0x0032fc68)
1 0x0040b9ca timeSetEvent+0xffffffff() in bob (0x0032fcdc)
2 0x0040c977 timeSetEvent+0xffffffff() in bob (0x0032fe70)
3 0x5f40b4f3 EntryPoint+0x57cf() in mfc42 (0x0032ff30)
4 0x7b454882 in kernel32 (+0x34881) (0x0032ff48)
5 0x7b454cfc in kernel32 (+0x34cfb) (0x0032ffd8)
6 0x7b45488e in kernel32 (+0x3488d) (0x0032ffec)
0xf7c6572a: movq 0x0(%edi),%mm0
Modules:
Module Address Debug info Name (41 modules)
PE 400000- c2b000 PDB bob
PE 1cd0000- 1d73000 Deferred boblang
PE 10000000-10084000 Deferred lib3d
PE 5f400000-5f4f2000 Export mfc42
PE 7a840000-7a844000 Deferred opengl32
PE 7b020000-7b023000 Deferred kernelbase
PE 7b420000-7b5db000 Export kernel32
PE 7bc30000-7bc34000 Deferred ntdll
PE 7c920000-7c923000 Deferred msacm32
PE 7c940000-7c943000 Deferred winealsa
PE 7d410000-7d413000 Deferred midimap
PE 7d430000-7d433000 Deferred winepulse
PE 7d460000-7d464000 Deferred mmdevapi
PE 7d4b0000-7d4b8000 Deferred oleaut32
PE 7d610000-7d614000 Deferred uxtheme
PE 7d6b0000-7d6bf000 Deferred setupapi
PE 7d920000-7d924000 Deferred winex11
PE 7df60000-7df64000 Deferred ucrtbase
PE 7e060000-7e064000 Deferred dsound
PE 7e0b0000-7e0b3000 Deferred msvcirt
PE 7e130000-7e201000 Deferred dbghelp
PE 7e130000-7e201000 Deferred imagehlp
PE 7e210000-7e213000 Deferred msvcp60
PE 7e300000-7e303000 Deferred shcore
PE 7e330000-7e338000 Deferred shlwapi
PE 7e3c0000-7ec96000 Deferred shell32
PE 7edf0000-7edf4000 Deferred wined3d
PE 7ef50000-7ef54000 Deferred ddraw
PE 7efc0000-7efc4000 Deferred imm32
PE 7eff0000-7eff3000 Deferred usp10
PE 7f060000-7f0de000 Deferred comctl32
PE 7f1d0000-7f1db000 Deferred dinput
PE 7f230000-7f239000 Deferred msacm32
PE 7f280000-7f284000 Deferred rpcrt4
PE 7f330000-7f358000 Deferred ole32
PE 7f490000-7f494000 Deferred msvcrt
PE 7f560000-7f564000 Deferred advapi32
PE 7f5f0000-7f5f7000 Deferred gdi32
PE 7f750000-7f838000 Deferred user32
PE 7f970000-7f9ed000 Deferred winmm
PE 7ffd0000-7ffd4000 Deferred version
Threads:
process tid prio (all id:s are in hex)
00000008 (D) C:\Program Files (x86)\Rowan Software\Battle Of Britain\bob.exe
00000036 0
00000033 0
00000030 15
0000002f 15
0000002e 0
0000002d 0
0000002c 15
00000009 0 <==
0000000e services.exe
00000027 0
0000001a 0
00000013 0
00000010 0
0000000f 0
00000011 plugplay.exe
00000017 0
00000016 0
00000012 0
00000018 winedevice.exe
0000002b 0
00000020 0
0000001d 0
0000001c 0
0000001b 0
00000019 0
0000001e explorer.exe
00000024 0
00000023 0
00000022 0
00000021 0
0000001f 0
00000025 winedevice.exe
0000002a 0
00000029 0
00000028 0
00000026 0
System information:
Wine build: wine-5.0 (Ubuntu 5.0-3ubuntu1)
Platform: i386 (WOW64)
Version: Windows 7
Host system: Linux
Host version: 5.4.0-53-generic
sponsor61
Level 3
Level 3
Posts: 59
Joined: Tue Apr 07, 2020 10:05 pm

Re: how to fix timeSetEvent exception page fault

Post by sponsor61 »

The free game I'm attempting to run under linux/wine is at this link:

http://www.mediafire.com/file/wwh9saa47 ... ar.gz/file

416b3cdcff7237e0a16d7d46a51af20c401b15cd2a46347d288794f47ec8964f RowansBattleOfBritain_0_99_patch.tar.gz

The source code is here:
https://github.com/xor2003/bob-flight-sim
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: how to fix timeSetEvent exception page fault

Post by spoon0042 »

I was able to start the game with wine-staging at least. If you want to give that a try instructions are here: https://wiki.winehq.org/Ubuntu
sponsor61
Level 3
Level 3
Posts: 59
Joined: Tue Apr 07, 2020 10:05 pm

Re: how to fix timeSetEvent exception page fault

Post by sponsor61 »

That's great news! When I tried to reproduce your result with wine-staging, I got the same timeSetEvent exception. Perhaps you can see where I'm going wrong.

Here are the steps I used:
1. remove wine 5.0 and install wine-staging per the instructions at https://wiki.winehq.org/Ubuntu
2. create a new wine prefix, export WINEPREFIX=<path>, winecfg to populate new directory tree
3. copy "Rowan Software" from the tar file under "Program Files (x86)" in the new wineprefix
4. cd to Battle of Britain directory
5. wine bob.exe
6. mfc42 error, install winetricks, winetricks mfc42
7. wine bob.exe
8. timeSetEvent exception with backtrace similar to previously:
Unhandled exception: page fault on read access to 0x00000108 in 32-bit code (0x00408601).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:00408601 ESP:0031f370 EBP:0031f400 EFLAGS:00210202( R- -- I - - - )
EAX:00000000 EBX:01e041e6 ECX:00000012 EDX:00000000
ESI:01e02618 EDI:00000000
Stack dump:
0x0031f370: 01e02618 0040834f 01e02618 01e02618
0x0031f380: 0040838d 0031f3cc 00000000 00000000
0x0031f390: 01ecf3d0 00000000 12345678 00000000
0x0031f3a0: 00000000 00000580 00000400 00000000
0x0031f3b0: 00000000 00000580 00000400 00000000
0x0031f3c0: 00000000 00000032 00000050 00000020
Backtrace:
=>0 0x00408601 timeSetEvent+0xffffffff() in bob (0x0031f400)
1 0x004083c4 timeSetEvent+0xffffffff() in bob (0x0031f4c0)
2 0x5f401cea EntryPoint+0xffffffff() in mfc42 (0x0031f4e0)
3 0x5f401c73 EntryPoint+0xffffffff() in mfc42 (0x0031f540)
4 0x5f401bfb EntryPoint+0xffffffff() in mfc42 (0x0031f55c)
5 0x5f401bba EntryPoint+0xffffffff() in mfc42 (0x0031f588)
6 0x6eda97fc EntryPoint+0xffffffff() in user32 (0x0031f5b8)
7 0x6eda9eb7 EntryPoint+0xffffffff() in user32 (0x0000000f)
8 0x6edaa9c6 EntryPoint+0xffffffff() in user32 (0x6edb4f80)
9 0x6edac40b EntryPoint+0xffffffff() in user32 (0x6edb4f80)
10 0x6ed5fad1 EntryPoint+0xffffffff() in user32 (0x00000000)
11 0x6ed64b9c EntryPoint+0xffffffff() in user32 (0x7ffc2000)
12 0x6ed64e02 EntryPoint+0xffffffff() in user32 (0x00000080)
13 0x6ed733d8 EntryPoint+0xffffffff() in user32 (0x00000080)
14 0x6ed739fb EntryPoint+0xffffffff() in user32 (0x0031fe68)
15 0x0040c9d1 timeSetEvent+0xffffffff() in bob (0x0031fe68)
16 0x5f40b4f3 EntryPoint+0x57cf() in mfc42 (0x0031ff28)
17 0x7b62d49c EntryPoint+0xffffffff() in kernel32 (0x0031ff5c)
18 0x7bc5bd97 EntryPoint+0xffffffff() in ntdll (0x0031ff5c)
19 0x7bc5bfd0 EntryPoint+0xffffffff() in ntdll (0x0031ffec)
0x00408601 timeSetEvent+0xffffffff in bob: movl 0x108(%eax),%ecx
Modules:
Module Address Debug info Name (123 modules)
PE 400000- c2b000 PDB bob
PE c30000- 10ad000 Deferred comctl32
PE 10b0000- 1519000 Deferred ole32
PE 28e0000- 2983000 Deferred boblang
PE 10000000-10084000 Deferred lib3d
PE 5f400000-5f4f2000 Export mfc42
PE 61740000-61821000 Deferred advapi32
PE 62fc0000-631f0000 Deferred rpcrt4
PE 63480000-6349c000 Deferred version
PE 63bc0000-63c00000 Deferred shcore
PE 64a40000-64b5c000 Deferred shlwapi
PE 64ec0000-65298000 Deferred oleaut32
PE 65bc0000-65bdb000 Deferred midimap
ELF 6609e000-67d40000 Deferred libnvidia-glcore.so.450.80.02
PE 67d40000-67dc5000 Deferred mmdevapi
PE 682c0000-68477000 Deferred dsound
PE 68500000-6864b000 Deferred combase
PE 68700000-68792000 Deferred uxtheme
PE 68e00000-68e22000 Deferred aclui
PE 68fc0000-691d9000 Deferred msvcp60
PE 697c0000-69a11000 Deferred ddraw
PE 6a040000-6a0a2000 Deferred msacm32
PE 6a400000-6a572000 Deferred winmm
PE 6aa40000-6ab24000 Deferred usp10
PE 6bc00000-6bc9d000 Deferred sechost
PE 6bcc0000-6be98000 Deferred setupapi
PE 6c9c0000-6ce64000 Deferred gdi32
PE 6db40000-6db71000 Deferred imagehlp
PE 6ed00000-6f3a2000 Dwarf user32
PE 6fa80000-6fb51000 Deferred dbghelp
PE 70040000-70064000 Deferred msacm32
PE 70d40000-70da8000 Deferred msvcirt
PE 71200000-71246000 Deferred imm32
ELF 7662f000-7a800000 Deferred libllvm-10.so.1
ELF 7a800000-7a946000 Deferred opengl32<elf>
\-PE 7a840000-7a946000 \ opengl32
PE 7b000000-7b340000 Deferred kernelbase
PE 7b600000-7b92a000 Dwarf kernel32
ELF 7ba16000-7bb00000 Deferred libglx_nvidia.so.0
PE 7bc00000-7bef6000 Dwarf ntdll
ELF 7bfa3000-7bfdf000 Deferred libglx.so.0
ELF 7bfdf000-7c0f5000 Deferred libasound.so.2
ELF 7c3f5000-7c414000 Deferred libxcb-glx.so.0
ELF 7c414000-7c491000 Deferred libgldispatch.so.0
ELF 7c491000-7c4fe000 Deferred libgl.so.1
ELF 7c4fe000-7c536000 Deferred libedit.so.2
ELF 7c73a000-7c781000 Deferred winealsa<elf>
\-PE 7c750000-7c781000 \ winealsa
ELF 7c781000-7c7a7000 Deferred libgpg-error.so.0
ELF 7c7a7000-7c834000 Deferred libvorbisenc.so.2
ELF 7c834000-7c917000 Deferred libgcrypt.so.20
ELF 7cc5e000-7cc74000 Deferred libdrm.so.2
ELF 7cc74000-7cc8d000 Deferred libresolv.so.2
ELF 7cc8d000-7ccba000 Deferred libvorbis.so.0
ELF 7ccba000-7ccf5000 Deferred libflac.so.8
ELF 7ccf5000-7cd18000 Deferred liblz4.so.1
ELF 7cd18000-7cd44000 Deferred liblzma.so.5
ELF 7cd44000-7ce00000 Deferred libsystemd.so.0
ELF 7cf10000-7cfa2000 Deferred libsndfile.so.1
ELF 7cfa2000-7d000000 Deferred libdbus-1.so.3
ELF 7d000000-7d005000 Deferred <wine-loader>
ELF 7d009000-7d032000 Deferred libtinfo.so.6
ELF 7d033000-7d050000 Deferred libnsl.so.1
ELF 7d15a000-7d163000 Deferred libxcb-sync.so.1
ELF 7d163000-7d1f1000 Deferred libpulsecommon-13.99.so
ELF 7d1f1000-7d24f000 Deferred libpulse.so.0
ELF 7d24f000-7d254000 Deferred libxcb-present.so.0
ELF 7d254000-7d25a000 Deferred libxcb-dri3.so.0
ELF 7d26d000-7d2b1000 Deferred winepulse<elf>
\-PE 7d280000-7d2b1000 \ winepulse
ELF 7d2b1000-7d400000 Deferred libx11.so.6
ELF 7d407000-7d40c000 Deferred libx11-xcb.so.1
ELF 7d414000-7d41f000 Deferred libatomic.so.1
ELF 7d420000-7d42c000 Deferred libogg.so.0
ELF 7d42c000-7d436000 Deferred libffi.so.7
ELF 7d436000-7d455000 Deferred libgcc_s.so.1
ELF 7d458000-7d4b5000 Deferred libvulkan.so.1
ELF 7d4b5000-7deef000 Deferred shell32<elf>
\-PE 7d4f0000-7deef000 \ shell32
ELF 7df73000-7df78000 Deferred libnvidia-tls.so.450.80.02
ELF 7dfc5000-7dfcd000 Deferred libxfixes.so.3
ELF 7dfcd000-7dfda000 Deferred libxcursor.so.1
ELF 7dfda000-7dfef000 Deferred libxi.so.6
ELF 7dfef000-7dff4000 Deferred libxcomposite.so.1
ELF 7dff4000-7e003000 Deferred libxrandr.so.2
ELF 7e003000-7e00f000 Deferred libxrender.so.1
ELF 7e00f000-7e017000 Deferred libxxf86vm.so.1
ELF 7e017000-7e01c000 Deferred libxinerama.so.1
ELF 7e01c000-7e03b000 Deferred libbsd.so.0
ELF 7e03b000-7e043000 Deferred libxdmcp.so.6
ELF 7e043000-7e049000 Deferred libxau.so.6
ELF 7e049000-7e078000 Deferred libxcb.so.1
ELF 7e078000-7e08f000 Deferred libxext.so.6
ELF 7e091000-7e098000 Deferred libasyncns.so.0
ELF 7e098000-7e0a4000 Deferred libwrap.so.0
ELF 7e0ad000-7e16c000 Deferred winex11<elf>
\-PE 7e0d0000-7e16c000 \ winex11
ELF 7e3e9000-7e415000 Deferred libexpat.so.1
ELF 7e415000-7e463000 Deferred libfontconfig.so.1
ELF 7e463000-7e481000 Deferred libz.so.1
ELF 7e481000-7e4c0000 Deferred libpng16.so.16
ELF 7e4c0000-7e586000 Deferred libfreetype.so.6
ELF 7e5a4000-7e677000 Deferred msvcrt<elf>
\-PE 7e5d0000-7e677000 \ msvcrt
ELF 7e677000-7e830000 Deferred wined3d<elf>
\-PE 7e6c0000-7e830000 \ wined3d
ELF 7e830000-7e896000 Deferred dinput<elf>
\-PE 7e840000-7e896000 \ dinput
ELF 7e896000-7e8bf000 Deferred gdi32.so
ELF 7e8bf000-7e8d6000 Deferred user32.so
ELF 7e8d6000-7e9ea000 Deferred ucrtbase<elf>
\-PE 7e910000-7e9ea000 \ ucrtbase
ELF 7e9ea000-7ea00000 Deferred wow64cpu<elf>
\-PE 7e9f0000-7ea00000 \ wow64cpu
ELF 7ea00000-7eb87000 Dwarf libwine.so.1
ELF f7b94000-f7b9e000 Deferred libuuid.so.1
ELF f7b9e000-f7ca3000 Deferred libm.so.6
ELF f7ca3000-f7cae000 Deferred librt.so.1
ELF f7cae000-f7d71000 Deferred ntdll.so
ELF f7d71000-f7f60000 Deferred libc.so.6
ELF f7f60000-f7f66000 Deferred libdl.so.2
ELF f7f66000-f7f89000 Deferred libpthread.so.0
ELF f7fa9000-f7fd6000 Deferred ld-linux.so.2
Threads:
process tid prio (all id:s are in hex)
00000020 (D) C:\Program Files (x86)\Rowan Software\Battle Of Britain\bob.exe
["C:\Program Files (x86)\Rowan Software\Battle Of Britain\bob.exe"]
00000024 0 <==
00000114 15
00000118 0
0000011c 0
00000120 15
00000124 0
00000128 15
00000134 0
00000140 0
00000038 services.exe
0000003c 0
00000040 0
0000004c 0
00000070 0
00000088 0
000000a4 0
000000b8 0
000000e4 0
00000044 winedevice.exe
00000048 0
00000054 0
00000058 0
0000005c 0
00000060 plugplay.exe
00000064 0
00000074 0
00000078 0
0000007c 0
00000098 0
00000068 explorer.exe
0000006c 0
000000cc 0
000000d0 0
000000d4 0
00000080 winedevice.exe
00000084 0
0000008c 0
00000090 0
00000094 0
000000a0 0
000000a8 0
000000ac 0
000000b0 svchost.exe
000000b4 0
000000bc 0
000000c0 0
000000dc rpcss.exe
000000e0 0
000000ec 0
000000f0 0
000000f4 0
000000f8 0
000000fc 0
00000154 0
0000010c conhost.exe
00000110 0
00000144 explorer.exe
00000148 0
0000014c 0
00000150 0
System information:
Wine build: wine-5.21 (Staging)
Platform: i386 (WOW64)
Version: Windows 7
Host system: Linux
Host version: 5.4.0-53-generic
sponsor61
Level 3
Level 3
Posts: 59
Joined: Tue Apr 07, 2020 10:05 pm

Re: how to fix timeSetEvent exception page fault

Post by sponsor61 »

after winecfg I selected "Cancel" when asked to install mono and gecko
I'm using Ubuntu 20.04, but I'd be happy to use a different distro if that would make a difference.
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: how to fix timeSetEvent exception page fault

Post by spoon0042 »

Weird, it worked for me. Though I couldn't get the 'windowsInstall' to work, I installed from the .iso and applied the two patches. I don't know if that matters. Or if there's something further that I didn't setup that breaks. Either way it's hard to guess what else to try.
sponsor61
Level 3
Level 3
Posts: 59
Joined: Tue Apr 07, 2020 10:05 pm

Re: how to fix timeSetEvent exception page fault

Post by sponsor61 »

Success :D Now all four of the classic free engineering sims run on linux! Thanks so much for your help. I reproduced your result by installing from scratch, starting with the iso.

Surprisingly, wine 5.21 (Staging) is the only wine version that avoids the testSetEvent exception. Even winehq-devel, which is wine 5.21, produces the testSetEvent exception.

I followed these steps to install successfully:
mkdir iso
sudo mount -o loop BATTLEOFBRITAIN.iso iso/
mkdir WP
export WINEPREFIX=$PWD/WP
# populate wineprefix, enable virtual desktop
winecfg
cd iso/
wine Setup.exe
wineboot
# install the 3 patches
cd RR\ ROWANBOB\ GRAPHICS\ MOD/
wine bob_v098.exe
wine bob_v099.exe
# install new skins and clouds
rsync -a bobMain/ "$WINEPREFIX/drive_c/Program Files (x86)/Rowan Software/Battle Of Britain/"
cd "$WINEPREFIX/drive_c/Program Files (x86)/Rowan Software/Battle Of Britain"
wine bob.exe
Locked