none
Exception Code 0x80000002- please help!

    Question

  • Hi. I have an application for PocketPC that sometimes gets this exception:

    Exception Code: 0x80000002
    Exception Address: 0x01f7aac

    and I don't know what to do with it. I'm don't know much about exception handling and I don't understand what this error means. I get it inconsistently. sometimes it never surfaces; sometimes it suddenly does. I've been trying to find patterns to no avail. My application is basically a speech recorder and player. I would appreciate any clues as to what this message means, what causes it, what I should do with it or how I can avoid it if possible. Thanks for any tips!
    Monday, February 13, 2006 7:59 AM

Answers

All replies

  • Hello what you are getting is a native exception. You cannot handle this exception from managed code.

    The exception code 0x80000002 translates to "Ran out of memory". I suggest you review your code carefully for memory leaks (i.e. if you are using native code) etc.

    Thanks.

    Thursday, February 16, 2006 2:07 AM
  • thanks for the reply. I have a C++ dll with the VB app so I guess that's native code right? i'm totally new to programming and dont really understand the difference between native and managed. sorry. could you explain what "memory leaks" are? would I get the exception code inconsistently if there are memory leaks in code? thanks a lot!
    Thursday, February 16, 2006 3:31 AM
  •  With memory leaks you will get the exception code only when you run out of memory. As such it might not always be consistent when you run the application. Memory leaks are cause by the failure to properly deallocate memory that was previously allocated in your program.

    See this article in MSDN that might prove helpful to you:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxcondetectingisolatingmemoryleaks.asp

    Friday, February 17, 2006 1:39 AM
  • thank you for the explanation, I will check for memory leaks then. thanks!
    Friday, February 17, 2006 9:56 AM
  • A bit late. But I think the OP was enquiring about Pocket PC. I have a similar situation as well . 

    I am getting a 0x8000002 error and the application is portable to Win32 as well. I have validated for memory leaks on my desktop and there are no leaks. However I get this error from my ARMv4i device with Win CE 5.0. So will this  CRTDBG mechanism work on Win CE as well ?

    Sriram

    Tuesday, June 23, 2009 10:05 AM
  • Hi Sriram,

    I am also facing exact same issue on ARMv4i device with Win CE 5.0. Did u manage to solve the problem. There are no leaks as my application can also be ported to win32 and there are no leaks. Anybody with any ideas.

    Thanks

    gsm

    • Proposed as answer by Gideon Ravid Wednesday, July 11, 2012 4:58 AM
    • Unproposed as answer by Gideon Ravid Wednesday, July 11, 2012 5:05 AM
    Thursday, March 24, 2011 11:47 AM
  • Hello everybody

    I had the same problem with managed to native code, and I found that the problem is not related to memory leak but to memory allignment error.

    On a mulitbyte machine  (the arm is 64bit, that's an 8 byte machine) the processor does not handle very well loading data that is no synchronized with the processor data bus. You should try to recompile your native code with the directive

    #pragma pack(8)

    for C and C++, or set the compiler defaults accordingly.

    Note that if you pass structures in your code this may effect the structures so make sure everything is using the same allignment.

    Gideon Ravid

    Wednesday, July 11, 2012 5:05 AM