Posted on 2005-04-28
Medium Priority
Last Modified: 2008-03-10
I have a dialog based server-client that I created using MFC VC++6.0.I am using it to process and transfer files.,and
My application works once send the files over,but trying to do the same thing again crashes the sending application.
From the debug option,I get "Acess Violation error"
and from filecore.cpp
I have a break at
            if (pException != NULL)
                  pException->m_lOsError = ::GetLastError();
                  pException->m_cause =
I dont really understand how to use the debugger,so if any one could helpI'd be grateful
Question by:samroyc
  • 2
LVL 48

Accepted Solution

AlexFM earned 2000 total points
ID: 13892159
When porogram breaks on this line, select View - Debug Windows - Call Stack. In the Stack window you can see calling sequence, starting from your own code, to MFC code which crashed. Double-click on the Stack window line opens required program place in the text editor.
Find your own code which causes this error and try to understand why this happens. Possibly your code tries to work with file which is not opened yet or already closed.

Author Comment

ID: 13951762
Thank you for answering.I followed your advice calling stack gives -
>      MFC71.dll!CFile::Open(const char * lpszFileName=0x00001562, unsigned int nOpenFlags=0, CFileException * pException=0x7c1693cd)  Line 223      C++
       msvcr71.dll!malloc(unsigned int size=5474)  Line 54 + 0xf      C
I am unable to understand this ,and  have checked many times over that I close every file that I open
If you could help me decipher this a bit I'd be grateful
LVL 48

Expert Comment

ID: 13952887
CFile::Open is not your code. Find in the stack your code which calls this function.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question