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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Developer
Posts: 9
Registered: ‎02-24-2009
My Device: Not Specified
Accepted Solution

Application crashes with Exception when using javax.microedition.media.Player

Hi,

 

   I have an application that processes data from bluetooth and send it to the web service. Recently there was a request to add sounds to the application. Now when the application processes batches of data and the player is playing constantly after a few secs I get "Application is not responding" exception. And then the process is terminated. In the logs I can see lots of ForcedStackTrace exception logged after this exception.

   The sounds are played in the separate thread. If app doesn't play sounds or plays short sounds - everything works fine. Is there any way to avoid this exception happening? Why is it happening?

 

Thanks in advance,

Viktor. 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Application crashes with Exception when using javax.microedition.media.Player

I suggest you attach the debugger to your BlackBerry and see what causes the event queue of your app to fill up. Alternatively, download the Event Log using JavaLoader -u eventlog, then analyze the information contained in the ForcedStackTraceExceptions and locks held (see http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=59424 for some ideas).
New Developer
Posts: 9
Registered: ‎02-24-2009
My Device: Not Specified

Re: Application crashes with Exception when using javax.microedition.media.Player

Unfortunately I do not use JDE to develop the application - I use eclipse. Also I examined the stack trace elements and here are some of the names of module:
net_rim_cldc-14 ,4, 11, 10,

net_rim_cldc_io_rim_imp

and other net_rim libraries related to media,internet connection.

I doubt that the application produces the deadlock as everything works fine until I use the Player.

If the player thread works and plays long melodies one after another I get an exception. The are no memory leaks as if the data is processed in one-by-one fashion sounds get played and everything works fine. App crashes only when the load of data is considerably big.

New Developer
Posts: 9
Registered: ‎02-24-2009
My Device: Not Specified

Re: Application crashes with Exception when using javax.microedition.media.Player

Resolved by implementing my own PlayerManager, which, running in a separate thread would play the item in the queue manner rather then having many threads using the inner Player implementation.