static member functions - statics removed still doesn't initialize (HELP PLEASE!!!)
Hi all
I have a MAJOR problem.
My app is trashing the stack before it is initialized, therfore it can never start as the stack is oblitrated.
I've been told that this can be caused by large global/static variables. Is this also true with static member functions?
Ther code I've got is based on the Enginuity engine and some of the classes have lots of static member functions. Would it be sensible to replace these with public member functions. I know that I'd have to then use them through an instansiated objected of the class, but might this be the cause of my stack issues?
[Edited by - garyfletcher on July 29, 2005 4:49:49 PM]
Right.
I believe that is some other statics I have.
I'm just going through now and refactoring to member vars.
One question though. If I have a var declared:
static boost::shared_ptr<aClass> aName;
Coudl this cause the major stack issues I've been seeing. I must admit my knowledge of the stack is pretty limited.
I believe that is some other statics I have.
I'm just going through now and refactoring to member vars.
One question though. If I have a var declared:
static boost::shared_ptr<aClass> aName;
Coudl this cause the major stack issues I've been seeing. I must admit my knowledge of the stack is pretty limited.
Okay...this is not funny anymore!!
I've got rid of ALL statics...variables, functions EVERYTHING!!!
And my app is still not initializing. Can ANYONE give me any lead on what to look for.
Application Error Pop-up states:
The application failed to initialize properly (0x0000005). Click on OK to terminate the application.
In the debugger I get:
Selecting target: default
Compiling: done
Starting debugger: done
Adding source dir: C:\cvshome\SiSE\NewEngineCB\devAdding file: enginedev.exe
Changing directory to: C:/cvshome/SiSE/NEWENG~3/dev
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
Debugger finished with status 0
I'm using the latest of code::blocks (RC1) with XP.
Please help.
I've got rid of ALL statics...variables, functions EVERYTHING!!!
And my app is still not initializing. Can ANYONE give me any lead on what to look for.
Application Error Pop-up states:
The application failed to initialize properly (0x0000005). Click on OK to terminate the application.
In the debugger I get:
Selecting target: default
Compiling: done
Starting debugger: done
Adding source dir: C:\cvshome\SiSE\NewEngineCB\devAdding file: enginedev.exe
Changing directory to: C:/cvshome/SiSE/NEWENG~3/dev
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
Debugger finished with status 0
I'm using the latest of code::blocks (RC1) with XP.
Please help.
Try compiling Hello World. If it doesn't work, re-install your compiler and/or get a new one.
Hello World works fine...boo hoo!!!!
This is a bit of a 'mare!!
Guess it's back to the drawing board!!!!
This is a bit of a 'mare!!
Guess it's back to the drawing board!!!!
I'm confused.... can't you just run your app in the debugger and *see* where it's failing? main is NOT the first function that runs.
It isn't?
I'm confused then. I though that main() was the entry point....where else could I put a breakpoint?
I'm confused then. I though that main() was the entry point....where else could I put a breakpoint?
You don't need to put a breakpoint. When a segfault occurs, the compiler will dump you wherever the segfault happened.
main() is the entrypoint, but other things happen before main(), such as constructors of global objects.
main() is the entrypoint, but other things happen before main(), such as constructors of global objects.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement