![Wine 上的 Windows 程序如果从其可执行文件所在的目录启动,则可运行,否则会崩溃](https://linux22.com/image/1153231/Wine%20%E4%B8%8A%E7%9A%84%20Windows%20%E7%A8%8B%E5%BA%8F%E5%A6%82%E6%9E%9C%E4%BB%8E%E5%85%B6%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6%E6%89%80%E5%9C%A8%E7%9A%84%E7%9B%AE%E5%BD%95%E5%90%AF%E5%8A%A8%EF%BC%8C%E5%88%99%E5%8F%AF%E8%BF%90%E8%A1%8C%EF%BC%8C%E5%90%A6%E5%88%99%E4%BC%9A%E5%B4%A9%E6%BA%83.png)
我有一个 Windows 游戏(Geometry Dash),如果我从 Nautilus 启动它或 cd 到它的目录并使用 或 启动它,它可以完美wine GeometryDash.exe
运行wine ~/Desktop/IronPig/Progs/Geometry\ Dash/GeometryDash.exe
。
但是,如果我当前的工作目录不是可执行文件所在的目录,并且我使用该命令,wine ~/Desktop/IronPig/Progs/Geometry\ Dash/GeometryDash.exe
我会得到一个带有标题的窗口:Program Error
。
在该窗口中还有一个显示详细信息按钮,它会将我导航到以下错误消息:
Unhandled exception: page fault on read access to 0x0000000c in 32-bit code (0x00c1ec98).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:00c1ec98 ESP:0033fb74 EBP:0033fb74 EFLAGS:00010212( R- -- I -A- - )
EAX:00000000 EBX:038c22e8 ECX:038c22e8 EDX:006cbf18
ESI:038c22e8 EDI:00000000
Stack dump:
0x0033fb74: 0033fbcc 0058b58f 00000000 36e58700
0x0033fb84: 038c22e8 0033fd28 36e58700 038c22e8
0x0033fb94: 038c22e8 440e8000 43a00000 00c61431
0x0033fba4: 0033fbb0 36e58752 038c22e8 3f000000
0x0033fbb4: 3f000000 038c22e8 0033fbe8 00cd86e6
0x0033fbc4: 620b6791 0033fbf4 0033fbf4 0058b443
000c: sel=0067 base=00000000 limit=00000000 32-bit rw-
Backtrace:
=>0 0x00c1ec98 in libcocos2d (+0x5ec98) (0x0033fb74)
1 0x0058b58f in geometrydash (+0x18b58e) (0x0033fbcc)
2 0x0058b443 in geometrydash (+0x18b442) (0x0033fbf4)
3 0x0043ccde in geometrydash (+0x3ccdd) (0x0033fcac)
4 0x00c8109c in libcocos2d (+0xc109b) (0x0033fcf8)
5 0x00660243 in geometrydash (+0x260242) (0x0033fde4)
6 0x006612cb in geometrydash (+0x2612ca) (0x0033fe30)
7 0x7b46068c call_process_entry+0xb() in kernel32 (0x0033fe48)
8 0x7b4616d4 in kernel32 (+0x516d3) (0x0033fe88)
9 0x7bc809ac call_thread_func_wrapper+0xb() in ntdll (0x0033fea8)
10 0x7bc8397d call_thread_func+0xfc() in ntdll (0x0033ffa8)
11 0x7bc8098a RtlRaiseException+0x21() in ntdll (0x0033ffc8)
12 0x7bc529b3 call_dll_entry_point+0x3d2() in ntdll (0x0033ffe8)
13 0xf7e21b7d wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000)
14 0xf7e21ce0 wine_switch_to_stack+0x1f() in libwine.so.1 (0xffa82248)
15 0x7bc589be LdrInitializeThunk+0x24d() in ntdll (0xffa82298)
16 0x7b46780a __wine_kernel_init+0xa69() in kernel32 (0xffa83408)
17 0x7bc59893 __wine_process_init+0x152() in ntdll (0xffa83478)
18 0xf7e1fd37 wine_init+0x2c6() in libwine.so.1 (0xffa834d8)
19 0x7c000ac2 main+0x81() in <wine-loader> (0xffa83928)
20 0xf7c34637 __libc_start_main+0xf6() in libc.so.6 (0x00000000)
0x00c1ec98: pushl 0xc(%eax)
Modules:
Module Address Debug info Name (147 modules)
PE 340000- 353000 Deferred pthreadvce2
PE 360000- 3e4000 Deferred libtiff
PE 400000- a8d000 Export geometrydash
PE a90000- bb7000 Deferred libcurl
PE bc0000- d75000 Export libcocos2d
PE d80000- df1000 Deferred msvcp120
PE e00000- eee000 Deferred msvcr120
PE ef0000- f78000 Deferred sqlite3
PE f80000- 1031000 Deferred steam_api
PE 1040000- 11eb000 Deferred fmod
PE 10000000-1004a000 Deferred libextensions
PE 5a4c0000-5a4d3000 Deferred zlib1
PE 62aa0000-62af4000 Deferred glew32
ELF 7651f000-78520000 Deferred libnvidia-glcore.so.384.111
PE 78520000-785c3000 Deferred msvcr90
PE 78aa0000-78b5f000 Deferred msvcr100
ELF 7a800000-7a935000 Deferred opengl32<elf>
\-PE 7a820000-7a935000 \ opengl32
ELF 7b400000-7b7e2000 Dwarf kernel32<elf>
\-PE 7b410000-7b7e2000 \ kernel32
ELF 7bc00000-7bcf6000 Dwarf ntdll<elf>
\-PE 7bc10000-7bcf6000 \ ntdll
ELF 7c000000-7c004000 Dwarf <wine-loader>
ELF 7c618000-7c644000 Deferred libvorbis.so.0
ELF 7c644000-7c64d000 Deferred libogg.so.0
ELF 7c64d000-7c663000 Deferred libgpg-error.so.0
ELF 7c663000-7c6d8000 Deferred libpcre.so.3
ELF 7c6d8000-7c764000 Deferred libvorbisenc.so.2
ELF 7c764000-7c7c4000 Deferred libflac.so.8
ELF 7c7c4000-7c7e1000 Deferred libgcc_s.so.1
ELF 7c7e1000-7c890000 Deferred libgcrypt.so.20
ELF 7c890000-7c8b6000 Deferred liblzma.so.5
ELF 7c8b6000-7c8dc000 Deferred libselinux.so.1
ELF 7c8dc000-7c8e5000 Deferred librt.so.1
ELF 7c8e5000-7c95e000 Deferred libsndfile.so.1
ELF 7cb38000-7cb3f000 Deferred libasyncns.so.0
ELF 7cb3f000-7cbcd000 Deferred libsystemd.so.0
ELF 7cbcd000-7cc27000 Deferred libdbus-1.so.3
ELF 7cc27000-7ccaf000 Deferred libpulsecommon-8.0.so
ELF 7ccaf000-7cd09000 Deferred libpulse.so.0
ELF 7cd33000-7cd5c000 Deferred winepulse<elf>
\-PE 7cd40000-7cd5c000 \ winepulse
ELF 7cd5c000-7ce8f000 Deferred oleaut32<elf>
\-PE 7cd70000-7ce8f000 \ oleaut32
ELF 7ce8f000-7ceb2000 Deferred mmdevapi<elf>
\-PE 7ce90000-7ceb2000 \ mmdevapi
ELF 7d30d000-7d317000 Deferred libwrap.so.0
ELF 7d317000-7d323000 Deferred libjson-c.so.2
ELF 7d5b4000-7d6cc000 Deferred libgl.so.1
ELF 7d6f6000-7d6fd000 Deferred libxfixes.so.3
ELF 7d6fd000-7d709000 Deferred libxcursor.so.1
ELF 7d709000-7d71c000 Deferred libxi.so.6
ELF 7d71c000-7d720000 Deferred libxcomposite.so.1
ELF 7d720000-7d72d000 Deferred libxrandr.so.2
ELF 7d72d000-7d739000 Deferred libxrender.so.1
ELF 7d739000-7d740000 Deferred libxxf86vm.so.1
ELF 7d740000-7d744000 Deferred libxinerama.so.1
ELF 7d744000-7d74b000 Deferred libxdmcp.so.6
ELF 7d74b000-7d74f000 Deferred libxau.so.6
ELF 7d74f000-7d775000 Deferred libxcb.so.1
ELF 7d775000-7d8c0000 Deferred libx11.so.6
ELF 7d8c0000-7d8d5000 Deferred libxext.so.6
ELF 7d8f8000-7d8fd000 Deferred libnvidia-tls.so.384.111
ELF 7d8ff000-7d98c000 Deferred winex11<elf>
\-PE 7d910000-7d98c000 \ winex11
ELF 7d98c000-7d9a2000 Deferred dwmapi<elf>
\-PE 7d990000-7d9a2000 \ dwmapi
ELF 7d9a2000-7d9c6000 Deferred imm32<elf>
\-PE 7d9b0000-7d9c6000 \ imm32
ELF 7d9e5000-7da0f000 Deferred libexpat.so.1
ELF 7da0f000-7da58000 Deferred libfontconfig.so.1
ELF 7da58000-7da83000 Deferred libpng12.so.0
ELF 7da83000-7db33000 Deferred libfreetype.so.6
ELF 7db5d000-7db88000 Deferred msacm32<elf>
\-PE 7db60000-7db88000 \ msacm32
ELF 7db88000-7dc08000 Deferred rpcrt4<elf>
\-PE 7db90000-7dc08000 \ rpcrt4
ELF 7dc08000-7dd41000 Deferred ole32<elf>
\-PE 7dc20000-7dd41000 \ ole32
ELF 7dd41000-7ddf9000 Deferred winmm<elf>
\-PE 7dd50000-7ddf9000 \ winmm
ELF 7ddf9000-7de70000 Deferred shlwapi<elf>
\-PE 7de10000-7de70000 \ shlwapi
ELF 7de70000-7e0b2000 Deferred shell32<elf>
\-PE 7de80000-7e0b2000 \ shell32
ELF 7e0b2000-7e0d5000 Deferred libtinfo.so.5
ELF 7e0d5000-7e0fb000 Deferred libncurses.so.5
ELF 7e111000-7e125000 Deferred psapi<elf>
\-PE 7e120000-7e125000 \ psapi
ELF 7e125000-7e13a000 Deferred xinput1_3<elf>
\-PE 7e130000-7e13a000 \ xinput1_3
ELF 7e13a000-7e14e000 Deferred xinput9_1_0<elf>
\-PE 7e140000-7e14e000 \ xinput9_1_0
ELF 7e14e000-7e177000 Deferred iphlpapi<elf>
\-PE 7e150000-7e177000 \ iphlpapi
ELF 7e177000-7e23b000 Deferred msvcrt<elf>
\-PE 7e190000-7e23b000 \ msvcrt
ELF 7e23b000-7e255000 Deferred version<elf>
\-PE 7e240000-7e255000 \ version
ELF 7e255000-7e3b2000 Deferred user32<elf>
\-PE 7e270000-7e3b2000 \ user32
ELF 7e3b2000-7e3bb000 Deferred libffi.so.6
ELF 7e3bb000-7e3ed000 Deferred libcrypt.so.1
ELF 7e3ed000-7e4ce000 Deferred libsqlite3.so.0
ELF 7e4ce000-7e51e000 Deferred libhx509.so.5
ELF 7e51e000-7e52f000 Deferred libheimbase.so.1
ELF 7e52f000-7e559000 Deferred libwind.so.0
ELF 7e559000-7e5e5000 Deferred libgmp.so.10
ELF 7e5e5000-7e61a000 Deferred libhogweed.so.4
ELF 7e61a000-7e657000 Deferred libnettle.so.6
ELF 7e657000-7e66c000 Deferred libtasn1.so.6
ELF 7e66c000-7e6a0000 Deferred libidn.so.11
ELF 7e6a0000-7e701000 Deferred libp11-kit.so.0
ELF 7e701000-7e71c000 Deferred libz.so.1
ELF 7e71c000-7e734000 Deferred libroken.so.18
ELF 7e734000-7e76d000 Deferred libhcrypto.so.4
ELF 7e76d000-7e81e000 Deferred libasn1.so.8
ELF 7e81e000-7e8b6000 Deferred libkrb5.so.26
ELF 7e8b6000-7e8c0000 Deferred libheimntlm.so.0
ELF 7e8c0000-7ea18000 Deferred libgnutls.so.30
ELF 7ea18000-7ea5f000 Deferred libgssapi.so.3
ELF 7ea5f000-7ea7d000 Deferred libsasl2.so.2
ELF 7ea7d000-7ea96000 Deferred libresolv.so.2
ELF 7ea96000-7eaa6000 Deferred liblber-2.4.so.2
ELF 7eaa6000-7eb01000 Deferred libldap_r-2.4.so.2
ELF 7eb01000-7eb5b000 Deferred wldap32<elf>
\-PE 7eb10000-7eb5b000 \ wldap32
ELF 7eb5b000-7eb95000 Deferred ws2_32<elf>
\-PE 7eb60000-7eb95000 \ ws2_32
ELF 7eb95000-7ec0c000 Deferred advapi32<elf>
\-PE 7eba0000-7ec0c000 \ advapi32
ELF 7ec0c000-7ed3c000 Deferred gdi32<elf>
\-PE 7ec20000-7ed3c000 \ gdi32
ELF 7ef3c000-7ef4f000 Deferred libnss_files.so.2
ELF 7ef4f000-7ef5c000 Deferred libnss_nis.so.2
ELF 7ef5c000-7ef77000 Deferred libnsl.so.1
ELF 7ef77000-7ef81000 Deferred libnss_compat.so.2
ELF 7ef81000-7efd6000 Deferred libm.so.6
ELF 7efe5000-7f000000 Deferred wsock32<elf>
\-PE 7eff0000-7f000000 \ wsock32
ELF f7c17000-f7c1c000 Deferred libdl.so.2
ELF f7c1c000-f7dd2000 Dwarf libc.so.6
ELF f7dd2000-f7def000 Deferred libpthread.so.0
ELF f7e13000-f7e18000 Deferred libcom_err.so.2
ELF f7e19000-f7fd0000 Dwarf libwine.so.1
ELF f7fd1000-f7ff6000 Deferred ld-linux.so.2
ELF f7ff9000-f7ffa000 Deferred [vdso].so
Threads:
process tid prio (all id:s are in hex)
00000008 (D) Z:\home\ironpig\Desktop\IronPig\Progs\Geometry Dash\GeometryDash.exe
0000002d 2
0000002c 15
0000002b 15
0000002a 0
00000029 0
00000009 0 <==
0000000e services.exe
00000020 0
0000001f 0
00000014 0
00000010 0
0000000f 0
00000012 winedevice.exe
0000001e 0
00000019 0
00000018 0
00000013 0
0000001c plugplay.exe
00000022 0
00000021 0
0000001d 0
00000023 explorer.exe
00000028 0
00000027 0
00000026 0
00000025 0
00000024 0
System information:
Wine build: wine-2.0.4
Platform: i386 (WOW64)
Version: Windows 7
Host system: Linux
Host version: 4.13.0-26-generic
终端中的输出如下:
ironpig@ironpig-pc:~$ wine ~/Desktop/IronPig/Progs/Geometry\ Dash/GeometryDash.exe
fixme:ver:GetCurrentPackageId (0x33f434 (nil)): stub
fixme:xinput:XInputGetState (index 0, state 0x172658) Stub!
fixme:xinput:XInputGetStateEx (index 0, state 0x33fc88) Stub!
fixme:ver:GetCurrentPackageId (0x33f910 (nil)): stub
fixme:system:SetProcessDPIAware stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x33f88c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x33f544,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x33f544,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x33f88c,0x00000000), stub!
fixme:msg:ChangeWindowMessageFilterEx 0x1004e 233 1 (nil)
fixme:msg:ChangeWindowMessageFilterEx 0x1004e 4a 1 (nil)
fixme:msg:ChangeWindowMessageFilterEx 0x1004e 49 1 (nil)
fixme:ver:GetCurrentPackageId (0x1c4e9d8 (nil)): stub
wine: Unhandled page fault on read access to 0x0000000c at address 0xc1ec98 (thread 0009), starting debugger...
最糟糕的是,这阻止我创建正常运行的桌面快捷方式。
那么,为什么会发生这种情况?我该如何创建可用的桌面快捷方式?
我用:
- Ubuntu 16.04
- gnome 外壳
- wine-2.0.4