OpenGL development issues on virtualbox

Discussions related to using VirtualBox on Windows hosts.

OpenGL development issues on virtualbox

Postby otoparc » 25. Jun 2010, 10:56

Hello,

I'm developing an OpenGL application for Ubuntu. I'm using the SDL and GLEW utility libraries. Ubuntu 10.04 is running in VirtualBox 3.2.4 on a Windows host.

When I start the application, I get a lot of GL_INVALID_ENUM errors on OpenGL calls. Analysis with valgrind shows lots (>10000000) of (jumps depending on) uninitialized values (among others), which seem to originate without exception (haven't checked them all) from virtualbox drivers. It begins with an error while loading the VBoxOGL.so library where things start going wrong:

==2311== Syscall param ioctl(generic) points to uninitialised byte(s)
==2311== at 0x425A619: ioctl (syscall-template.S:82)
==2311== by 0x50EFB7B: ??? (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50EFC9D: ??? (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50E612F: crNetConnect (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50E562A: crNetConnectToServer (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50E6106: crNetServerConnect (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x508AE02: stubInit (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGL.so)
==2311== by 0x50A76F5: vbox_install_into_mesa (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGL.so)
==2311== by 0x50C0AB4: ??? (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGL.so)
==2311== by 0x50894B8: ??? (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGL.so)
==2311== by 0x400DC4B: call_init (dl-init.c:70)
==2311== by 0x400DD68: _dl_init (dl-init.c:134)
==2311== Address 0xbed424a8 is on thread 1's stack

After that, many many uninitialized values are encountered after the glewInit call. One example:

==2311== Conditional jump or move depends on uninitialised value(s)
==2311== at 0x50EB581: crStrlen (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50EBD25: crStrSplit (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x50EBEFD: crStrIntersect (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLcrutil.so)
==2311== by 0x515A239: crStateMergeExtensions (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLpackspu.so)
==2311== by 0x51275D0: ??? (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGLpackspu.so)
==2311== by 0x50AB232: cr_glGetString (in /opt/VBoxGuestAdditions-3.2.4/lib/VBoxOGL.so)
==2311== by 0x46B2EAF: glewGetExtension (in /usr/lib/libGLEW.so.1.5.2)
==2311== by 0x46BDF7B: glewInit (in /usr/lib/libGLEW.so.1.5.2)
==2311== by 0x403D50C: gx_screen::initGl() (gx_screen.cpp:81)
==2311== by 0x403D363: gx_screen::gx_screen(gx_screenMode, unsigned int, unsigned int) (gx_screen.cpp:65)
==2311== by 0x403E1E7: gx_engine::gx_engine(unsigned int, gx_screenMode) (gx_engine.cpp:13)
==2311== by 0x8048B3B: main (t_node.cpp:38)

Is there something wrong with my guest additions installation? The compiz environment works just fine, so OpenGL seems to be working. I'm somewhat lost here. Anyone has an idea? I've included a complete listing of the output of valgrind.

Thanks
Attachments
valgrind_gx.txt
(99.45 KiB) Downloaded 8 times
otoparc
 
Posts: 8
Joined: 11. Jun 2010, 13:45
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Ubuntu

Re: OpenGL development issues on virtualbox

Postby otoparc » 23. Dec 2010, 16:17

Still no ideas? It makes proper (valgrind) debugging harder for applications when developing with OpenGl under virtualbox, let alone that these would be real issues in the VirtualBox guest additions..
otoparc
 
Posts: 8
Joined: 11. Jun 2010, 13:45
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Ubuntu

Re: OpenGL development issues on virtualbox

Postby Geometrian » 16. Mar 2012, 03:02

I'm getting this problem too. There are memory problems *all* over the place. Considering that I just spent the last three days setting up a Linux environment specifically to check for memory leaks, this is discouraging. Finally, the thing segfaults, so it's completely worthless. So, I can't run OpenGL programs in VirtualBox just because someone can't write drivers that don't leak memory like sieves and crash? I am disappointed.
Geometrian
 
Posts: 5
Joined: 14. Mar 2012, 00:10


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 17 guests