VirtualBox

Ticket #11073 (closed defect: invalid)

Opened 7 years ago

Last modified 7 years ago

Windows COM interface does not respond

Reported by: pfn Owned by:
Component: other Version: VirtualBox 4.2.0
Keywords: COM VirtualBox.VirtualBox csharp Cc:
Guest type: all Host type: Windows

Description

using VirtualBox;
class T {
        public static void Main(string[] args) {
                var vb = new VirtualBox.VirtualBox();
        }
}

I have the above which I compile into an executable and run.

In some very rare instances, it is able to successfully return a value.

In almost all cases, I get the following exception:

Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at T.Main(String[] args) in c:\Users\pfnguyen\src\vboxservice\t.cs:line 4

The above code has worked consistently, prior to vbox 4.2

Change History

comment:1 Changed 7 years ago by klaus

No idea what could've caused such a regression since there were no significant changes in this area for a long time. The only known issue (for many years actually) with COM is that a user cannot use VirtualBox from more than one session (e.g. a console session plus a separate RDP session), because MS decided to do something stupid in such a situation.

comment:2 Changed 7 years ago by pfn

Ok,

I've narrowed this down, I believe.

I am running vbox with multiple different users (multiple instances). In previous versions, when I run my COM interfacing code, it starts up a new vboxsvc instance for me; in this case, it does not appear to start a new vboxsvc instance. Instead it tries to connect to an existing vboxsvc instance that is running as a different user and then failing.

comment:3 Changed 7 years ago by klaus

Since you claim this is a regression I looked into what we changed in the COM specific server side code since 4.1.0 (r73009)... and there really isn't anything relevant.

You're not doing something clever like sharing VM configs (or VirtualBox.xml) between the two users who are involved in this? Or somehow share a .VirtualBox subdirectory between users (which would cause trouble due to the VBoxSVC.log file and more)?

comment:4 Changed 7 years ago by klaus

  • Status changed from new to closed
  • Resolution set to invalid

The original reporter just confirmed that he shares the .VirtualBox subdirectory between the two users (through mklink /j). This never worked as long as both users have VBoxSVC active since this process opens files in this directory for exclusive use, i.e. the 2nd process would fail to open them.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use