473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Access Violation Errors - Can Memory Leaks cause these?

I have an MFC app with 2000 users. I have one user that experiences a
crash in our software anywhere from 1 to 5 times a week when opening a
particular module. No other users have reported this particular crash
so I don't think anyone else is experiencing it but I know other users
are doing exactly what she is doing because it is our most popular
module.

I have analyzed the dmp files from several of this user's crashes
using windbg and all of the crashes seem to occur in widely different
places.

Here are 3 of them:
STATUS_ACCESS_VIOLATION_c0000005_MFC42.DLL!CMapPtr ToPtr::GetValueAt
STATUS_ACCESS_VIOLATION_c0000005_MyBaseClass.dll!C Global::GetID
HEAP_CORRUPTION_c0000005

I have noticed lately that the application has some memory leaks, but
it was my understanding that a Microsoft XP system (which is the OS
for this user) would not crash due to memory leaks. Any takers on
that? Can an Access Violation error be caused by a memory leak?

Nicole
Jun 27 '08 #1
6 5544
On May 29, 3:06*pm, "nmehr...@gmail.com" <nmehr...@gmail.comwrote:
I have an MFC app with 2000 users. *I have one user that experiences a
crash in our software anywhere from 1 to 5 times a week when opening a
particular module. *No other users have reported this particular crash
so I don't think anyone else is experiencing it but I know other users
are doing exactly what she is doing because it is our most popular
module.

I have analyzed the dmp files from several of this user's crashes
using windbg and all of the crashes seem to occur in widely different
places.

Here are 3 of them:
STATUS_ACCESS_VIOLATION_c0000005_MFC42.DLL!CMapPtr ToPtr::GetValueAt
STATUS_ACCESS_VIOLATION_c0000005_MyBaseClass.dll!C Global::GetID
HEAP_CORRUPTION_c0000005

I have noticed lately that the application has some memory leaks, but
it was my understanding that a Microsoft XP system (which is the OS
for this user) would not crash due to memory leaks. *Any takers on
that? *Can an Access Violation error be caused by a memory leak?

Much of that is system specific, and OT here, you should ask in a MS
newsgroup.

But that being said, memory leaks (eg. you forget to free a block of
allocated memory when you're done with it) by themselves do not
directly cause access violations or the equivalent, since all you've
done is lost track of some allocated memory. The segfault (or
whatever) can really only happen if you try to access memory that
*isn't* allocated.

OTOH, if you leak enough memory, you'll run out of memory to allocate
(either by running out of real/virtual memory on the system, or by
running out of address space for the process). And if your new/malloc/
whatever fails, and you don't handle that correctly (which is
unfortunately common) you can quickly find your dereferencing a bad
pointer, which does commonly segfault.

OTTH, since the system appears to be reporting heap corruption, you
may want to look for dangling pointers - IOW, pointers that point to
areas of memory that are freed - storing into such areas can easily
corrupt the heap on many systems. Or just stores via bad pointers in
general.

If you think you've got memory management problems, a tool like
Valgrind or Purify might be helpful.
Jun 27 '08 #2
On 29 Mayıs, 23:06, "nmehr...@gmail.com" <nmehr...@gmail.comwrote:
I have an MFC app with 2000 users. *I have one user that experiences a
crash in our software anywhere from 1 to 5 times a week when opening a
particular module. *No other users have reported this particular crash
so I don't think anyone else is experiencing it but I know other users
are doing exactly what she is doing because it is our most popular
module.

I have analyzed the dmp files from several of this user's crashes
using windbg and all of the crashes seem to occur in widely different
places.

Here are 3 of them:
STATUS_ACCESS_VIOLATION_c0000005_MFC42.DLL!CMapPtr ToPtr::GetValueAt
STATUS_ACCESS_VIOLATION_c0000005_MyBaseClass.dll!C Global::GetID
HEAP_CORRUPTION_c0000005

I have noticed lately that the application has some memory leaks, but
it was my understanding that a Microsoft XP system (which is the OS
for this user) would not crash due to memory leaks. *Any takers on
that? *Can an Access Violation error be caused by a memory leak?

Nicole
It seems like a memory allocation problem. You are trying to use a
memory place which is not allocated or already released. I think you
have to check your object creation/release sections.
Jun 27 '08 #3
I suspect this part of the question may belong in a different
newsgroup, but I will ask here so you can provide your opinion from an
MFC standpoint.

This user's operating system was built up from an existing image.
They say they have tried reapplying the image, and have also replaced
her workstation (and applied an image) to the workstation. Is it
possible that a problem in the OS image is causing these flakey
sporadic memory allocation errors in our MFC app?

Any suggestions as to which newsgroup may be more appropriate for a
question like this?
Jun 27 '08 #4
On Fri, 30 May 2008 09:09:12 -0700, nm******@gmail.com wrote:
I suspect this part of the question may belong in a different newsgroup,
but I will ask here so you can provide your opinion from an MFC
standpoint.
This whole thread belongs in a different newsgroup. MFC is *not* on topic
here. Please see:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Which contains suggestions for more appropriate groups.

--
Lionel B
Jun 27 '08 #5
nm******@gmail.com wrote:
I have an MFC app with 2000 users. I have one user that experiences a
crash in our software anywhere from 1 to 5 times a week when opening a
particular module. No other users have reported this particular crash
so I don't think anyone else is experiencing it but I know other users
are doing exactly what she is doing because it is our most popular
module.

I have analyzed the dmp files from several of this user's crashes
using windbg and all of the crashes seem to occur in widely different
places.

Here are 3 of them:
STATUS_ACCESS_VIOLATION_c0000005_MFC42.DLL!CMapPtr ToPtr::GetValueAt
STATUS_ACCESS_VIOLATION_c0000005_MyBaseClass.dll!C Global::GetID
HEAP_CORRUPTION_c0000005

I have noticed lately that the application has some memory leaks, but
it was my understanding that a Microsoft XP system (which is the OS
for this user) would not crash due to memory leaks. Any takers on
that? Can an Access Violation error be caused by a memory leak?
It may be that the application is running out of memory, either physical
memory or paged memory. Check how much memory that computer has compared to
the ones that run your application fine.

--
Jim Langston
ta*******@rocketmail.com
Jun 27 '08 #6
On May 30, 8:48*pm, "Jim Langston" <tazmas...@rocketmail.comwrote:
nmehr...@gmail.com wrote:
I have an MFC app with 2000 users. *I have one user that experiences a
crash in our software anywhere from 1 to 5 times a week when opening a
particular module. *No other users have reported this particular crash
so I don't think anyone else is experiencing it but I know other users
are doing exactly what she is doing because it is our most popular
module.
I have analyzed the dmp files from several of this user's crashes
using windbg and all of the crashes seem to occur in widely different
places.
Here are 3 of them:
STATUS_ACCESS_VIOLATION_c0000005_MFC42.DLL!CMapPtr ToPtr::GetValueAt
STATUS_ACCESS_VIOLATION_c0000005_MyBaseClass.dll!C Global::GetID
HEAP_CORRUPTION_c0000005
I have noticed lately that the application has some memory leaks, but
it was my understanding that a Microsoft XP system (which is the OS
for this user) would not crash due to memory leaks. *Any takers on
that? *Can an Access Violation error be caused by a memory leak?

It may be that the application is running out of memory, either physical
memory or paged memory. *Check how much memory that computer has compared to
the ones that run your application fine.

--
Jim Langston
tazmas...@rocketmail.com- Hide quoted text -

- Show quoted text -
The OS Image was not the problem. The errors were caused by a bug,
specifically trying to ask DAO to move to a record which the program
thought existed, but did not exist. I suspect that the symbol
information was inaccurate so the dump file analysis was inaccurate.

Replicating the issue required a very specific long sequence of user
actions combined with some special options and some minor user
errors. I found the issue by having someone unfamiliar with our
software test for a bit while recording his actions. He replicated
the bug in 6 minutes, but could never replicate it again after that
point because he only made the user errors the first time. Having
lost a couple weeks of my life to this problem, next time around I am
going to try an inexperienced tester much sooner!
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Maurice | last post by:
Hi there, I'm experiencing big memory problems on my webserver. First on an old RedHat 7.2 system, now on an other fresh installed Suse 8.2 system: Linux version 2.4.20-4GB...
2
by: Generic Usenet Account | last post by:
I have been using STL for a long time now, without any problems. Recently we generated a purification report on our software using Rational Purify, and we found some memory leaks. My colleague...
7
by: Ariel | last post by:
I have a question that I'm hoping someone here can answer. Let's say I have two fields which have a beginning number and an ending number. What I'd like to do is have Access generate a list of...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
0
by: Frank Lopez | last post by:
Does anyone know if Microsoft generated a whitepaper on this topic? Does anyone know what the solution is? (meaning, eliminate the leak problem -- I am seeing three memory leaks from...
7
by: Bonj | last post by:
Hi I have a mixed managed/unmanaged project which thanks to you guys I've managed to get rid of the linker errors of, so cheers for that. But now I'm experiencing an unknown access violation....
4
by: Bit byte | last post by:
I have a structure defined like this: struct foo { unsigned int magic ; void *mydata ; };
2
by: =?Utf-8?B?c29jYXRvYQ==?= | last post by:
Hi, I have a DLL in VC6, when a specific function is called it will spawns a few threads and then return. The threads stay running and inside one of these threads an event is created using the...
39
by: Martin | last post by:
I have an intranet-only site running in Windows XPPro, IIS 5.1, PHP 5.2.5. I have not used or changed this site for several months - the last time I worked with it, all was well. When I tried it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.