In my new startrek game I ran into a nasty problem..
since I added the communication class I get a segmentation fault in the engine constructor when making the colors needed with al_map_rgb..
Could any of you guys take a look at it ?
I'm staring at it for quite some time but I don't see the problem... 
It should compile on windows and linux
Thanx in advance
also you have to copy the resources from the debug map to the release map to do a release build.. including resources in both maps was too big.
Is the constructor being called before allegro is initialized?
If you have a global / singleton that's calling constructors before Allegro gets initialized, it's going to crash.
No al_init() is the first thing I call
...and setup is called from main...
So where is it failing inside setup()? I don't see al_map_rgb() in there, but I do see them in TEngine::TEngine. Do you have a stack trace from GDB for the failure? Do any specific debug options / defines cause it to fail?
Also, did anything change recently that started the problem? That is, did they fail the second you started putting them in, or did they fail after you changed something else?
Like I sayed, the segmentationfault pops up in the engine constructor after a few calls to al_map_rgb.. exactly where the color white is made.. but If you remove that one the next color becomes the problem.. so it probably isn't the true location of the problem
#0 00402E00 TEngine::TEngine(this=0x2ef3df0, a_nWidth=1024, a_nHeight=768) (C:\Documents and Settings\Owner\Desktop\StarTrekV3_Linux\Engine.cpp:366)
#1 004139AC Setup() (C:\Documents and Settings\Owner\Desktop\StarTrekV3_Linux\StartrekV3.cpp:233)
#2 004152C7 main(argc=<error reading variable: Cannot access memory at address 0x22ff38>, argv=<error reading variable: Cannot access memory at address 0x22ff38>) (C:\Documents and Settings\Owner\Desktop\StarTrekV3_Linux\StartrekV3.cpp:767)
Stack is so fkcd up, it can't even read argv.
how is that possible ?
That means some pointer, some where, is thrashing everything and its most likely completely unrelated to the actual al_map_rgb call.
It's likely that if you change the compiling options (debug/optimize levels) the error will jump around to a different line because the overall organization of the game and memory layout will have changed slightly.
Check all pointers. Check all arrays. Check all classes to make sure you're not using a non-pointer version of a derived class in a base class array (because if they're not pointers, the base class constructor/deconstructor never gets called).
Get Valgrind with:
sudo apt-get install valgrind
And run your program with Valgrind. Valgrind is GREAT for finding memory problems because it runs the entire program in a fake (virtual) CPU that is smart enough to know when something inside it is wrong.
A sample valgrind line I found from a tutorial is this:
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./test
Where test is your program name. Valgrind has hundreds of options so it can be daunting at first glance.
[edit] I tried downloading your code but I cannot get it to compile. Clang throws tons of compile errors including missing constants, missing STD namespace, and more. What did you use on Linux to compile it?
Ik was coding on Windows yesterday, But I built and ran it several times on Linux (ubuntu) using code::blocks (gcc).
I had to reinstall ubuntu some time ago so I need to install and setup allegro again. I'll try it tonight.
Edit.. I was missing permissions to run .. errrm
however.. strange thing is I can build on linux.. the debug version runs fine now..
how that is possible the devil may know... the release build gives error 255 however.. stack overflow ? I thought a debug used up more stack than a release 
{"name":"610242","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/c\/1ca328eaed59fabaa186e693d99191c9.png","w":1280,"h":1024,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/c\/1ca328eaed59fabaa186e693d99191c9"}
Edit: after some testing with other code I found the version of allegro I was using caused the problem.. I have no idea why but with version 5.0.4 I get the segmentation fault. With version 5.0.1 everything runs fine....
it could be that the 5.0.4 version was build wrong somehow since I built that one myself some time ago. The 5.0.1 version is from allegro.cc
Buy why ?