Segmentation fault

Archives Forums/Linux Discussion/Segmentation fault

Tricky(Posted 2011) [#1]
Ok, on my mac I have VirtualBox in which I installed Ubuntu 10.x in order to compile mac versions of my projects at last.

I just picked a few random projects of mine, the a highload of them crashes during runtime, mostly at start up some a bit later but still in an early stage of execution, and on the output windows on MaxIDE I see that the error "Segmentation fault" is reported.

What is wrong here? All tried projects work perfectly in both Windows and MacOS X, so it shouldn't be the code, I think. Is it something wrong in Blitzmax or is VirtualBox simply not able to run BlitzMax projects (though I could run a few Windows builds perfectly in Virtual Box (in Windows XP and it was terrible slow, but they worked), but of course Windows!=Linux so that may not say much. I didn't expect them to run fast or anything, for me it was just a matter if they work at all.

Does anybody else have experiences with running BlitzMax apps in Linux in Virtual Box? (Host system is MacOS X Snow Leopard btw)

Last edited 2011


*(Posted 2011) [#2]
Unfortunately the segmentation fault is a common problem on Linux, are you doing 3d or 2d?

One thing I noticed was sometimes it caused by a dodgy filename path or something like that linux like mac osx is case sensitive for filenames. Another is the order in which you load stuff strange as it may seem in EMP I had to load the ships before the textures otherwise that threw a segmentation fault.

Also I would look at the driver capabilities as it can also throw one if it cant run something, rather than on windows where you get an error saying 'you graphics card doesnt have that capability' it throws errors on linux.

Last edited 2011


Tricky(Posted 2011) [#3]
are you doing 3d or 2d?

I basically do only 2d, but I guess the drivers are 3D. In one project of mine I got a proper error message on that as 3D not being supported in my VM (I need to sort out how Virtual Box handles that part).

The first project I tried is actually neither. That was an old P2000T program my dad once coded long ago, that I recreated in BlitzMax (when I was bored) and it's entirely based on MaxGUI, no references made to OpenGL at all. As that was only a program made when I was bored I may release the source soon so that we might get an idea where the problem lies. I have the feeling that the unloading might be doing the evil here as that program shows a little information first (for which a separate Window was created) when the actual program starts I believe that Window was completely unloaded. Of course I can only speculate.

One thing I noticed was sometimes it caused by a dodgy filename path or something like that linux like mac osx is case sensitive for filenames

Actually the programs were all on a USB harddrive that was called with the Shared Files feature VirtualBox provides. As it was a FAT partition even Linux drops the Case Sensitive part on that, but of course, one can never be sure that isn't the real problem. I should assume though that MaxIDE forms the way to call bmk and the compiled program well, but who is me...


skidracer(Posted 2011) [#4]
Perhaps you should try debug mode.

As for case sensitivity aren't you getting confused with Mac?

Also, delete all your .bmx folders or at least check their permissions haven't been messed with and are in fact readonly.

Last edited 2011


Tricky(Posted 2011) [#5]
Actually I've never experienced any Case Sentivitiy in Mac at all. Especially not with FAT formatted devices (as FAT is not case sensitive) but I even tried it on my internal Mac Hard drive and I could just use lower and upper case randomly. I know Linux (or at least Ubuntu) is case sensitive, but (as far as I experienced so far) not on my shared Virtual Box folders.

But as said before, I take it MaxIDE calls the created exes (or whatever you call them in Linux) correctly and the project I want to show so you can try out what my cause this does not call for any external files once it's compiled, so that makes me doubt case sensitivity is the cause of the evil here, but I never eliminate an option before I made sure :)

I will try to make a debug build to see if the error persists there as "Segmentation fault" or if I get an actual error message. Of course it may be possible that my Linux version of BMax is a newer version than the Mac and Windows one, I want to make sure that that doesn't matter at all.

I'll make a double check on the read-only setting. I'm pretty sure it's read-write, but I want to make sure I can safely eliminate that possibility.

Ok, thanks a lot, with this information I'll try again, if this is still no good, I may post the source of my "I am bored" project. I got a drop-box account. It is possible to put stuff on there in a public folder without having to give away my password wasn't it? (Posting it on the forum in a [code] can be terrible as I always work with too many "includes") :)


Armitage 1982(Posted 2011) [#6]
I keep getting Segmentation fault error on the new ubuntu with any samples...

I rebuild twice and download every stuff people post here and there on the forum but nothing...

Why isn't there any simple installer for Linux !?

Ubuntu...sick


Armitage 1982(Posted 2011) [#7]
Definitely a NVIDIA driver related problem. Work in screen mode, not in full screen.

I cannot love Linux because Linux don't love me ^^


Armitage 1982(Posted 2011) [#8]
... I try on a Macbook with a virtual machine and ubuntu 11.10 but also 11.04
I try on a acer netbook and on my AMD64...
Everywhere I get something different!

On the Macbook, things compile, running and then in the middle of loading crash with all kind of creepy informations on the log panel.

On the Netbook, things won't compile. First "out of memory" so I try this FIX : http://www.blitzbasic.com/Community/posts.php?topic=71746.
Then after, "Segmentation faut error".

On my AMD64 I'm not really sure what's going on but it's probably related to my CG driver.

I don't understand... My game was working correctly on previous ubuntu but now with 1.44b and the last GCC or who know which dependencies, it stop working without giving a true error message to track something.

Is anyone experimenting the same kind of problems with the linux version of BlitzMax ?? Is Linux seriously supported ?

Last edited 2011

Last edited 2011


Armitage 1982(Posted 2011) [#9]
I finally get it working.

Did not change a thing !
Just used virtualBox instead of any others VM tool.
It's slow as hell (5FPS compared to 300fps on native) but it's working... I Guess.

I seriously don't understand how linux is still so hard to configure by these days.
I was happy when wubi arrive, but yesterday the 11.10 simply fail to boot on my dev. config, at least it did not ruin my MBR like several time in the past. Why adding cool stuff to your OS if people can't get it to run easily. Do you seriously think that neophyte enjoy Terminal ??

As for virtualisation, I get excellent emulation speed with Windows 7 (to the point I can actually play my game at full speed) and a slow Ubuntu on the other side.