Native exception occurs when application left open for some time

A

Asheesh

Hi All,

I've been troubled by a strange problem off late. I've created an
application in which I play MP3 files using a 3rd party decoder. I P/Invoke
the audio library functions in my .NET CF application to play the audio
files. The problem occurs when I leave my application open for some time
along with the other opened applications, and then try to access the opened
application, I receive a Native exception

A native exception has occurred in TalkingApp.exe. Select Quit and then
restart this program or select Details for more information.
ExceptionCode: 0xc0000005
ExceptonAddress: 0x0144d924
Reading: 0x4980246c

What could be the source of the problem? I duly release the memory acquired
by the native function within the native function itself, so I don't have to
worry about freeing unmanaged resources from within my CF application.

I'd appreciate if someone could throw some light on this. Please help.

Regards,
Asheesh
 
A

Alex Yakhnin, MVP

Do you have any managed variables(arrays) you're passing to the native API's
without pinning it?
 
A

Asheesh

Thanks a lot Alex for your reply.

No, I'm not passing any arrays to my Audio decoder functions. The only
methods that I've exposed from the COM library are Player_Open
and Player_Play

In case of Player_Open, I don't pass any parameter, while in case of
Player_Play, the parameters are

the name of the file, which is string type, and the size of the file.

The app works fine on most of the device, but when kept left for some time,
and activated again, it gives me a Native exception.

This behavior is mostly depicted on Toshiba PPC 2003.
Could this be related to with a particular brand of device or is it some
other problem?

I really appreciate your help.
Regards,
Asheesh
 

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