The compilation is not the problem because the program is compiled even when in debug mode. This is not BASIC; the code is not interpreted.
Anyway what I do is insert code like this:
FILE* File = fopen( "Debug.txt", "ab" );
fprintf( File, "Step 13 done. Trying Step 14...\n\r" );
fclose( File );
...at various parts of the program. Then I check the log. When I find the last line printed, I know the error occured between that print statement and the one that was supposed to be printed next. So then I insert new print statements inbetween, narrowing down the source of the error.
~CGameProgrammer( );
DevImg.net - Post screenshots, comment on others.
Town 3D Engine - A city-rendering 3D engine. Download the demo.
the F. errors are solved, sorry for the last name :)
~CGameProgrammer( );
Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
I had the same problem, and I think I can tell you where it is.... Check anywhere where you are accesing arrays of any kind, to see if you''re not overstepping the bounds of them... I did this error once, and it ran fine when hitting F5, but running the executable just screwed it up! It seems that MSVC allocates extra memory around these arrays to prevent nasty crashes like those from happening. It''s about the most stupid thing I''ve ever heard 
Hope I''ve helped!
Oh, and plz, choose a proper title for your thread the next time, there are many younger people on these forums which should not really be exposed to this kind of language...

Hope I''ve helped!
Oh, and plz, choose a proper title for your thread the next time, there are many younger people on these forums which should not really be exposed to this kind of language...
so have you moved the exe out of the debug folder
and into the main directory of you program??
because if its working from within visual studio thats your problem
and into the main directory of you program??
because if its working from within visual studio thats your problem
Hi all,
I don''t use directory names, just "model.obj" so if I put them in the same dir it works, right? also I didn''t even start the executable myself (yes I did, but that isn''t the problem) but I used the ! button that runs the executable for me.
It might be arrays or pointers, but shouldn''t the debugger see if I''m reading out of bound?
When I debug (the .exe) I get an ASM code dump, doesn''t tell me much. The normal debugger doesn''t detect any errors...
thanx anyways... i''ll try to make a log file
Marty
I don''t use directory names, just "model.obj" so if I put them in the same dir it works, right? also I didn''t even start the executable myself (yes I did, but that isn''t the problem) but I used the ! button that runs the executable for me.
It might be arrays or pointers, but shouldn''t the debugger see if I''m reading out of bound?
When I debug (the .exe) I get an ASM code dump, doesn''t tell me much. The normal debugger doesn''t detect any errors...
thanx anyways... i''ll try to make a log file
Marty
_____ /____ /|| | || MtY | ||_____|/Marty
sounds like your not initializing a critical variable. In debug these have a bit pattern assigned, in release it''s up to the OS what bit pattern the memory gets, if any, it''s usually all zeros. Hence you get problems with values that are huge in debug build but zero in release. Or, say, for a boolean, true in debug and false in release.
It won''t be an out of bounds array error, a debug build will get heap corruption errors if this is the case.
| - Project-X - my mega project.. getting warmer
- | - adDeath - an ad blocker I made - | - email me - |
It won''t be an out of bounds array error, a debug build will get heap corruption errors if this is the case.
| - Project-X - my mega project.. getting warmer

On a side note, please realize that there are children that read these message boards, and thus shouldn''t have to see vulgar words in people''s posts. Once in highschool I was majorly ticked off when our system administrator removed our access to these forums the last time someone decided to curse in their topics. Be considerate, and understand that people are here to help you with programming, but not always your language problems.
Thankyou.
PS: if possible, could you ''edit'' your original post to see if you could change your topic to a more suitable one?
Thankyou.
PS: if possible, could you ''edit'' your original post to see if you could change your topic to a more suitable one?
Hmm... Be sure the files are in the debug directory AND your project directory. I also agree with wAVaRiaN.
-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
It works!
I initialized some pointers and found out that I was using a -1 (for starting counting at 0) in a new command. I removed the -1''s. stupid me, and stupid debugger
Normally it tells me in c++ now I had to find out the hard way...
Anyways thanx all!
Marty
PS: Again sorry for the thread name. I got pretty angry after hours of debugging.
I initialized some pointers and found out that I was using a -1 (for starting counting at 0) in a new command. I removed the -1''s. stupid me, and stupid debugger

Anyways thanx all!
Marty
PS: Again sorry for the thread name. I got pretty angry after hours of debugging.
_____ /____ /|| | || MtY | ||_____|/Marty
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement