Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!! 
Author Message
 Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!!

Hello,

I recently migre two of my C,C++ (mixe code) programs from
MSVC 4.0 to Visual Studio 6.0 (SP 5). The two programs
compile and link without any problems (Level 3). The two
programs run fine in Release Mode (outside the IDE) but when
I run them in Debug Mode from the Visual Studio 6.0 IDE,
they terminate both with a 0xC0000005 : Access Violation. !
 I trace them until the crash and they both enter after the
~CMyProgApp destructor method in a the CRT0DAT.C files and
crash in the doexit function in the statement mentionned
below :
if (__onexitbegin)
{
  _PVFV * pfend = __onexitend;

  while ( --pfend >= __onexitbegin )
  /*
   * if current table entry is non-NULL,
   * call thru it.
   */
   if ( *pfend != NULL )
     (**pfend)();

Quote:
}

the (**pfend)() crash after about five iterations...

My codes use MFC in a static Library, the error doesn't
produce if I use MFC in shared Library.
Moreover the error doesn't exist under Windows 9x,Me but
only under Windows NT 4.0 and 2K.

I've tried to compile my two programs under MSVC 5.0 and I
haven't got any problem !

If anybody have an idea, it would be greateful.
Is there particular precaution to make, when you migre from
MFC 4.0 to MFC 6 ?
Where could I find documentaion about the subject ?

Thanks in advance.
Chris.



Sat, 17 Jan 2004 20:57:26 GMT  
 Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!!
