CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    252

    Debugging Access Write from a Error Message.

    Hello

    I have a crash that is driving me insane on a application the customer machine i coulnt reproduce it yet on my machine... all i have is the error message


    The Instruction 0x0070478b referencing to the memory 0x00000000 could not be written.


    and that's all i have how do i track that instruction on my program from that address?

    is it possible?

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Debugging Access Write from a Error Message.

    Quote Originally Posted by Alphadan View Post
    Hello

    I have a crash that is driving me insane on a application the customer machine i coulnt reproduce it yet on my machine...
    You don't produce log files or dump files from the customer?

    When you build an application that can run on any machine, you have to make provisions to be able to debug any problem, regardless of whether you can reproduce it on your machine or not. This is where you build logging into your application, or have the ability to produce crash dumps. It happens many times that a problem can only be produced on a customer machine, so this is not a rare issue.
    Code:
    The Instruction 0x0070478b referencing to the memory 0x00000000 could not be written.
    Meaning you are accessing a NULL pointer. This indicates that you are either not checking all of your pointers for non-NULL, or you're calling functions without checking return values (and then the code assumes the function worked when it didn't), or some other issue where your code assumes the pointer is valid when it isn't valid.

    If you had logging in your program, you would at the very least get in the area of the code where the crash occurs, so that you can inspect it for possible issues mentioned above.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Feb 2009
    Posts
    252

    Re: Debugging Access Write from a Error Message.

    Thx for your time i was aware it was a attempt to write at NULL... but somehow your comment open my eyes a lil bit more like the tips to where to check it has to be that...

    how do i enable the dump on the client machine and what clues would the dump clarify...

    I think ill put a eye on the code searching for Unchecked return values passed to other functions.

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Debugging Access Write from a Error Message.

    Quote Originally Posted by Alphadan View Post
    Thx for your time i was aware it was a attempt to write at NULL... but somehow your comment open my eyes a lil bit more like the tips to where to check it has to be that...

    how do i enable the dump on the client machine and what clues would the dump clarify...

    I think ill put a eye on the code searching for Unchecked return values passed to other functions.
    There are many threads and articles on creating a crash dump file using the DBGHELP.DLL functions and other facilities such as Dr. Watson and map files. You also have Visual Studio (which can debug crash dumps) as well as the Windows industrial strength debugger, WinDbg. It is a little too much information to fit into one post.

    One thing you must do is that for each build you give your customers, you save the .MAP and .PDB files, and that the source code for that build stays exactly the same. Without these files and without the same source code, you can't use many, if not all of the debugging options that are available when a crash occurs.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; August 12th, 2013 at 10:51 PM.

  5. #5
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Debugging Access Write from a Error Message.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured