Could Be A Bug

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
GameDude
Posts: 500
Joined: Thu May 24, 2007 12:24 am

Could Be A Bug

Post by GameDude »

I was trying to get my program to run, so I compiled and everything went OK. Although when I try to run it, I get the appilcation has failed and send error report message. Is this me or is it a bug? Also, I'm using Dev-C++ and the Irrlicht 1.3.1. The newest version.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

this is more than likely you, you're probably accessing a pointer that points to a bad memory location.
can you show the code that causes the problem?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
GameDude
Posts: 500
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Yeah I don't want anyone else to see, so I'll PM it to you.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

oh sorry, i read the pm before this message and deleted it (I wasn't going to debug 100s of lines of code for you ;) ). you don't need to post the whole thing, just the point where it crashes
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Masterhawk
Posts: 299
Joined: Mon Nov 27, 2006 6:52 pm
Location: GERMANY
Contact:

Post by Masterhawk »

I see you're using DevCpp, sometimes I also get errors like these and can't find out where's the problem. Then I just press "Compile All" and everything works fine. Of course it doesn't if you really got a null pointer in your program, but it prevents the compiler from using old files.
Image
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

Masterhawk wrote:I see you're using DevCpp, sometimes I also get errors like these and can't find out where's the problem. Then I just press "Compile All" and everything works fine. Of course it doesn't if you really got a null pointer in your program, but it prevents the compiler from using old files.
The debugger CAN often tell you what line it crashes on, too. If you can't figure that out use exit(0) in your code and compile, then place it down 10 or 20 lines, compile, etc. When it crashes you know you've passed the line. You should be able to pinpoint the offending line this way.

I've noted sometimes when I get an error I really can't figure out if I delete all my object and make files and close Dev-C++, then open the project again and compile all with everything fresh I wont get the error anymore.

Personally I never compile with anything but 'rebuild all' because I have too many issues otherwise.
Brainstorm
Posts: 5
Joined: Wed May 23, 2007 1:30 pm

Post by Brainstorm »

you can use gdb.exe (gnu debugger) that comes with dev-cpp.
first set linker to include debugging information:
Project->options->compiler->linker->generate debugging information YES
now you can use gdb from within dev-cpp but then the working directory may be changed. I usualy open up a console:
windows menu->run
type: cmd
then find the directory where you have your executable
I don't know how much you know about how to do this so...
use the command cd to navigate:
cd <directory name>
(and
cd ..
to go to the parent directory)
when you are there type
<dev-cpp basedir>/bin/gdb <executable name>

You can also configure a tool in dev-cpp to open the console
you can also start gdb.exe directly
tools->configure tools->add

Using Gdb:
first make sure that you have recompiled the entire project (so that you got some debugging information into it )
in gdb (console) type: run
if it wont start you must set target: target exec <exec name>
try to make your program to chrash again and then type:
where
or
stack
This shows where the program was when it chrashed.

I hope this helped! :D
Post Reply