Jump to content
  • Advertisement
Sign in to follow this  
garyfletcher

Trashing the stack at runtime???

This topic is 4768 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

Hi all When stating my app up I get a pop-up stating: The application failed to initialize properly (0x00000005). I run it in debug, placing a breakpoint on the very 1st line of main() and I get the pop-up described above and the debugger gives the following messages: Selecting target: default Compiling: done Starting debugger: done Adding source dir: c:\cvshome\SiSE\NewEngine - CB\devAdding file: C:\cvshome\SiSE\NewEngine - CB\dev\engine - dev.exe Program received signal (SIGSEGV) Segmentation fault error Error: dll starting at 0x3d1000 not found. Program received signal (SIGSEGV) Segmentation fault Program received signal (SIGSEGV) Segmentation fault exited -1073741819 error Any ideas???? I'm guessing I'm missing a dll I've got sdl.dll, sdl_net.dll & fmod.dll in my current directory. The only other library I'm using is opengl...do I need a dll for that also. I'm only asking coz I can't find it. [Edited by - garyfletcher on July 28, 2005 2:26:24 AM]

Share this post


Link to post
Share on other sites
Advertisement
I've heard of people overloading the stack and having the program crash before it's even "really started". Check how many global variables you have. Also make sure you don't have any really big global arrays. Static variables, too, are allocated off of the stack.

And you don't need OpenGL's DLL in your current directory.

Share this post


Link to post
Share on other sites
Quote:
Original post by garyfletcher
Right...what about a dll for glut?

It can be in either the path or the current directory.

Share this post


Link to post
Share on other sites
Both opengl32.dll and glu32.dll (think that's the dll for glut???) are in my windows/system32 dir - so should be picked up automatically, I think?

Thing is, the app isn't getting to the 1st line of my code. I thought DLL's were loaded on demand.

BUT the debugger output seems to imply it's a problem loading a dll????

I'm confused?

Share this post


Link to post
Share on other sites
Okay...I don't think it's anything to do with the dll.

I "imported" to DEV-C++ and the debugger there had messages about no stack.

Does this mean I'm somehow corrupting the stack before I even start processes...viz Mercury's 1st reply?

Doesn't sound good...how does that happen and is there any way I can track down the problem?

Share this post


Link to post
Share on other sites
Quote:
Original post by garyfletcher
Both opengl32.dll and glu32.dll (think that's the dll for glut???)


GLUT needs glut32.dll, not the one for GLU, glu32.dll

Share this post


Link to post
Share on other sites
Weird :-/

You'd have to be doing some really weird stuff to cause this. If you haven't already, try doing a full clean and rebuild of the entire project. If you're in windows and haven't rebooted in a long time try that too :) Failing that, what variable declarations do you have in main()? Any large arrays or instances of very large classes?

Also, if you ARE missing a DLL, windows might tell you what it is if you just run the exe from explorer (i.e. double-click on it). Usually it will pop up a dialog saying something like "Application failed to start: missing whatever.dll".

Share this post


Link to post
Share on other sites
main is VERY small.

Instansiates and object (on the heap) and calls it's run() member function.

I've made sure that all objects in that are also on the heap.

Tried what you mentioned about running straight from explorer...same message...I don't think it's a dll issue...but saying that I'm stumped anyway...so who knows...not me that's for sure...well, for now.

Will have to keep playing and see if I can find what's up.

Anymore suggestions are more than welcome.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!