Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:43:25+00:00 2026-06-15T19:43:25+00:00

Windows 7 64 bit, Visual Studio 2010, Console C++ application, Win32 Debug configuration: #include

  • 0

Windows 7 64 bit, Visual Studio 2010, Console C++ application, Win32 Debug configuration:

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
    char* p = NULL;
    *p = 1;
    return 0;
}

Start Debugging. Obviously, I get this error messsge:

Unhandled exception at 0x77d915de in test.exe: 0xC0000005: Access violation writing location 0x00000000.

I select Debug and see the following stack:

ntdll.dll!77d915de()    
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
ntdll.dll!77d915de()    
ntdll.dll!77d8014e()    
msvcr100d.dll!_heap_alloc_dbg_impl(unsigned int nSize, int nBlockUse, const char * szFileName, int nLine, int * errno_tmp)  Line 504 + 0xc bytes    C++
>ffffffff() 

Debugger breaks on __finally line in dbgheap.c. Stack is corrupted, the line *p = 1 is missing in the stack. Output window:

'test.exe': Loaded 'C:\tmp\test\Debug\test.exe', Symbols loaded.
'test.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
First-chance exception at 0x010f13a8 in test.exe: 0xC0000005: Access violation writing location 0x00000000.
Unhandled exception at 0x77d915de in test.exe: 0xC0000005: Access violation writing location 0x00000000.

Now, if I run the same program in x64 Debug configuration, everything is OK – debugger breaks on the line *p = 1. How can I get correct debugging for Win32 program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:43:27+00:00Added an answer on June 15, 2026 at 7:43 pm

    Debug->Exceptions->win32 Exception->c0000005 tick the box in “Thrown” column or in the “Thrown” column for entire Win32 Exceptions http://msdn.microsoft.com/en-us/library/038tzxdw(v=vs.100).aspx

    *p = 1; 
    00041375 mov eax,dword ptr [p]
    00041378 mov byte ptr [eax],1
    

    First-chance exception at 0x00041378 in test2.exe: 0xC0000005: Access violation writing location 0x00000000

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently
I am running Visual Studio 2010 in Windows 7 Professional 64-Bit in VMware 4.1.1
Guys I created a console application in Visual Studio 2010. It targets the .NET
I have Windows 7 64-bit with Microsoft Visual Studio 2010 and subsequent installation of
I have a Visual Studio 2010 Windows Forms application in which I start a
This is on a 64 bit Windows Machine, also running Visual Studio 2010. A
Setup: Windows 7 64-bit Office 2010 Professional 64-bit Visual Studio 2010 Professional Using Connection
I'm using 64 bit Windows 7 Pro and Visual Studio 2010 Pro. I'm trying
I have problem with Visual Studio 2010 on Windows 7 64-bit. After some time
I worked fine in Visual Studio 2010 Beta 2 under Windows 7 64-bit, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.