What are some intermittent access troubleshooting methods on a Windows Mobile device?

I have a large Compact Framework V2.0 application that in most cases works very well. On some devices, once a day the user receives a Native Error 0xC0000005, which does not fall into the standard managed block Try / Catch.

My application synchronizes with the server through ASMX calls at fixed intervals. The problem occurs during synchronization. In addition to the ASMX call that occurs during synchronization, there is significant business logic, but 98% of this is managed code. I looked through all my P / Invokes and my own C ++ application libraries, and at the moment I’m approximately 95% sure that this is not the problem.

Since this only happens on some devices and is very rare (less than once a day), it is very difficult to isolate. I have instructed my code and it seems like this is happening at random places in the application, so I suspect something is corrupting the memory.

Any thoughts on how to fix this will be appreciated.

+3
source share
2 answers

My own exception handling for C ++ did not include an async exception and therefore did not deal with access violation exceptions.

It may / may not be useful for my problem, but it may be useful for others.

Using the / EHa switch as described in this link will catch these types of exceptions:

http://msdn.microsoft.com/en-us/library/1deeycx5.aspx

+1

A 0xC0000005 - , - , . , , - ( Builder , , , , , ). , , - P/invoke , .

:

  • P/ API, , API . API-, , .
  • P/ - , , , API
  • (IntPtr ..), P/Invoke, (-1 0), native .
  • P/ , ( , ) /
  • GCHandle, - ( , , )
  • -, /. , , , . , , . . . , , . , . , , , . . , / .

, P/Invokes . , .

+5

All Articles