
Posted:
Jan 16, 2003 @ 7:30am
by Dan East
I would start by checking to make sure your stack is large enough. Check the linker settings to increase the stack size (and make sure you don't have some crazy array allocated on the stack like "char buf[1000][1000]". I would also be concerned that memory is being written out of bounds, thus corrupting the stack. Make sure you aren't jumping into a non-existant class to call your constructor. Like this:
CSomeClass* myclass;
myclass->DoSomething();
..where in DoSomething you have the line of code you mentioned that allocates the new instance of MyStringClass. Weird things can happen in that case. So if that line resides inside of another class, take a look at the value of "this" to make sure it points to a valid class. Same thing in your constructor. Make sure "this" is valid using the debugger.
Dan East

Posted:
Jan 16, 2003 @ 7:38am
by golan_trevize_x
Good advice, Dan, thanks! I'll check some of this stuff out and try and find the problem.
I hate these kind of bugs, because I'm just not used to having them. This thing I'm making is probably the biggest single project I've ever done, and I'm more confident with Java than C++!
Nathan