PDA

View Full Version : Why does this code freeze the computer?



uzu_manga
01-09-2003, 04:17 AM
I know that there are some in here will go red hot chilipepper about me asking this, as you would claim "off-topic" question. But since I don't know were the error is I'll ask anyway!
Why does this source freeze Linux? It works absolutly fine in Windows... yes I am using SDL as you might se in the source... Could anyone explain to me were the error lies within?
Here's a link to the source code...
http://www.oktv.se/hemsida/andreas.johannisson/main.cpp

Humus
01-09-2003, 12:02 PM
What does "freeze" mean in this context? Locks the whole machine or just your application? If the former, then it's most likely a driver bug.

roffe
01-09-2003, 01:55 PM
Originally posted by uzu_manga:
[B]I know that there are some in here will go red hot chilipepper about me asking this, as you would claim "off-topic" question. But since I don't know were the error is I'll ask anyway!

I don't think it has that much to do with "off-topic" posts, but instead there seems to be a trend(haven't been monitoring this forum too long, so correct me if I'm wrong) to DUMP code and ask other people to fix it. What ever happened to the fine art of DEBUGGING??
With todays IDE's debugging is simple. Boring as always, but much easier. Is stepping through code a thing of the past?

Writing new code is easy(at least it feels that way) and fun, debugging is real work. Anyone that has ever worked on a commercial or just a larger project knows this.
I can't say I've used gdb all that much but give it a shot, I'm sure you'll find that bug in no time.