Program Data Limits
-
Can anyone advise on this problem on Visual Studio 2005 MFC application? When I add any new variables; e.g. say a structured array of some 256 elements my program crashes with an exception where the code was OK in all previous versions. I am assuming that I have reached some limits on heap or stacks etc. and think that addresses/pointers are being overwritten. Can some suggest and options to set to increase the programs resources. Note the program reads in some large files and uses the CStringArray for lots o string processing. Many thanks, Graham.
grahamfff
-
Can anyone advise on this problem on Visual Studio 2005 MFC application? When I add any new variables; e.g. say a structured array of some 256 elements my program crashes with an exception where the code was OK in all previous versions. I am assuming that I have reached some limits on heap or stacks etc. and think that addresses/pointers are being overwritten. Can some suggest and options to set to increase the programs resources. Note the program reads in some large files and uses the CStringArray for lots o string processing. Many thanks, Graham.
grahamfff
What precisely was the exception? Any relevant code that you can show us?
“Follow your bliss.” – Joseph Campbell
-
What precisely was the exception? Any relevant code that you can show us?
“Follow your bliss.” – Joseph Campbell
I just tried to invoke the crash and the code section it occured in, but the problem has gone away. I did a work around when I encountered this crash and just wanted to try and sort it out now. I just wondered if I used a #define items inside the structure I has defining. Anyway should I worry about the data segment of the program as I am processing very large text files as already I needed to upgrade counters from short to int. Regards, Graham.
grahamfff
-
I just tried to invoke the crash and the code section it occured in, but the problem has gone away. I did a work around when I encountered this crash and just wanted to try and sort it out now. I just wondered if I used a #define items inside the structure I has defining. Anyway should I worry about the data segment of the program as I am processing very large text files as already I needed to upgrade counters from short to int. Regards, Graham.
grahamfff
My guess is that by adding an extra entry then you changed the alignment of memory, and exposed an old bug where it accessed invalid memory. Usually these bugs are hidden again by modifying the application again so the alignemtn of memory changes again.