[Bug 38935] CocosStudio1.6 (.NET 4.0 app) crashes when starting (needs 'Win32_DesktopMonitor' WMI class with 'PixelsPerXLogicalInch' property)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jul 18 04:45:24 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38935

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |dotnet
                 CC|                            |focht at gmx.net
          Component|-unknown                    |wmi&wbemprox
            Summary|CocosStudio1.6 crashes when |CocosStudio1.6 (.NET 4.0
                   |starting (.NET 4.0 app)     |app) crashes when starting
                   |                            |(needs
                   |                            |'Win32_DesktopMonitor' WMI
                   |                            |class with
                   |                            |'PixelsPerXLogicalInch'
                   |                            |property)

--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming.

Trace log:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Cocos Studio

$ WINEDEBUG=+tid,+seh,+relay,+wbemprox wine ./Cocos\ Studio.exe >>log.txt 2>&1
...
002d:trace:wbemprox:wbem_services_GetObject 0x1a0420, L"Win32_DesktopMonitor",
0x00000000, (nil), 0x32e510, (nil)
...
002d:trace:wbemprox:parse_query wql_parse returned 0
002d:trace:wbemprox:EnumWbemClassObject_create 0x32e404
...
002d:trace:wbemprox:EnumWbemClassObject_create returning iface 0x1a0238
...
002d:trace:wbemprox:create_class_object L"Win32_DesktopMonitor", 0x32e510
...
002d:trace:wbemprox:create_class_object returning iface 0x1a0188
...
002d:trace:wbemprox:class_object_Get 0x1a0188, L"__PATH", 00000000, 0x32e4f0,
0x32e5b4, 0x32e5b0
002d:Call KERNEL32.GetComputerNameW(0032e2ec,0032e2e8) ret=7e353474
002d:Ret  KERNEL32.GetComputerNameW() retval=00000001 ret=7e353474
002d:Call oleaut32.SysAllocString(0032e2ec L"NEXUS5") ret=7e3534bb
002d:Ret  oleaut32.SysAllocString() retval=0019a44c ret=7e3534bb
002d:Call oleaut32.SysAllocString(7e364318 L"ROOT\\CIMV2") ret=7e3534fd
002d:Call ntdll.RtlAllocateHeap(00110000,00000000,00000020) ret=7e3cdb54
002d:Ret  ntdll.RtlAllocateHeap() retval=001a01b0 ret=7e3cdb54
002d:Ret  oleaut32.SysAllocString() retval=001a01b4 ret=7e3534fd
002d:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7e3534cc
ip=7e3534cc tid=002d
002d:trace:seh:raise_exception  info[0]=00000000
002d:trace:seh:raise_exception  info[1]=00000000
002d:trace:seh:raise_exception  eax=00000000 ebx=00e32400 ecx=00e32408
edx=0000000a esi=00000004 edi=0032e4b4
002d:trace:seh:raise_exception  ebp=0032e2d8 esp=0032e2c0 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00010206
002d:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c
code=c0000005 flags=0 
...
--- snip ---

Managed backtrace:

--- snip ---
Unhandled Exception: System.AccessViolationException: Attempted to read or
write protected memory. This is often an indication that other memory is
corrupt.
   at System.Management.IWbemClassObjectFreeThreaded.Get_(String wszName, Int32
lFlags, Object& pVal, Int32& pType, Int32& plFlavor)
   at System.Management.ManagementObject.Initialize(Boolean getObject)
   at System.Management.ManagementBaseObject.get_ClassName()
   at System.Management.ManagementClass.GetInstances(EnumerationOptions
options)
   at System.Management.ManagementClass.GetInstances()
   at CocoStudio.UserStatistics.LocalInfo.GetDPI()
   at CocoStudio.UserStatistics.LocalInfo.init()
   at CocoStudio.UserStatistics.LocalInfo..ctor()
   at CocoStudio.UserStatistics.UserStatisticsMonitor.Start()
   at CocoStudio.UserStatistics.UserStatisitcsCS.OnInit()
   at CocoStudio.UserStatistics.BaseUserStatistics.Init()
   at CocoStudio.UserStatistics.BaseUserStatistics.set_EditorInfo(EditorInfo
value)
   at CocoStudio.UserStatistics.UserStatisticsFactory.Start()
   at CocoStudio.App.Application_Startup(Object sender, StartupEventArgs e)
   at System.Windows.Application.OnStartup(StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1(Object unused)
--- snip ---

App .NET code for reference:

--- snip ---
private double GetDPI()
{
  int num = 0;
  double result;
  using (ManagementClass managementClass = new
ManagementClass("Win32_DesktopMonitor"))
  {
    using (ManagementObjectCollection instances =
managementClass.GetInstances())
    {
      using (ManagementObjectCollection.ManagementObjectEnumerator enumerator =
instances.GetEnumerator())
      {
        while (enumerator.MoveNext())
        {
          ManagementObject managementObject =
(ManagementObject)enumerator.Current;
          num =
int.Parse(managementObject.Properties["PixelsPerXLogicalInch"].Value.ToString());
        }
      }
      result = (double)num;
    }
  }
  return result;
}
--- snip ---

$ sha1sum Cocos\ Studio_1.6.rar
de097037a873da31dcb38e1eba0cf0c8d2c93dbc  Cocos Studio_1.6.rar

$ du -sh Cocos\ Studio_1.6.rar 
123M    Cocos Studio_1.6.rar

$ wine --version
wine-1.7.47-118-ga90592c

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list