故障现象,wine运行windows应用程序,点击最大化按钮崩溃,wine日志如下
02a8:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 for dll L"C:\\windows\\system32\\msxml2.dll"
029c:err:ole:com_get_class_object no class object {f5078f1e-c551-11d3-89b9-0000f81fe221} could be created for context 0x1
029c:err:dllhost:wWinMain Can't create instance of {f5078f1e-c551-11d3-89b9-0000f81fe221}
02ac:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 for dll L"C:\\windows\\system32\\msxml2.dll"
02a4:err:ole:com_get_class_object no class object {f5078f1e-c551-11d3-89b9-0000f81fe221} could be created for context 0x1
02a4:err:dllhost:wWinMain Can't create instance of {f5078f1e-c551-11d3-89b9-0000f81fe221}
此时有弹窗提示
运行时错误‘6’:
溢出
现把msxml4装上
原因
尽管 MSXML 4.0 并非 MSXML 3.0 和 6.0 的直接替代品,并且它可以与这两个版本共存,但在您的 Wine 环境中,由于您正在尝试运行的应用程序在日志中显示出对 MSXML 4.0 组件的依赖(通过类标识符 {f5078f1e-c551-11d3-89b9-0000f81fe221}
),这表明该应用可能需要 MSXML 4.0 特定的功能或接口才能正常运行。
因此,鉴于应用程序在最大化时崩溃并且日志显示与 MSXML 4.0 相关的错误,安装 MSXML 4.0 对于解决这个问题是非常必要的。请按照之前提到的步骤,使用 winetricks 安装 MSXML 4.0 SP2 或相应可用的最新服务包,以确保您的 Wine 环境提供所需的所有必需组件来支持该应用程序。
故障依旧
设置
export WINEDEBUG="+relay,+window,+dx,+uiautomation,+com,+tid,+seh,+loaddll,+module,+heap,+handle,+cursor,+gdi,+msg"
分析详细日志,发现可疑错误
0204:Call ntdll.RtlAllocateHeap(00cd0000,00000000,00000008) ret=6aaf1b56
00ec:trace:seh:dispatch_exception info[0]=00000000
01f8:Ret ucrtbase.memset() retval=0160cb20 ret=004134a5
00ec:trace:seh:dispatch_exception info[1]=00000001
01f8:Call ucrtbase.memset(0160cb20,00000000,00000024) ret=00402ee3
01f8:Ret ucrtbase.memset() retval=0160cb20 ret=00402ee3
00ec:warn:seh:dispatch_exception backtrace: --- Exception 0xc0000005 at 0xf75f4cf6: /lib/i386-linux-gnu/libgcc_s.so.1 + 0x1bcf6.
00ec:warn:seh:dispatch_exception EXCEPTION_ACCESS_VIOLATION exception (code=c0000005) raised
00ec:trace:seh:dispatch_exception eax=00000001 ebx=f75ff000 ecx=ffca276c edx=00000000 esi=ffca24e0 edi=ffca25a0
00ec:trace:seh:dispatch_exception ebp=ffca2660 esp=ffca2470 cs=0023 ss=002b ds=002b es=002b fs=0063 gs=006b flags=00010246
00ec:trace:seh:call_stack_handlers calling handler at 6BBCF540 code=c0000005 flags=0
00ec:trace:seh:call_stack_handlers handler at 6BBCF540 returned 1
00ec:trace:seh:call_stack_handlers calling handler at 6BBD8FF0 code=c0000005 flags=0
00ec:Call ntdll.LdrResolveDelayLoadedAPI(6bbc0000,6bbda0dc,00000000,7b6031b0,6bbe736c,00000000) ret=6bbd8f5a
0204:trace:heap:RtlAllocateHeap handle 00CD0000, flags 0, size 0x8, return 00CDF940, status 0.
00ec:trace:module:LdrResolveDelayLoadedAPI (6BBC0000, 6BBDA0DC, 00000000, 7B6031B0, 6BBE736C, 0x00000000)
0204:Ret ntdll.RtlAllocateHeap() retval=00cdf940 ret=6aaf1b56
00ec:Ret ntdll.LdrResolveDelayLoadedAPI() retval=65482dcc ret=6bbd8f5a
0204:Ret ucrtbase.malloc() retval=00cdf940 ret=654c5c24
先找到弹窗部分调用日志(日质量太大了)
往前可以翻越到“溢出”的编码
继续向前,发现一大段返回值不为0的调用
借助AI分析,问题仍然集中到
- 错误日志中包含了 "0260:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 for dll L"c:\windows\system32\msxml2.dll"”,表示在尝试从 msxml2.dll 获取类对象时发生了错误,错误代码 0x80040111 通常表示类未注册或无法创建所需的对象实例。
- 后续还有 "025c:err:ole:com_get_class_object no class object {f5078f1e-c551-11d3-89b9-0000f81fe221} could be created for context 0x1",同样表明无法创建类对象,这也可能导致了点击自定义最大化按钮时应用程序的崩溃。
卸载这几个,逐个安装测试
直接创建新的wine环境,分析最新的关键错误信息
0024:Call KERNEL32.RaiseException(c000008f,00000001,00000002,0021e3b0) ret=660d0956 ... 0024:warn:seh:dispatch_exception EXCEPTION_FLT_INEXACT_RESULT exception (code=c000008f) raised
更多信息
0120:trace:heap:RtlFreeHeap handle 00140000, flags 0, ptr 01C609A8, return 1, status 0.
0120:Ret KERNEL32.HeapFree() retval=00000001 ret=62520b7b
0120:Call ntdll.RtlSizeHeap(00140000,00000000,007f42f8) ret=684d25e1
0024:Ret ntdll.RtlUnlockHeap() retval=00000001 ret=7b042b3d
0024:Ret KERNEL32.GlobalFree() retval=00000000 ret=660c36e9
0024:Call gdi32.SelectObject(0741004c,31090183) ret=660c36f5
0024:trace:gdi:SelectObject (0741004C,31090183)
0024:trace:gdi:NtGdiExtGetObjectW 0x1b00027 16 0x21de60
0024:trace:gdi:NtGdiExtGetObjectW 0x1900020 12 0x21de84
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21dbb4
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21d988
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21d508
0024:Ret gdi32.SelectObject() retval=01890034 ret=660c36f5
0024:Call gdi32.SetStretchBltMode(164100f2,00000001) ret=66058b12
0024:Ret gdi32.SetStretchBltMode() retval=00000003 ret=66058b12
0024:Call gdi32.SelectObject(0741004c,01890034) ret=6250d969
0024:trace:gdi:SelectObject (0741004C,01890034)
0024:trace:gdi:NtGdiExtGetObjectW 0x1b00027 16 0x21dea0
0024:trace:gdi:NtGdiExtGetObjectW 0x1900020 12 0x21dec4
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21dbf4
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21d9c8
0024:trace:gdi:NtGdiExtGetObjectW 0x18a002d 92 0x21d548
0024:Ret gdi32.SelectObject() retval=31090183 ret=6250d969
0024:Call oleaut32.SysFreeString(00000000) ret=6600e1a9
0024:Ret oleaut32.SysFreeString() retval=684ea1d8 ret=6600e1a9
0024:Call oleaut32.SysFreeString(00000000) ret=6600e1ae
0024:Ret oleaut32.SysFreeString() retval=684ea1d8 ret=6600e1ae
0024:Call oleaut32.SysFreeString(00000000) ret=6600e1b3
0024:Ret oleaut32.SysFreeString() retval=684ea1d8 ret=6600e1b3
0024:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0042a8c0 "TypeApp",ffffffff,00000000,00000000) ret=660da0b1
0024:Call ntdll.strlen(0042a8c0 "TypeApp") ret=7b031dda
0024:Ret ntdll.strlen() retval=00000007 ret=7b031dda
0024:Ret KERNEL32.MultiByteToWideChar() retval=00000008 ret=660da0b1
0024:Call oleaut32.SysAllocStringLen(00000000,00000007) ret=660da0bc
0024:Call ucrtbase.memset(02844c38,00000055,00000014) ret=62506bf6
0024:Ret ucrtbase.memset() retval=02844c38 ret=62506bf6
0024:Call ucrtbase.memset(02844c4c,000000ab,0000000c) ret=62506c14
0024:Ret ucrtbase.memset() retval=02844c4c ret=62506c14
0024:Call ucrtbase.memset(02844c3c,00000000,00000010) ret=62507b67
0024:Ret ucrtbase.memset() retval=02844c3c ret=62507b67
0024:Ret oleaut32.SysAllocStringLen() retval=02844c3c ret=660da0bc
0024:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0042a8c0 "TypeApp",ffffffff,02844c3c,00000008) ret=660da0db
0024:Call ntdll.strlen(0042a8c0 "TypeApp") ret=7b031dda
0024:Ret ntdll.strlen() retval=00000007 ret=7b031dda
0024:Ret KERNEL32.MultiByteToWideChar() retval=00000008 ret=660da0db
0024:Call KERNEL32.RaiseException(c000008f,00000001,00000002,0021e3b0) ret=660d0956
0024:trace:seh:dispatch_exception code=c000008f flags=1 addr=7B011DC4 ip=7b011dc4
0024:trace:seh:dispatch_exception info[0]=deadcafe
0024:trace:seh:dispatch_exception info[1]=deadcafe
0024:warn:seh:dispatch_exception EXCEPTION_FLT_INEXACT_RESULT exception (code=c000008f) raised
0024:trace:seh:dispatch_exception eax=0021e300 ebx=deadcafe ecx=00000004 edx=0021e3b0 esi=0021e3b0 edi=0021e370
0024:trace:seh:dispatch_exception ebp=0021e358 esp=0021e2f4 cs=1fc0023 ss=21002b ds=21002b es=002b fs=210063 gs=7bc4006b flags=00000246
0024:trace:seh:call_stack_handlers calling handler at 660E3BBE code=c000008f flags=1
0024:trace:seh:call_stack_handlers handler at 660E3BBE returned 1
0024:trace:seh:call_stack_handlers calling handler at 660E3BBE code=c000008f flags=1
0024:trace:seh:call_stack_handlers handler at 660E3BBE returned 1
0024:trace:seh:call_stack_handlers calling handler at 660E3B6B code=c000008f flags=1
0024:trace:seh:__regs_RtlUnwind code=c0000027 flags=2
0024:trace:seh:__regs_RtlUnwind eax=00000000 ebx=0021e300 ecx=0021e550 edx=7ffc2000 esi=0021e550 edi=0021e01c
0024:trace:seh:__regs_RtlUnwind ebp=0021dd98 esp=0021dd8c eip=66103ce6 cs=0023 ds=002b fs=0063 gs=006b flags=00000202
0024:trace:seh:__regs_RtlUnwind calling handler at 7BC5AAC0 code=c0000027 flags=2
0024:trace:seh:__regs_RtlUnwind handler at 7BC5AAC0 returned 1
待续。。。