I've experieinced the same thing but don't have a fix.  On another thread
for this same subject they reported SP5 fixed the problem.  (I only have SP4
and don't see SP5 posted on MSDN.  Where did you get it?)  On still another
thread (with SP4) they found the heap was being trashed.  Not sure if any of
that applies to your specific problem though as it seems the 0xC0000000 is a
generic allocation error.  Other messages said to link in a non-debug C run
time library to fix it.

Phil


Quote:
> Hello,

> I recently migre two of my C,C++ (mixe code) programs from
> MSVC 4.0 to Visual Studio 6.0 (SP 5). The two programs
> compile and link without any problems (Level 3). The two
> programs run fine in Release Mode (outside the IDE) but when
> I run them in Debug Mode from the Visual Studio 6.0 IDE,
> they terminate both with a 0xC0000005 : Access Violation. !
>  I trace them until the crash and they both enter after the
> ~CMyProgApp destructor method in a the CRT0DAT.C files and
> crash in the doexit function in the statement mentionned
> below :
> if (__onexitbegin)
> {
>   _PVFV * pfend = __onexitend;

>   while ( --pfend >= __onexitbegin )
>   /*
>    * if current table entry is non-NULL,
>    * call thru it.
>    */
>    if ( *pfend != NULL )
>      (**pfend)();
> }
> the (**pfend)() crash after about five iterations...

> My codes use MFC in a static Library, the error doesn't
> produce if I use MFC in shared Library.
> Moreover the error doesn't exist under Windows 9x,Me but
> only under Windows NT 4.0 and 2K.

> I've tried to compile my two programs under MSVC 5.0 and I
> haven't got any problem !

> If anybody have an idea, it would be greateful.
> Is there particular precaution to make, when you migre from
> MFC 4.0 to MFC 6 ?
> Where could I find documentaion about the subject ?

> Thanks in advance.
> Chris.



Sat, 17 Jan 2004 21:33:48 GMT  
 Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!!



Quote:
> I've experieinced the same thing but don't have a fix.  On
another thread
> for this same subject they reported SP5 fixed the problem.
(I only have SP4
> and don't see SP5 posted on MSDN.  Where did you get it?)

On still another
I've got it from MSDN, and it is available on the web since
26th february 2001

Thanks

Quote:
> thread (with SP4) they found the heap was being trashed.
Not sure if any of
> that applies to your specific problem though as it seems
the 0xC0000000 is a
> generic allocation error.  Other messages said to link in
a non-debug C run
> time library to fix it.

> Phil



> > Hello,

> > I recently migre two of my C,C++ (mixe code) programs
from
> > MSVC 4.0 to Visual Studio 6.0 (SP 5). The two programs
> > compile and link without any problems (Level 3). The two
> > programs run fine in Release Mode (outside the IDE) but
when
> > I run them in Debug Mode from the Visual Studio 6.0 IDE,
> > they terminate both with a 0xC0000005 : Access
Violation. !
> >  I trace them until the crash and they both enter after
the
> > ~CMyProgApp destructor method in a the CRT0DAT.C files
and
> > crash in the doexit function in the statement mentionned
> > below :
> > if (__onexitbegin)
> > {
> >   _PVFV * pfend = __onexitend;

> >   while ( --pfend >= __onexitbegin )
> >   /*
> >    * if current table entry is non-NULL,
> >    * call thru it.
> >    */
> >    if ( *pfend != NULL )
> >      (**pfend)();
> > }
> > the (**pfend)() crash after about five iterations...

> > My codes use MFC in a static Library, the error doesn't
> > produce if I use MFC in shared Library.
> > Moreover the error doesn't exist under Windows 9x,Me but
> > only under Windows NT 4.0 and 2K.

> > I've tried to compile my two programs under MSVC 5.0 and
I
> > haven't got any problem !

> > If anybody have an idea, it would be greateful.
> > Is there particular precaution to make, when you migre
from
> > MFC 4.0 to MFC 6 ?
> > Where could I find documentaion about the subject ?

> > Thanks in advance.
> > Chris.



Sat, 17 Jan 2004 22:21:51 GMT  
 Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!!

Quote:
> I recently migre two of my C,C++ (mixe code) programs from
> MSVC 4.0 to Visual Studio 6.0 (SP 5). The two programs
> compile and link without any problems (Level 3).... <<snip>>

Very first thing to do : Compile at level 4. Check _all_ warning messages.
--
Cheers - Laurent TESTUD - http://LaFaqMFC.com/



Sun, 18 Jan 2004 02:03:56 GMT  
 Very strange error, in debug mode of Visual Studio 6.0 SP5 at exit under NT 4.0 & 2k !!!
I doubt this is caused by a VC 4.0/6.0 compatibility problem per se.
Rather, I suspect that there is a bug in your code which just happened
to not show up under 4.0, but now shows up.

doexit() calls all the functions that were registered with it. Clearly
there is a problem with one of the functions. This could mean that
the function pointer is pointing at code that is now unloaded -
perhaps in a DLL that has been freed. Or, it could mean that the
function exists but the crash is happening inside of it. You need
to find out which.

If the problem is that the pointer is not valid then you need to find
out what it would be pointing to. You can put a breakpoint on the
function that adds items to the onexit() list, or you can look at the
loaded modules while the program is running to find out what
module is in the right address range to contain the missing function.

Quote:

> Hello,

> I recently migre two of my C,C++ (mixe code) programs from
> MSVC 4.0 to Visual Studio 6.0 (SP 5). The two programs
> compile and link without any problems (Level 3). The two
> programs run fine in Release Mode (outside the IDE) but when
> I run them in Debug Mode from the Visual Studio 6.0 IDE,
> they terminate both with a 0xC0000005 : Access Violation. !
>  I trace them until the crash and they both enter after the
> ~CMyProgApp destructor method in a the CRT0DAT.C files and
> crash in the doexit function in the statement mentionned
> below :
> if (__onexitbegin)
> {
>   _PVFV * pfend = __onexitend;

>   while ( --pfend >= __onexitbegin )
>   /*
>    * if current table entry is non-NULL,
>    * call thru it.
>    */
>    if ( *pfend != NULL )
>      (**pfend)();
> }
> the (**pfend)() crash after about five iterations...

> My codes use MFC in a static Library, the error doesn't
> produce if I use MFC in shared Library.
> Moreover the error doesn't exist under Windows 9x,Me but
> only under Windows NT 4.0 and 2K.

> I've tried to compile my two programs under MSVC 5.0 and I
> haven't got any problem !

> If anybody have an idea, it would be greateful.
> Is there particular precaution to make, when you migre from
> MFC 4.0 to MFC 6 ?
> Where could I find documentaion about the subject ?

> Thanks in advance.
> Chris.

--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.


Sun, 18 Jan 2004 03:28:52 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Visual Studio 6 and NT SP5 problem?

2. can't get debug to work in nt 4.0 with visual c++ 4.0

3. e: *HELP* After install Visual studio .Net, the Visual Studio Enterprise 6.0 stops working

4. *HELP* After install Visual studio .Net, the Visual Studio Enterprise 6.0 stops working

5. *HELP* After install Visual studio .Net, the Visual Studio Enterprise 6.0 stops working

6. Problem with Visual Studio 6.0 (Visual C++ 6.0) !!!!

7. Visual Studio SP1 + NT Workstation 4.0 SP3 SDK = BUILD FAILURE

8. Visual Studio SP1 + NT Workstation 4.0 SP3 SDK = BUILD FAILURE

9. Strange debug output, ocurrs under NT 4.0.

10. Installing Visual Studio 6.0 on Windows NT 3.51

11. Visual Studio 6.0 hang while debugging

12. Debugging with Visual Studio 6.0 on Windows XP

 

 
Powered by phpBB® Forum Software