CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 19

Threaded View

  1. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Invalid access to memory location using GlobalFree

    Quote Originally Posted by 2kaud View Post
    The problem I've got is that I can't duplicate the error outside of the program (which is a few thousand lines) and even within the program it is very intermittent
    That has all the tell-tale signs of a synchronization issue.

    This is not easy to identify, so you need to do a complete code review and understand where, when, how and who accesses global variables, whether functions themselves are thread-safe, etc. Maybe it's just wise to identify why you need these global variables, and possibly change it to local variables or objects in some way so as to avoid needing critical sections.
    What could be the possible cause of error 998 Invalid access to memory location?
    The "cause" is just that -- an invalid access to a memory location. Why read any more into it than what the error is stating?
    On a slightly higher level, normal debug techniques are not really going to help here. Does anyone know of 3rd party program analysis software that might be of help? If the problem is a multi-threading sync issue, again are there 3rd party analysis software that might pick up these rare intermittent problems?
    I believe Intel has one.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; January 11th, 2013 at 11:21 PM.

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