Hello,
I'm making a small game; using SFML 1.6. I've ran this program many times, and for some reason, when I do now, (on the same machine) I get a segmentation fault. I decided to use debugging symbols and use the gdb debugger to get a more detailed segmentation fault message, and I get a really weird one.
Here is the code:
//...
std::cout<<"Starting video..."<<std::endl;
App.Create(sf::VideoMode(SCR_WIDTH,SCR_HEIGHT,32),"Qubit");
std::cout<<"Video started"<<std::endl;
App.SetFramerateLimit(FPS);
//...
Here is the output of the gdb debugger:
(gdb) run
Starting program: /home/samuel/programming/cpp/qubit/qubit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Running Qubit...
Starting video...
Program received signal SIGSEGV, Segmentation fault.
__GI_getenv (name=0xb78953b2 "TEL_NO_BLIT") at getenv.c:90
90 getenv.c: No such file or directory.
(gdb)
I think the error is in the
App.Create(sf::VideoMode(SCR_WIDTH,SCR_HEIGHT,32),"Qubit"); line, as "Video started" should have been printed if everything went well, and it didn't print.
SCR_WIDTH is 1024, and
SCR_HEIGHT is 768, which is perfectly fine, my screen is 1366x768.
My operating system is Ubuntu Linux 12.04 (precise) 32-bit; Kernel version 3.2.0-31-generic-pae.
Can you guys tell me what the hell is this error? and why is there a segmentation fault?
Cheers,
Kosmos.