0270:err:ole:apartment_getclassobject wbemdisp.dll

Questions about Wine on Linux
Locked
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

I'm trying to activate this gametrainer: https://megagames.com/trainers/metal-ge ... ner-lingon

To start it, .NET Framework it's needed, so I installed the .NET Framework 4.8 one, using winetricks:

Code: Select all

WINEPREFIX=$HOME/.local/share/Steam/steamapps/compatdata/311340/pfx winetricks -q dotnet48
OK, installing .NET Framework made the gametrainer to start, but...
The problem is it crash upon activation (you press the HOME key on you keyboard).

Here's the log:

Code: Select all

0278:err:ole:CoGetContextToken apartment not initialised
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15

[...]

0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
0270:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
0270:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
0270:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
Here's the just-in-time (JIT) debugging:

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.MissingMemberException: Public member 'executablepath' on type '_ComObject' not found.
   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
   at ..(Object , EventArgs )
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.PerformClick()
   at ..(Object , EventArgs )
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
LinGonX64Tr-Engine
    Assembly Version: 1.0.4.0
    Win32 Version: 1.0.4.0
    CodeBase: file:///Z:/somepath/gametrainer.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
{1f1cf66c-b7ed-4701-aeda-8073c140d402}
    Assembly Version: 0.0.0.0
    Win32 Version: 1.0.4.0
    CodeBase: file:///Z:/somepath/gametrainer.exe
----------------------------------------
Bass.Net
    Assembly Version: 2.4.10.3
    Win32 Version: 2.4.10.3
    CodeBase: file:///C:/users/steamuser/Temp/Bass.Net.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_64/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

That same exact error always happens during different tests:
  • system's wine 9.19-1 (ArchLinux)
  • system's wine-staging 9.12-1 (ArchLinux)
  • system's wine-staging-wow64 9.19-1 (ArchLinux, AUR)
  • Steam's Proton protontricks-launch

    Code: Select all

    $ protontricks-launch --no-background-wineserver --no-runtime --no-bwrap --appid 311340 /somepath/gametrainer.exe
  • Windows version set to win7
  • Windows version set to win10
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Is it possible to test this without having the game?
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

DarkShadow44 wrote: Sat Oct 12, 2024 8:47 am Is it possible to test this without having the game?
Nope, sadly...
Let me explain you: the gametrainer itself can start perfectly fine on its own, but it will never activate (if you press the HOME key on you keyboard) if the game is not running... Pressing HOME key with NO game started, the gametrainer will stay open but will simply do nothing.
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Did you already try a clean WINEPREFIX? Because AFAIK that class should exist.
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

Yup. Always the exact same error, sadly...
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

You could try to deofuscate it using this program: https://github.com/ViRb3/de4dot-cex/releases
Just "de4dot <EXE>" and then run the "_cleaned.exe"

This has a risk of breaking the program, but if it doesn't, it would give a proper stacktrace that we could use to look into the binary to see what it is trying to do.

Apart from that, can you please provide a complete WINEDEBUG=+wbemdisp,+wbemprox" log?
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Forget about that, I think I found the issue an opened a bugreport here: https://bugs.winehq.org/show_bug.cgi?id=57314
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

I attached a patch to the bugreport, can you please test if that makes it work? It *should* solve that problem, but maybe there's even more issues.
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

now gametrainer works!! ;)

Two things worth noticing now, though:
  • When you press HOME key on you keyboard, the gametrainer has a built-in sound fx which will tell you <<PROGRAM ACTIVATED>> to provide feedback upon correct trainer activation; this sound fx is still played badly and its reproduction it's glitched and crackling
  • I'm getting this new error about C:\\windows\\system32\\wbem\\wbemdisp.dll

    Code: Select all

    0150:err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 for dll L"C:\\windows\\system32\\wbem\\wbemdisp.dll"
    0150:err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered
    0150:err:ole:com_get_class_object no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
    
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Alright, I'll submit that as a MR soon then.

Regarding the sound issue, can you make a recording so I can compare it to the actual file? If I try to replay the sound using the same methods the program does, it does sound fine. Did you make sure that your sound setup works in Wine in other programs?

Regarding the new errors, unless they cause problems just ignore them.
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

DarkShadow44 wrote: Tue Oct 15, 2024 3:46 pm Alright, I'll submit that as a MR soon then.
Cool! 8)

DarkShadow44 wrote: Tue Oct 15, 2024 3:46 pm Regarding the sound issue, can you make a recording so I can compare it to the actual file? If I try to replay the sound using the same methods the program does, it does sound fine. Did you make sure that your sound setup works in Wine in other programs?
Yes, in general the audio playback is flawless on Wine ;) Only the gametrainer sound fx always sounded glitchy (although it always worked fine on Windows).
Here's the recording:
gametrainer.zip
gametrainer glitchy sound (ZIP compressed "gametrainer.opus")
(2.87 KiB) Downloaded 946 times
DarkShadow44 wrote: Tue Oct 15, 2024 3:46 pm Regarding the new errors, unless they cause problems just ignore them.
OK
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Yes, that's indeed pretty glitchy. Unfortunately I can't reproduce this on my side, since trying to replay the sound manually the same way the program uses sounds fine. And without the game I can't really reproduce with the program itself.

Can you test if that attached test program works fine on your side?
Attachments
Test.zip
(47.18 KiB) Downloaded 929 times
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by succodifrutta »

DarkShadow44 wrote: Wed Oct 16, 2024 3:00 pm Can you test if that attached test program works fine on your side?
Woah! Sounds perfect! That's good 8)
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: 0270:err:ole:apartment_getclassobject wbemdisp.dll

Post by DarkShadow44 »

Mh, weird. It means that I have no idea what causes this, since it doesn't seem to work with the obfuscated binary.
Locked