Memory Access Violation in Release mode only 
Author Message
 Memory Access Violation in Release mode only

Hi All,

I am building some libraries with VC 6.0. I am getting a Memory Access
Violation error in release mode. The code works fine in Debug mode.
I am allocating some memory and while freeing that memory the error
occurs.But the behavior is strange,if I put the printf statement at the
point where I am getting a crash and put two %d specifiers then the code
works fine. if you remove even one %d from the printf  statement then the
code fails.

Let me share one thing. There are so many type casting in the code. I doubt
the problem may be there. But I do not understand why the code works fine
with debug mode?

If anyone know the answer. Please reply.

Thanks in advance.

Regards,

Atul



Sun, 16 Feb 2003 03:00:00 GMT  
 Memory Access Violation in Release mode only
Lots of programs work fine in debug mode and fail in release mode.
Sometimes this is due to an optimizer bug, but far more frequently
it is a bug in your code that somehow hides in debug mode. It
could be memory overwriting, __cdecl versus __stdcall mismatch,
uninitialized variable, etc.

Use lots of asserts, BoundsChecker, and enable debug information
in release mode. Good luck.

Quote:

> Hi All,

> I am building some libraries with VC 6.0. I am getting a Memory Access
> Violation error in release mode. The code works fine in Debug mode.
> I am allocating some memory and while freeing that memory the error
> occurs.But the behavior is strange,if I put the printf statement at the
> point where I am getting a crash and put two %d specifiers then the code
> works fine. if you remove even one %d from the printf  statement then the
> code fails.

> Let me share one thing. There are so many type casting in the code. I doubt
> the problem may be there. But I do not understand why the code works fine
> with debug mode?

> If anyone know the answer. Please reply.

> Thanks in advance.

> Regards,

> Atul

--
.Bruce Dawson, Humongous Entertainment.
http://www.humongous.com/


Sun, 16 Feb 2003 03:00:00 GMT  
 Memory Access Violation in Release mode only
Check www.jprobbins.com for his great utility CrashFinder and create .PDB
files of your app in release,
When your app causes an exception , you can get the offending address either
from DRwatson's log or if VC is your de{*filter*},
the address will pop-up.
Use CRash Finder to get to the line of code ....

Ajit


Quote:
> Hi All,

> I am building some libraries with VC 6.0. I am getting a Memory Access
> Violation error in release mode. The code works fine in Debug mode.
> I am allocating some memory and while freeing that memory the error
> occurs.But the behavior is strange,if I put the printf statement at the
> point where I am getting a crash and put two %d specifiers then the code
> works fine. if you remove even one %d from the printf  statement then the
> code fails.

> Let me share one thing. There are so many type casting in the code. I
doubt
> the problem may be there. But I do not understand why the code works fine
> with debug mode?

> If anyone know the answer. Please reply.

> Thanks in advance.

> Regards,

> Atul



Thu, 06 Mar 2003 03:00:00 GMT  
 Memory Access Violation in Release mode only

On Sun, 17 Sep 2000 11:19:51 -0700, "Ajit M Kallingal"

Quote:

>Check www.jprobbins.com for his great utility CrashFinder and create .PDB
>files of your app in release,
>When your app causes an exception , you can get the offending address either
>from DRwatson's log or if VC is your de{*filter*},
>the address will pop-up.

I'll try that too.  His problem sounds very much like my own, although
memory allocation has nothing to do with it in my case...


Thu, 06 Mar 2003 03:00:00 GMT  
 Memory Access Violation in Release mode only

Quote:
> Check www.jprobbins.com for his great utility CrashFinder and create .PDB

Hey this page is restricted!

My proxy server says:

Restricted Page

The requested site is not permitted, because WinProxy has determined that it
matches the following categories, which have been restricted by your network
administrator:

Personal

WinProxy version 3.0R1f



Thu, 06 Mar 2003 03:00:00 GMT  
 Memory Access Violation in Release mode only
http://www.*-*-*.com/



Quote:
> Check www.jprobbins.com for his great utility CrashFinder and create .PDB
> files of your app in release,
> When your app causes an exception , you can get the offending address
either
> from DRwatson's log or if VC is your de{*filter*},
> the address will pop-up.
> Use CRash Finder to get to the line of code ....

> Ajit



> > Hi All,

> > I am building some libraries with VC 6.0. I am getting a Memory Access
> > Violation error in release mode. The code works fine in Debug mode.
> > I am allocating some memory and while freeing that memory the error
> > occurs.But the behavior is strange,if I put the printf statement at the
> > point where I am getting a crash and put two %d specifiers then the code
> > works fine. if you remove even one %d from the printf  statement then
the
> > code fails.

> > Let me share one thing. There are so many type casting in the code. I
> doubt
> > the problem may be there. But I do not understand why the code works
fine
> > with debug mode?

> > If anyone know the answer. Please reply.

> > Thanks in advance.

> > Regards,

> > Atul



Thu, 06 Mar 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Memory Access Violation in Release Mode-Solution Found

2. Memory Access Violation in Release Mode-Solution Found

3. Memory Access Violation in Release Mode

4. Memory Access Violation in Release Mode-Solution Found

5. Memory Access Violation in Release Mode

6. Access Violation Exception in Release mode

7. access violation in release mode

8. Access Violation in Release Mode

9. Access Violation (NTDLL.DLL): 0xC0000005 only in Debug Mode on NT and Win2k

10. Access violation in user32.dll in debug mode

11. strange access violation in debug mode

12. Access violation in _QIThunk::Release

 

 
Powered by phpBB® Forum Software