Native exception occurs when application left open for some time

Native exception occurs when application left open for some time

Post by Ashees » Sat, 07 Feb 2004 16:02:59


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
 
 
 

Native exception occurs when application left open for some time

Post by Alex Yakhn » Sat, 07 Feb 2004 20:41:06

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

--
Alex Yakhnin, NET CF MVP
IntelliProg, Inc.
http://www.yqcomputer.com/



P/Invoke
opened
acquired
to

 
 
 

Native exception occurs when application left open for some time

Post by Ashees » Sat, 07 Feb 2004 22:41:39

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


API's


have