|
simple program crash |
lynerdGS
Member #6,989
March 2006
|
I have been getting crashes from the simplest programs and I can't figure out why. Is it possible there is something wrong with my computer or maybe I am just doing timers wrong? I can load this up, it will run for about 20 seconds, and then just stop responding. edit:
|
Steve Terry
Member #1,989
March 2002
|
Just looking over it I don't see anything terribly wrong. ___________________________________ |
Arthur Kalliokoski
Second in Command
February 2005
|
I compiled it as "g++ -s -O2 -Wall t.c -o t.exe -lalleg" and it apparently did everything right (that is, nothing happened until I hit ESC). Ran it three times. They all watch too much MSNBC... they get ideas. |
Neil Roy
Member #2,229
April 2002
|
I would add in some code to remove those timers when you're done. remove_int(increment_speed_counter); I would also add in code to check the return values of everything like when you set the screen reolution and create the bitmap. Check if the bitmap exists before destroying it of course. If a function has a return value, you should always handle it in my opinion. Other than that, all looks okay to me. --- |
Steve Terry
Member #1,989
March 2002
|
Try using scare_mouse and unscare_mouse, that way the mouse won't flicker. Don't know why that would cause the crash though. ___________________________________ |
ImLeftFooted
Member #3,935
October 2003
|
I'm going to guess some kind of mixup the allegro versions between dll and includes. Is there any reason you're not using the allegro project template for dev-cpp? |
|