Native Exception 0xc0000005

S

sarwasva

Hi All,

I am facing a wired problem in my .net CF application which is written
in
C#. The application some times shows Native Exception :

A native exception has occurred in MyPDAApp.exe. Select Quit and then
restart this program or select Details for more information." Selected
details and got, "Exception code = 0xc0000005. Exception address =
0x00c79d34. Reading = 0x000004."

More info about the application:

1. The application interects with the SQL Server Mobile database as
well as
with some of the Libraries provided by a middleware.

2. This exception doesn't occure frequently and there is no fixed
location
in the code where we can trace it.

3. The application exe size is around 1.5 MB

4. SQL Server mobile database .sdf size is around 6MB

5. application is dealing with lots of string operation

I read a lot of arlticles on this particular exception but most of them
are
either pointing towards the SP 3 for .NetCF 1.1 but I am using version
2.0
and Windows Mobile 5 device.
Some other articles are pointing towards string operation related
problems
while P/Invoke.

Any help would be highly appreciated.

Sarwa
 
G

Guest

It's an access violation. Something is using an invalid pointer. I'd look
at any P/Invokes first.

-Chris
 
S

sarwasva

But the the exception is coming even before the application use any
P/Invoke. Is it possible that some string operation is causing this
native exception ?
 
G

Guest

Unlikely. Are you Disposing objects that have managed resources (that you
wrote)?

-Chris
 
S

sarwasva

Chris,

I am setting objects to null, as soon as I am done with it. Is that not
enough ?

-Sarwa
 
S

sarwasva

Data file and EXE, both are on the Main Memory.
Application is having a background thread which does some database
operations silently.
In one of the article I read that Some times DataReader creates native
exception and we are using DataReader in our application.
 
S

sarwasva

Anyone having any clue about this exception. It is coming quiet
frequently now and am still not able to trace it. Agaain and again it
is pointing towards the SQL CE operations but debugging doesn't help
because the location is not fixed.
 
G

Guest

Im having a similar problem with the same exception code - mine is also
producing the same exception address (0x02c91768) but a different reading
address for each one (about a dozen so far).

We are using SQL CE too - but i dont believe this is causing it because of
when the exceptions are happening - for example i have just had one with the
device docked in the cradle and being debugged through VS2003 in a part of
the application where there is no DB interaction.

Im starting to think it may be something to do with the battery level
indicator we are using as this is present on every form that we have had
problems with - if anyone could offer suggestions we would be greatly
appreciative - and if i find out a solution ill post it up here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top