https://bugs.winehq.org/show_bug.cgi?id=35567
Bug ID: 35567 Summary: Xibo Player 1.4.x crashes on startup (WMI reports network adapter with IPEnabled=true and MACaddress=NULL) Product: Wine Version: 1.7.12 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: wmi&wbemprox Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Classification: Unclassified
Hello folks,
as the summary says...
It seems the app fetches network adapter information via WMI(utils) and doesn't like a network adapter with 'IPEnabled' and NULL 'MACaddress' property.
The problem is that Wine's WMI network adapter info also populates the virtual loopback device which doesn't have a MAC address by design although it is 'alive'.
On Windows, the virtual adapter used for the 'loopback' address range is emulated straight inside the stack with no explicit interface properties exposed. On MSDN/Technet there is a 'Microsoft Loopback Adapter' mentioned but this isn't the same thing as the virtual loopback adapter used in Linux (not present by default, needs explicit installation)
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Xibo Player
$ WINEDEBUG=+tid,+seh,+relay,+wbemprox,+wmiutils wine ./XiboClient.exe
log.txt 2>&1
... 0031:trace:wbemprox:create_class_object L"Win32_NetworkAdapterConfiguration", 0x15c718 ... 0031:trace:wbemprox:class_object_Get 0x1beb70, L"IPEnabled", 00000000, 0x33f144, 0x9e2c88, 0x9e2c8c 0031:trace:wbemprox:class_object_Get 0x1beb70, L"IPEnabled", 00000000, 0x33f148, 0x9e2c88, 0x9e2c8c 0031:trace:wbemprox:class_object_Get 0x1beb70, L"MacAddress", 00000000, 0x33f144, 0x9e2d04, 0x9e2d08 ... 0031:trace:wbemprox:class_object_Get 0x1beb70, L"MacAddress", 00000000, 0x33f148, 0x9e2d04, 0x9e2d08 0031:Call oleaut32.VariantClear(0033f148) ret=79eeb23d 0031:Ret oleaut32.VariantClear() retval=00000000 ret=79eeb23d 0031:Call KERNEL32.GetLastError() ret=79eb4e27 0031:Ret KERNEL32.GetLastError() retval=00000000 ret=79eb4e27 0031:trace:seh:raise_exception code=c0000005 flags=0 addr=0x404bdb7 ip=0404bdb7 tid=0031 0031:trace:seh:raise_exception info[0]=00000000 0031:trace:seh:raise_exception info[1]=00000000 0031:trace:seh:raise_exception eax=00000000 ebx=009a7ed8 ecx=00000000 edx=00000008 esi=009e2cac edi=009e2864 0031:trace:seh:raise_exception ebp=0033f268 esp=0033f238 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 0031:trace:seh:call_stack_handlers calling handler at 0x79edc3bc code=c0000005 flags=0 ... --- snip ---
Managed backtrace:
--- snip --- Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at XiboClient.HardwareKey.GetMACAddress() at XiboClient.HardwareKey..ctor() at XiboClient.XiboTraceListener.InitializeListener() at XiboClient.XiboTraceListener..ctor() at XiboClient.Program.Main(String[] arg) ... --- snip ---
Winedbg session:
--- snip --- Wine-dbg>bt
Backtrace: =>0 0x7e13e3f1 fill_networkadapterconfig(table=0x7e15f0a4, cond=(nil)) [/home/focht/projects/wine/wine.repo/src/dlls/wbemprox/builtin.c:1656] in wbemprox (0x0033eeb8)
1 0x7e146115 exec_query+0x5b(str="SELECT * FROM Win32_NetworkAdapterConfiguration", result=0x33efac) [/home/focht/projects/wine/wine.repo/src/dlls/wbemprox/query.c:409] in wbemprox (0x0033eee8)
2 0x7e14af4e create_instance_enum+0x32(path=0x1d1c70, iter=0x33efac) [/home/focht/projects/wine/wine.repo/src/dlls/wbemprox/services.c:412] in wbemprox (0x0033ef18)
3 0x7e14b729 wbem_services_CreateInstanceEnum+0x11d(iface=0x1d1618, strClass="Win32_NetworkAdapterConfiguration", lFlags=0x11, pCtx=(nil), ppEnum=0x33efac) [/home/focht/projects/wine/wine.repo/src/dlls/wbemprox/services.c:595] in wbemprox (0x0033ef78)
4 0x79f9cab0 in mscorwks (+0x12caaf) (0x0033f180)
...
Wine-dbg>p *rec
{index=0x1, ipconnectionmetric=0x14, ipenabled=0xffffffff, mac_address=0x0(nil)}
Wine-dbg>p *aa
{u={Alignment=0x100000170, s={Length=0x170, IfIndex=0x1}}, Next=0x1d2274, AdapterName="lo", FirstUnicastAddress=0x1d21b4, FirstAnycastAddress=(nil), FirstMulticastAddress=(nil), FirstDnsServerAddress=(nil), DnsSuffix="", Description="lo", FriendlyName="lo", PhysicalAddress="", PhysicalAddressLength=0, Flags=0x180, Mtu=0x10000, IfType=0x18, OperStatus=IfOperStatusUp, Ipv6IfIndex=0, ZoneIndices={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, FirstPrefix=(nil), TransmitLinkSpeed=0, ReceiveLinkSpeed=0, FirstWinsServerAddress=(nil), FirstGatewayAddress=(nil), Ipv4Metric=0, Ipv6Metric=0, Luid={Value=0, Info={Reserved=0, NetLuidIndex=0, IfType=0}}, Dhcpv4Server={lpSockaddr=(nil), iSockaddrLength=0}, CompartmentId=0, NetworkGuid={Data1=0, Data2=0, Data3=0, Data4=""}, ConnectionType=NET_IF_CONNECTION_DEDICATED, TunnelType=TUNNEL_TYPE_NONE, Dhcpv6Server={lpSockaddr=(nil), iSockaddrLength=0}, Dhcpv6ClientDuid="", Dhcpv6ClientDuidLength=0, Dhcpv6Iaid=0} --- snip ---
The code snippet of the .NET application straight from 'ilspy':
--- snip --- // XiboClient.HardwareKey public string GetMACAddress() { object locker; Monitor.Enter(locker = HardwareKey._locker); string result; try { ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection instances = managementClass.GetInstances(); string text = string.Empty; using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator()) { while (enumerator.MoveNext()) { ManagementObject managementObject = (ManagementObject)enumerator.get_Current(); if (text == string.Empty && (bool)managementObject.get_Item("IPEnabled")) { text = managementObject.get_Item("MacAddress").ToString(); } managementObject.Dispose(); } } result = text; } finally { Monitor.Exit(locker); } return result; } --- snip ---
$ sha1sum xibo-client-1.4.2-win32-x86.msi 26fe5b50f067b8d853abc5f6b3be791f56cad7eb xibo-client-1.4.2-win32-x86.msi
$ du -sh xibo-client-1.4.2-win32-x86.msi 1.4M xibo-client-1.4.2-win32-x86.msi
$ wine --version wine-1.7.12-28-g0f2bed5
Regards
https://bugs.winehq.org/show_bug.cgi?id=35567
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |https://launchpad.net/xibo/ | |1.4/1.4.2
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
filling fields ...
Prerequisite: 'winetricks -q dotnet35' in 32-bit WINEPREFIX (or Mono)
Regards
https://bugs.winehq.org/show_bug.cgi?id=35567
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |386d2aa8b7f704f992a6685d9be | |9616da660f49b Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/386d2aa8b7f704f992a6685d9be...
Thanks Hans
Regards
https://bugs.winehq.org/show_bug.cgi?id=35567
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.13.