Re: Exception appears after changing project's directory structure
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 01:08:45 -0400
What value is the parameter to SetSize? Show some code proving that the size you set is
meaningful. It could be an uninitialzied variable.
Note that the order of static initializers is not guaranteed, and in fact can be thought
of as essentially random. Therefore, it is possible that because of the compilation
order, you are getting different orders of initialization of static variables, and the
result is that someting you depend on is not being initialized. But without some code
example, it is just a guess at this point.
joe
On Mon, 23 Oct 2006 17:49:01 -0700, sleepless_in_jerusalem
<sleeplessinjerusalem@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Tom,Joseph M. Newcomer [MVP]
Thanks for your reply.
I did delete both Release and Debug folders, as well as doing "Rebuild all"
for every check.
And the libs are in the same place, so I don't think that's the problem
either.
I even went so far as to take the malfunctioning project, and move all files
back into the top directory, adjust the VS project accordingly, and the
problem disappears. Then when I move the files back into the subfolders (and
adjust the project accordingly) the problem reappears. (All lib's and their
include paths are identical here.)
I was thinking that it might have something to do with the compiling or
linking order. I see it works differently in the two scenarios. So perhaps in
one case, some of my includes (of 3rd party software) might be including
different versions of something (MFC?) when it's the directory tree, but not
when flat?
"Tom Serface" wrote:
You might try deleting the Release and Debug folders that may contain older
..obj files. Also, did you move the libraries you use as well? Perhaps an
older one is being linked in somewhere or an older DLL is being used.
Tom
"sleepless_in_jerusalem" <sleepless_in_jerusalem@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:BECD117D-7CE1-4046-8CEC-D19EFDB913A9@xxxxxxxxxxxxxxxx
Hi,
Problem synopsis:
I've recently tried to reorganize our project, by dividing our files into
various directories, instead of them all lying at the top-level directory.
After changing the project to mimic the new structure and fixing the
"Additional Include Directories" setting to point to all the new
directories,
the project compiles. Yet now we get an exception thrown as the program
starts up. As can be seen below, it seems like the exception is thrown
from
CArray (which is why I posted to this group), however it might just be
that
the heap is out of memory, and when CArray tries for more memory, it
fails.
The crazy thing about this is if I "flatten" my directory structure back
again, the problem disappears!
Exception:
"User breakpoint called from code at 0x7c901230"
Output (debug window):
"HEAP[program.exe]: Invalid Address specified to RtlFreeHeap ( 003B0000,
01043F40 ) "
Stack trace:
NTDLL! 7c901230
NTDLL! ...
NTDLL! ...
NTDLL! ...
NTDLL! ...
CArray<double, double>::SetSize(int,int)
...
...
_AfxTreadEntry(void *)
Details:
+ VS 6.0
+ Using MFC as shared DLL
+ Windows XP Pro
Any ideas or suggestions will be much appreciated.
Thanks,
Hagai.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Re: Exception appears after changing project's directory structure (VS
- From: Tom Serface
- Re: Exception appears after changing project's directory structure
- From: sleepless_in_jerusalem
- Re: Exception appears after changing project's directory structure (VS
- Prev by Date: Re: How to create a file in vista?
- Next by Date: Re: Embedding Simple MFC GUI app into website
- Previous by thread: Re: Exception appears after changing project's directory structure
- Next by thread: Re: Exception appears after changing project's directory structure (VS
- Index(es):
Relevant Pages
|