Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Marty666

the F. errors are solved, sorry for the last name :)

This topic is 5598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a program that runs fine on debugging, but when I run the executable it gives and error and wants to send an error report. This report is full of bullshit exept it tells me the bug is in NTDLL.DLL How do I remove this bug, does it have something to do with the way I compile/link it, the way I use OpenGL or is it some MS bug? Marty [edited by - Marty666 on March 24, 2003 5:39:14 PM]

Share this post


Link to post
Share on other sites
Advertisement
so when you run the exe from within visual studio it works
are you using visual studio
but when you click on the exe it errors it that right

Share this post


Link to post
Share on other sites
quote:
Original post by Marty666
I''ve got a program that runs fine on debugging, but when I run the executable it gives and error and wants to send an error report. This report is full of bullshit exept it tells me the bug is in NTDLL.DLL
How do I remove this bug, does it have something to do with the way I compile/link it, the way I use OpenGL or is it some MS bug?

Marty


There are many people on this forum. Some of them great. Some not so great.

None of them are telepaths, however.

More info please.


--
Sean Timarco Baggaley

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I experienced this same problem, but it was because when I ran the executable, I didn''t have my sound files directory in the same directory as my executable, so the game failed to load the sound files and when it tried to play one, I got an access violation because I tried to reference the NULL pointer I was using for the sound interface (all the pointers were initialized to NULL).

Bottom line, check to make sure your executable and all files it depends on are in the right directories.

Share this post


Link to post
Share on other sites
i agree with anonymous poster thats what i would have suggested
but i really need more info as suggested by stimarco

Share this post


Link to post
Share on other sites
Hi, sorry for the lack of info...

Here's the story.

I've got a program that loads an object file, calculates the normals and loads a texture. Then it shows a grid (just lines) and the .obj model lighted and textured in the middle.

It takes relitavely a lot of time (about 2/3 sec) to load the program when I hit F5 in MSVC++ 6.0 (I've got visual studio, but I allways just start MSVC++, dunno if it makes a difference). And then it all works fine.

When I start the program with CTRL-F5 or 'execute program' or the ! icon (all the same) or when I start it from my windows explorer, the program wants to send an error report immediately (that means probably when loading the model and texture or when calculating the normals).

If I add breakpoints (F9) the debugger only stops when I debug using F5 and logically not when running the executable, that is CTRL-F5...

I don't know anything about the error because WINXP doesn't show me much. I think it's because I should tell c++ (which i'm pretty new to) to put in my program, to tell windows to reserve more memory for my program. Maybe it's something completely different. It seems to be the compiling that's going wrong if it works while debugging in c++ and doesn't works as .exe.

Hope you can tell me more now, it's all I know myself.

PS: it just loads 'texture.bmp' and 'model.obj' so that should work fine if it's in the same dir, right?

[edited by - Marty666 on March 24, 2003 3:18:29 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
When the error pops up click on DEBUG. VS.net will actually go to the place in code where the error occurs, but earlier versions just give you a memory dumb and the error code. It''s the error code that you need to look at. If it''s an access violation, and you are using ANY kind of pointer at all, be sure that one of these pointers isn''t NULL when it''s trying to be dereferenced.

Other than that I have no clue. Maybe you could post some code.....

Share this post


Link to post
Share on other sites
I think I may know your problem, but I may not. Here is my suggestion:

When MSVC++ makes a program it will send the executable to the debug folder (that is where I am guessing you are running it from). If you data files are not in the same folder as your executable, the program will freak out. What I do is have my program spit out to a ''Output'' folder instead of the ''debug'' folder. Then I put program''s data files in a folder called ''data'' in the ''Output'' folder and write in the file path when i load them (i.e. somefunc.load("data/file.dat"). The problem may be that your data files need to be in the sam directory as your executable, and when you double click the executable in the debug folder, it obviously can''t find the files.

Hope that helps.

-------------------
Realm Games Company

Share this post


Link to post
Share on other sites
quote:
Original post by Marty666
Hi, sorry for the lack of info...

Here''s the story.

I''ve got a program that loads an object file, calculates the normals and loads a texture. Then it shows a grid (just lines) and the .obj model lighted and textured in the middle.

It takes relitavely a lot of time (about 2/3 sec) to load the program when I hit F5 in MSVC++ 6.0 (I''ve got visual studio, but I allways just start MSVC++, dunno if it makes a difference). And then it all works fine.

When I start the program with CTRL-F5 or ''execute program'' or the ! icon (all the same) or when I start it from my windows explorer, the program wants to send an error report immediately (that means probably when loading the model and texture or when calculating the normals).

If I add breakpoints (F9) the debugger only stops when I debug using F5 and logically not when running the executable, that is CTRL-F5...

I don''t know anything about the error because WINXP doesn''t show me much. I think it''s because I should tell c++ (which i''m pretty new to) to put in my program, to tell windows to reserve more memory for my program. Maybe it''s something completely different. It seems to be the compiling that''s going wrong if it works while debugging in c++ and doesn''t works as .exe.

Hope you can tell me more now, it''s all I know myself.

If you''re using VisualStudio, the debugger is your friend. Put in some break points (F9 key), and then step through (F10/F11/Shift+F11) your code, and try to narrow down what it''s puking on. That will help you infinitely more than any error WinXP (and it better be Pro) will give you.

Sometimes VisualStudio sets your paths for you when it launches things. If you then try to launch them from Windows you get weird errors, that''s because your program is confused about it''s path.

If you can find that your code is barfing on a line where you''re loading something, then it''s probably the messed up paths. If it''s something else (random), it could be an error caused by the optimizer in VC++.

You should also try to have it so your program doesn''t crash if it can''t find something, and instead lets the user know (via a dialog/message/log/etc) what exactly happened, and then exit gracefully.

Good luck...debugging can be a b*tch.

- sighuh?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
memory dumb ???

fruedian slip

I meant memory dump.

-AP

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!