Sun xVM VirtualBox and Segmentation fault

Archives Forums/Linux Discussion/Sun xVM VirtualBox and Segmentation fault

Armitage 1982(Posted 2009) [#1]
Hi

I'm trying Ubuntu 8.10 in VirtualBox from Windows XP (and maybe considering fully installing the 9.04).

I can build many examples of BlitzMax but when I successfully build my program (which rely a lot on OpenGl) and Executing it I get a "Segmentation fault" (nothing more sadly...)

Do you think this could come from using the xVM VirtualBox Special NVidia Drivers ?

Thanks


D4NM4N(Posted 2009) [#2]
Segmentation fault can be caused by all sorts, it is a lower level memory access error.
It (Usually) means something is null / doesnt exist or something is trying to write/read memory where it shouldn't eg; outside of an array's scope.
Check to see you are not passing any null/empty pointers or array indexes. My own 'classics' are often with arrays eg "1 to size" when it should be "0 to size-1" :)

Do you have a code segment up to the point it fails?


Brucey(Posted 2009) [#3]
The most likely cause is the inability for it to create the graphics context.
Since BlitzMax assumes everything you ask it to do is successful, it probably isn't testing itself properly.

If you really need to know where it is failing, run it in gdb.
When it segs, you can get a backtrace of the call stack and see where it all went wrong.


xlsior(Posted 2009) [#4]
Something else to try: instead of a full-screen graphics, try windowed -

I know that under PearPC OS-X emulation full screen OpenGL would fail, but the same programs worked OK (albeit very slowly) in windowed mode. Perhaps the Virtualbox emulator has the same limitation?


Mark Tiffany(Posted 2009) [#5]
I've been using ubuntu 8.10 on virtualbox for a while without major issue, but only really for maxgui apps, not graphics apps.