This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Problem with a string literal


Problem with a string literal

Postby golan_trevize_x » Jan 16, 2003 @ 5:22am

golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby Dan East » Jan 16, 2003 @ 7:30am

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
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby golan_trevize_x » Jan 16, 2003 @ 7:38am

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
golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum