[vbox-dev] XPCOM error NS_ERROR_FACTORY_NOT_REGISTERED

Klaus Espenlaub Klaus.Espenlaub at Sun.COM
Mon May 25 09:40:43 GMT 2009


Eduardo Robles Elvira wrote:
> On Fri, Apr 24, 2009 at 12:30 PM, Eduardo Robles Elvira
> <edulix at gmail.com> wrote:
>> Hola!
>>
>> Precisely I'm working in a patch to make virtualbox host-only and
>> internal networks work in "mesh" mode. So that I can configure each
>> interface connected to a network to which other network interfaces is
>> it directly connected to. I want to do that for testing using
>> virtuabox my final project which is an implementation of the AODV mesh
>> networks routing protocol. Yesterday I "finished" the patch i.e. it
>> compiles and in theory it should work but I didn't have enough time
>> yet to test it. I attach it to this email so that others can review
>> the patch and/or help me developing it. My final aim is that it works
>> and it gets integrated in trunk :P. Any comments about this patch are
>> welcome!

The error you describe below is usually caused by a relatively early 
crash of VBoxSVC. Try debugging VBoxSVC. You can just run it in gdb, 
just keep in mind that the clients (as you observed) are autostarting 
VBoxSVC if it's not already running. So start it in the debugger before 
running any clients.

Klaus

>>
>> Regards,
>>      Eduardo Robles Elvira.
>>
> 
> Hi everyone,
> 
> This is a follow-up of  my patch for mesh networks. I'm testing it,
> but I get the XPCOM error "NS_ERROR_FACTORY_NOT_REGISTERED". The error
> shows up when I try to start a VM, when I click configure, when I
> fininsh the new VM assistant, etc. The error shows up in this code:
> 
> src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp:981
>     void VBoxSelectorWnd::vmStart():
>         session.createInstance (CLSID_Session);
>         if (session.isNull())
>         {
>             vboxProblem().cannotOpenSession (session); <<<<<<<<<<<<
>             return;
>         }
> src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp:844
>     void VBoxSelectorWnd::vmSettings():
>         // open a direct session to modify VM settings
>         QString id = item->id();
>         CSession session = vboxGlobal().openSession (id);
>         if (session.isNull())
>             return;
> 
>         src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp:2363
>             CSession VBoxGlobal::openSession (const QString &aId, bool
> aExisting /* = false */)
>             {
>                 CSession session;
>                 session.createInstance (CLSID_Session);
>                 if (session.isNull())
>                 {
>                     vboxProblem().cannotOpenSession (session); <<<<<<<<<<
>                     return session;
>                 }
> 
> As you can see in the patch, I register a new XPCOM interface in
> src/VBox/Main/xpcom/module.cpp as I was told:
> 
> +NS_DECL_CLASSINFO(NetworkAdapterRef)
> +NS_IMPL_THREADSAFE_ISUPPORTS1_CI(NetworkAdapterRef, INetworkAdapterRef)
> 
> If I comment those two lines the error doesn't show up but well then
> NetworkAdapter related things obviosly don't work fine (rest of the
> patch is dependent of this). So.. I don't know what's happening, can
> someone please try to enlighten  me?
> 
> Thanks in advance,
>     Eduardo Robles Elvira.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev




More information about the vbox-dev mailing list