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
Contributor
halll7
Posts: 12
Registered: ‎11-24-2010
My Device: Bold 9900, Torch 9860
My Carrier: Vodafone

NullPointerException when closing RecordPlayer

We have a VoIP app, in which we use a recording Player to read audio from the device during a VoIP call. When the call ends and we attempt to close the Player, we find that the Player throws a NullPointerException (stack trace below). This leads to a thread leak, and ultimately a TooManyThreadsError, because an orphaned "RecordPlayer$RecordThread" is left for each VoIP call that is completed.

 

You'll see that the NPE stack trace is entirely within OS code, and so I can't see what it is in our app that might be causing this. Any ideas on diagnosing the cause would be appreciated.

 

The problem is occurring on a Torch 9860, running "7.1 Bundle 1149 (v7.1.0.342, Platform 5.1.0.276)".

 

The NPE Stack Trace is:

S Java Exception - NullPointerException - 9/28 20:41:01

| No detail message

| net_rim_media(4F5BEA80)

| RecordPlayer

| writeSavedData

| 0xA5F0

| net_rim_media(4F5BEA80)

| RecordPlayer

| recordingDone

| 0xA2B6

| net_rim_media-2(4F5BEA80)

| MediaResourceManagerImpl$StreamingSessionImpl$ReadThread

| recordingDone

| 0x1373

| net_rim_media-2(4F5BEA80)

| MediaResourceManagerImpl$StreamingSessionImpl

| streamSinkDone

| 0x68B

| net_rim_cldc-29(4F5BEA10)

| StreamingNatives$StreamingNativesEventDispatcher

| dispatch

| 0xBDCD

| net_rim_cldc-29(4F5BEA10)

| EventDispatcher

| dispatch

| 0x4248

| net_rim_cldc-29(4F5BEA10)

| EventDispatchManager

| dispatch

| 0x416F

| net_rim_cldc-10(4F5BEA10)

| Application

| doProcessNextMessage

| 0x34C8

| net_rim_cldc-10(4F5BEA10)

| Application

| processNextMessage

| 0x2276

| net_rim_cldc-10(4F5BEA10)

| Application

| enterEventDispatcher

| 0x2182

| net_rim_services_impl(4F5BEAFF)

| ServiceStartup

| tier0

| 0x5D24

| net_rim_services_impl(4F5BEAFF)

| ServiceStartup

| main

| 0x5C46

Please use plain text.
Developer
simon_hain
Posts: 16,096
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: NullPointerException when closing RecordPlayer

interesting issue, i wonder what writeSavedData does.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
halll7
Posts: 12
Registered: ‎11-24-2010
My Device: Bold 9900, Torch 9860
My Carrier: Vodafone

Re: NullPointerException when closing RecordPlayer

For anyone interested, I have raised this issue as a bug: https://www.blackberry.com/jira/browse/JAVAAPI-2332 .

Please use plain text.
Contributor
halll7
Posts: 12
Registered: ‎11-24-2010
My Device: Bold 9900, Torch 9860
My Carrier: Vodafone

Re: NullPointerException when closing RecordPlayer

I have tested a few more devices and this issue occurs in 7.1, but not 7.0.

Please use plain text.