Discussion:
[vbox-dev] IDisplay in IConsole::display is empty
Karoline Haus
2014-01-24 09:45:59 UTC
Permalink
Hi

I'm building a VBox Frontend graphics driver working similar to VBoxSDL.

When I try to start the VM and get the IDisplay pointer using


gConsole->COMGETTER(Display)(gDisplay.asOutParam());

then gDisplay is always NULL. In what cases can this happen? I have no idea how to debug the problem.

Any pointers would be really appreciated.

Thanks,
Karoline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140124/e9bfc179/attachment.html
Klaus Espenlaub
2014-01-24 13:11:43 UTC
Permalink
Hi Karoline,
Post by Karoline Haus
Hi
I'm building a VBox Frontend graphics driver working similar to VBoxSDL.
When I try to start the VM and get the IDisplay pointer using
gConsole->COMGETTER(Display)(gDisplay.asOutParam());
then gDisplay is always NULL. In what cases can this happen? I have no
idea how to debug the problem.
This sounds like the type of the session lock you're requesting is
incorrect. For some time now (since 4.2) we have split out a special
lock type for VM processes, and only those will get the objects below
the console initialized. This greatly lowers the cost for "normal API
client" sessions, which are used e.g. by VBoxManage and the VM manager
GUI, as they never needed these objects.

So double check if you use LockType_VM - all VM frontends do this since
the split happened (and the API change is documented in the SDK manual),
see VBoxSDL.cpp.

Hope this helps,
Klaus
Post by Karoline Haus
Any pointers would be really appreciated.
Thanks,
Karoline
Karoline Haus
2014-01-24 15:16:47 UTC
Permalink
Klaus Espenlaub <klaus.espenlaub at oracle.com> schrieb am 15:22 Freitag, 24.Januar 2014:

Hi Karoline,
Post by Karoline Haus
Hi
I'm building a VBox Frontend graphics driver working similar to VBoxSDL.
When I try to start the VM and get the IDisplay pointer using
gConsole->COMGETTER(Display)(gDisplay.asOutParam());
then gDisplay is always NULL. In what cases can this happen? I have no
idea how to debug the problem.
This sounds like the type of the session lock you're requesting is
incorrect. For some time now (since 4.2) we have split out a special
lock type for VM processes, and only those will get the objects below
the console initialized. This greatly lowers the cost for "normal API
client" sessions, which are used e.g. by VBoxManage and the VM manager
GUI, as they never needed these objects.

So double check if you use LockType_VM - all VM frontends do this since
the split happened (and the API change is documented in the SDK manual),
see VBoxSDL.cpp.

Hope this helps,
Klaus
Post by Karoline Haus
Any pointers would be really appreciated.
Thanks,
Karoline
You were right - that was the problem!!! Thanks!

Karoline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140124/2178c290/attachment.html
Loading...