Could Be A Bug
Could Be A Bug
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.
-
Masterhawk
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
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.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.
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
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!
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!
