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 7194209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:19:30+00:00 2026-05-28T20:19:30+00:00

A piece of C++ code I am looking into in VS 2008 has a

  • 0

A piece of C++ code I am looking into in VS 2008 has a bad pointer. The pointer is initialized properly and has very few lines of code referencing it. I put a watch on this pointer while debugging.

When a certain method is called, the value of the pointer suddenly changes from 0x05fe0040 “” to 0x00000000 Bad Ptr (in the Watch window of VS2008). I can’t seen to figure out why this is happening. There are no operations on the pointer between the lines of code where it loses its value.

How do I investigate this further? What are some possible reasons why this pointer has turned bad?

I am new to C++ programming and am using VS2008 for the first time, so please explain anything you think is pertinent.

  • 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-05-28T20:19:32+00:00Added an answer on May 28, 2026 at 8:19 pm

    If the value is not changed by any code manipulating the variable, it must be accessed by a stray/dangled pointer or by a buffer/array overflow.

    Use a memory breakpoint on the pointer variable, this way the debugger will show you quickly what code is corrupting it.

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

Sidebar

Related Questions

I have a piece of code looking like this : TAxis *axis = 0;
I'm looking for a piece of code that can tell me the offset of
I'm looking to patch a piece of abandonware with some code. The software is
I am trying to split an RTF file into lines (in my code) and
I am looking through some old code and found a piece that i cant'
I'm developing front-end code for a web application, and ran into an odd piece
I'm writing a little piece of code where I'll have to insert values into
I've been looking through a piece of code of a pc game that I'm
I am looking at the following piece of code: void printd(int n) { if
A piece of code I'm working on has to analyze a foreign file format

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.