access violation exception dump debug
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: access violation exception dump debug

  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    access violation exception dump debug

    Hello everyone,

    I am debugging an access violation exception dump (code xxxxxxxx access violation for memory address, exception code 0x00000005). It is 32-bit x86 code release version. I have used the command dd to examine the memory address (not code address) which reports access violaton. The content of the address is displayed as ???????? in debugger.

    I double checked for the memory, it does not belong to any stack (using thread window to iterate all thread stack address space) memory address space, does not belong to any binary code (using load model window to verify).

    My question is, for memory address which reports access violation and which content is ????????,

    1. is it the memory address not allocated (or reserved) in current process virtual memory space?
    2. or the memory address deleted? I have made some test that for the memory deleted on heap, its content will be marked with 0xfe, not ?. But I am not sure whether when the heap memory is recycled by OS memory mamagement system, it will be remarked as ????????
    3. Or something else possible?


    thanks in advance,
    George

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: access violation exception dump debug

    Any bogus pointer will show ???? in the "object" it points to (which doesn't actually exist).

  3. #3
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Re: access violation exception dump debug

    Hi Lindley,

    Do you have some definitions for what do you mean bogus, it is a general word.

    For example, bogus you mean accessing some heap address space which is deleted or something else?

    Quote Originally Posted by Lindley View Post
    Any bogus pointer will show ???? in the "object" it points to (which doesn't actually exist).
    regards,
    George

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: access violation exception dump debug

    It's specific enough. Bogus. As in "not meaningful". As in "not pointing at an existing object".

    So looking at that memory isn't going to help you. You'd do better to look at when that pointer was last modified.

  5. #5
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Re: access violation exception dump debug

    Thanks Lindley,

    Here is what I got from Windbg, do know what means "PAGE_NOACCESS"? I did MSDN search but no results.

    Code:
    0:001> !address 0x00d4cff0
        00d0d000 : 00d0d000 - 00040000
                        Type     00000000 
                        Protect  00000001 PAGE_NOACCESS
                        State    00010000 MEM_FREE
                        Usage    RegionUsageFree
    Quote Originally Posted by Lindley View Post
    It's specific enough. Bogus. As in "not meaningful". As in "not pointing at an existing object".

    So looking at that memory isn't going to help you. You'd do better to look at when that pointer was last modified.

    regards,
    George

  6. #6
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: access violation exception dump debug

    It means you aren't allowed to touch memory at that address.

    You're probably overcomplicating this. The problem most likely isn't anything deep in the memory system.....you just corrupted the pointer somehow, probably by overrunning the bounds of an array or something similar.

  7. #7
    Join Date
    Apr 1999
    Posts
    27,433

    Re: access violation exception dump debug

    Quote Originally Posted by George2 View Post
    Thanks Lindley,

    Here is what I got from Windbg, do know what means "PAGE_NOACCESS"? I did MSDN search but no results.
    You are using an invalid pointer, meaning that your program has a bug in handling pointers. You don't need to search MSDN for that. What you need to do is debug your program.

    Also, this error has happened to almost every programmer that has written anything non-trivial that handles pointers. It isn't something that can be solved by searching MSDN. It is a bug in your code, plain and simple.

    Regards,

    Paul McKenzie

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center