[vbox-dev] XPCOM error NS_ERROR_FACTORY_NOT_REGISTERED

Eduardo Robles Elvira edulix at gmail.com
Sat May 23 04:57:40 PDT 2009


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!
>
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meshnetworks3.patch
Type: text/x-patch
Size: 48923 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20090523/bc2ff206/attachment-0001.bin 


More information about the vbox-dev mailing list