Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 178
Registered: ‎11-19-2008
My Device: Not Specified
Accepted Solution

Media processor busy on 8520

[ Edited ]

In my last project, we're using a javax.microedition.media.Player to play a small wav file (its duration is a few seconds). I'm using setLoopCount(-1) to play it indefinitely. the file is included in the app resources.

 

The player is initialized and prefetched when the app first launches. When a certain event occours, we call start() on it. We call stop() again at user request.

 

For some reason it works fine on almost every BB model, but it fails on a 8520. The sound starts and stops fine a couple of times, but at some point, the start call throws this exception:

 

net.rim.device.internal.media.MediaNativesException: play: Media processor busy

 I've tried modifying the code and putting Thread.sleep calls after start and stop, to prevent a high frequency sequence of calls (start-stop-start-stop-...) breaking the player, but it doesn't work.

 

I'm at a dead end here and this is a very important project. Any help would be appreciated.

Developer
Posts: 178
Registered: ‎11-19-2008
My Device: Not Specified

Re: Media processor busy on 8520

I've seen similar issues in the Developer Issue Tracker. But assuming it is a bug in the OS (which I think it is, otherwise how could I explain it working for hours in 4.5.x, 4.6, 6.0 and 7.0 OSes and crashing in minutes for 5.0 Curves) , then I'll be out of luck since upgrading devices is not an option.

 

Anyone has a hint on what the media processor is, or how could I prevent it going so busy?

Highlighted
Developer
Posts: 178
Registered: ‎11-19-2008
My Device: Not Specified

Re: Media processor busy on 8520

I'm currently catching the exception and closing the player. Then calling again createPlayer, realize and prefetch. This breaks the no-sound deadlock and the wave file is played again.