![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Apr 2005
Posts: 96
Rep Power: 4
![]() |
Debugger help (devc++)
Im trying to use a debugger for the first time. It seemed like a good idea because I was stuck on a kinda complex problem while making a game. First of all the program runs fine aside from the logic errors but everytime I try to step over my SDL_Init function I get this error: "An Access Violation (Segment Fault) raised in your program.". I really need some help on this one.
__________________
I had my portable CD player, and took it in the bathroom with me while I went to pee. And the second I whipped my penis out, the theme song to 'Rocky' started playing. I've never felt more manly than in that moment. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Step through it; an init function probably has some touchy stuff in it, maybe you'll get a clue. The Dev-Cpp debugger is not as robust as, say, VC++.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Apr 2005
Posts: 96
Rep Power: 4
![]() |
When I tried to step into it I got the same error. Mabey I should download a different debugger? Any suggestions?
__________________
I had my portable CD player, and took it in the bathroom with me while I went to pee. And the second I whipped my penis out, the theme song to 'Rocky' started playing. I've never felt more manly than in that moment. |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You say the program "runs fine" otherwise? It's still possible you have some problems. Consider that you have a buffer overflow or something that is otherwise tromping memory that doesn't belong to it. Sometimes that memory is just another variable, and you don't notice the effects (maybe it's been used and isn't needed again, or is rewritten properly). Sometimes it's something critical or something protected that will cause an error. Particularly a return address on the stack. Building a program in debug mode builds in a lot of otherwise nonexistent stuff, labels, debug bookkeeping, etc. These may allow code to function that won't function otherwise. I'd check very carefully the initialization statements in the function. The only other C/C++ debuggers I use are the ones with the MS IDEs I have, so I can't make other recommendations.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|