04-21-2009 05:06 PM
Hi,
My application throws uncaught exception saying that application is not responding and hence it crashes. I have total 3 threads running. One is periodically (twice in a sec) painting the screen. 2nd one is getting datagrams from server and 3rd one feeds the datagram to player by implementing read method of source stream. Everything is running smooth for some duration (for 3-4 mins) then suddenly I am getting GC icon displaying very frequently and after some secs it crashes. I dont know whats going wrong. Can any body advise me plz.
Thanks in advance.
Regards,
Roney
Solved! Go to Solution.
04-21-2009 05:14 PM
Review this Video, noting especially the profiling tool. I think, with a long running but intensive application such as you are attempting, you will have to be extremely careful about managing your objects.
Garbage Collection
http://www.blackberry.com/DevMediaLibrary/view.do?
The 'not responding' may be related, but alternatively, this may be another problem, related to your hogging the event Thread, presumably in your screen painting Thread.
You might find this Video useful if the Event Thread is not clear to you
http://www.blackberry.com/DevMediaLibrary/view.do?
04-21-2009 05:25 PM - last edited on 04-21-2009 05:26 PM
04-22-2009 01:50 PM
ok. Here is the crash log
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 31 1
MyApplication
DvcNetwork$1
run
0x22AC
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 126 2 0x3D7CA000
net_rim_cldc-1
TimerThread
<private>
0xB75C
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 37 1
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 34 1
MyApplication
AudioStreamSourceStream
read
0x682
net_rim_cldc-16
DataSourceInputStream
read
0x27B7
net_rim_cldc-19
RingBuffer
write
0x7205
net_rim_media
StreamingMediaPlayer
read
0x8AC6
net_rim_media
StreamingMediaPlayer
moreData
0x8BFB
net_rim_media
MediaStreamingManagerImpl$StreamingSessionImpl$Re
run
0x53DE
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 44 2 0x3EBDE000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 33 2 0x3EBF4000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 82 2 0x405E2000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-14
UdpConnection
send
0xACBF
net_rim_cldc-14
Protocol
send
0x70C9
MyApplication-1
AudioSocket
sendControlCommand
0x4E1
MyApplication-1
AudioSocket$1
run
0x69C
net_rim_cldc-1
TimerThread
<private>
0xB800
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 38 2 0x40830000
net_rim_cldc-14
Protocol
receive
0x6F79
MyApplication-1
AudioSocket
readDatagram
0x386
MyApplication-1
AudioSocket
run
0x5C1
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 51 2 0x40EB2000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-13
TcpInputStream
read
0xA81B
net_rim_cldc-1
DataInputStream
read
0x1D20
net_rim_crypto_2-2
SSLRecordProtocol
read
0x4085
net_rim_crypto_1-3
TLSInputStream
read
0x43F6
net_rim_cldc-1
DataInputStream
read
0x1D08
net_rim_cldc-1
DataInputStream
readUnsignedShort
0x1E32
net_rim_cldc-1
DataInputStream
readShort
0x1E23
MyApplication-1
Serializer
deserializeShort
0x6B19
MyApplication-1
TransportHeader
deserialize
0x7691
MyApplication-1
ResponseParser
readPacketFromDataInputStream
0x6557
MyApplication-1
Reader
run
0x5DC5
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 54 1
net_rim_cldc-1
StringBuffer
doAppend
0xA464
net_rim_cldc-1
StringBuffer
append
0xA039
net_rim_cldc-1
StringBuffer
append
0xA01D
MyApplication-1
Log
debug
0x5020
MyApplication-1
Reader
run
0x5DE5
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 40 2 0x42DEE000
net_rim_cldc-1
TimerThread
<private>
0xB7EC
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 55 2 0x34C0E000
net_rim_cldc
Object
wait
0x8951
MyApplication-1
DisplayManager
run
0x252B
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 73 2 0x3553E000
net_rim_cldc
Object
wait
0x8951
MyApplication-1
PacketQueue
get
0x5663
MyApplication
DvcNetwork
run
0x1FF6
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(135) 35 4 0x6D38000
net_rim_cldc-6
ApplicationManagerImpl
getForegroundProcessId
0x2EAC
net_rim_cldc-6
Application
isForeground
0x526
net_rim_cldc-9
UiEngineImpl
updateDisplay
0xACF4
net_rim_cldc-9
UiEngineImpl
processMessage
0xA260
net_rim_cldc-6
Application
processNextMessage
0x13E9
net_rim_cldc-6
Application
enterEventDispatcher
0xAA8
MyApplication
MyApplicationClass
main
0x2EF9
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_services_impl(9) 90 2 0x320EA000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-5
TransportReceiveThread
run
0xB7CF
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_services_impl(9) 42 2 0x322D0000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-13
DNSResolverIPv4$DNSResolverIPv4Thread
run
0x3693
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_services_impl(10) 47 2 0x2E7F8000
net_rim_cldc
Object
wait
0x8951
net_rim_os-9
EventHandler
run
0x1C99
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_bb_fileindexservice(125) 48 2 0x25BA8000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_services_impl(9) 41 2 0x252C6000
net_rim_cldc-5
DatagramConnectionBase
receive
0x2066
net_rim_bb_apps_framework-8
DefaultReceiveThread
run
0x2E94
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_bb_fileindexservice(125) 43 2 0x21118000
net_rim_cldc
Object
wait
0x8951
net_rim_bb_fileindexservice
FileScanner
<private>
0x148C
net_rim_bb_fileindexservice
FileScanner
run
0x10FA
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_bb_otasl_app(127) 46 2 0x21364000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-20
MessageQueue
dequeue
0x5291
net_rim_cldc-6
ApplicationProcess
getMessage
0x521A
net_rim_cldc-6
Application
processNextMessage
0xBA1
net_rim_cldc-6
Application
enterEventDispatcher
0xAA8
net_rim_bb_otasl_app
OTASLApp
main
0x109
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_bb_fileindexservice(125) 45 2 0x208C4000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-20
MessageQueue
dequeue
0x5291
net_rim_cldc-6
ApplicationProcess
getMessage
0x521A
net_rim_cldc-6
Application
processNextMessage
0xBA1
net_rim_cldc-6
Application
enterEventDispatcher
0xAA8
net_rim_bb_fileindexservice
IndexServiceApp
<init>
0x20F0
net_rim_bb_fileindexservice
IndexServiceApp
main
0x2107
guid:0x9C3CD62E3320B498 time: Wed Apr 22 10:27:06 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
net_rim_services_impl(9) 53 2 0x1DDAE000
net_rim_cldc-5
DatagramConnectionBase
receive
0x2066
net_rim_bb_apps_framework-8
DefaultReceiveThread
run
0x2E94
04-22-2009 07:00 PM - last edited on 04-22-2009 07:03 PM
04-22-2009 07:10 PM
Yes you are right. This is not the whole stack trace since its too big to post. But by the way I got solution. I dont know whether its permenant solution or temperarory. I just put Thread.yield() in while loop of receiving datagrams and it solved!!!
Regards,
Ronak
04-23-2009 01:19 AM
@roney99625
If your problem had been resolved, please make this post as Solved.
04-23-2009 05:00 PM
I guess it reduced the frequency of crashing but still its crashing. I have latest crash log but its too big to paste here. Can you suggest me good way to make it available?
04-23-2009 05:12 PM
04-23-2009 06:16 PM
ok. here you go: Part1:
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 35 2 0x6EB40000
net_rim_cldc-1
TimerThread
<private>
0xB75C
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 32 1
net_rim_os-2
PosixFileOutputStream
write
0x7386
net_rim_cldc-1
DataOutputStream
write
0x2156
net_rim_cldc-1
OutputStream
write
0x609D
net_rim_cldc-13
StringUtilities
writeUTF
0x8F99
net_rim_cldc-1
DataOutputStream
writeUTF
0x22FD
MyApplication-1
LogFilePersister
persistLog
0x4FB4
MyApplication-1
Log
<private>
0x4EC0
MyApplication-1
Log
debug
0x4E38
MyApplication
AudioPlayer
playerUpdate
0x36A
net_rim_cldc-16
BasicPlayerImpl$1
run
0x10A7
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
<private>
0x1356
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x126F
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 81 4 0x768B8000
net_rim_os-2
PosixFileOutputStream
write
0x7386
net_rim_cldc-1
DataOutputStream
write
0x2156
net_rim_cldc-1
OutputStream
write
0x609D
net_rim_cldc-13
StringUtilities
writeUTF
0x8F99
net_rim_cldc-1
DataOutputStream
writeUTF
0x22FD
MyApplication-1
LogFilePersister
persistLog
0x4FB4
MyApplication-1
Log
<private>
0x4EC0
MyApplication-1
Log
debug
0x4E38
MyApplication
AudioStreamSourceStream
read
0x6B6
net_rim_cldc-16
DataSourceInputStream
read
0x27B7
net_rim_cldc-19
RingBuffer
write
0x7205
net_rim_media
StreamingMediaPlayer
read
0x8AC6
net_rim_media
StreamingMediaPlayer
moreData
0x8BFB
net_rim_media
MediaStreamingManagerImpl$StreamingSessionImpl$Re
run
0x53DE
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 29 2 0x6FB3E000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 61 2 0x6FB28000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-16
BasicPlayerImpl$NotifyListenerThread
run
0x125F
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:13 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 26 2 0x74606000
net_rim_cldc-1
TimerThread
<private>
0xB7EC
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 33 2 0x747D0000
net_rim_cldc-14
Protocol
receive
0x6F79
MyApplication-1
AudioSocket
readDatagram
0x386
MyApplication-1
AudioSocket
run
0x534
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 31 2 0x74F10000
net_rim_cldc
Object
wait
0x8951
net_rim_cldc-13
TcpInputStream
read
0xA81B
net_rim_cldc-1
DataInputStream
read
0x1D20
net_rim_crypto_2-2
SSLRecordProtocol
read
0x4085
net_rim_crypto_1-3
TLSInputStream
read
0x43F6
net_rim_cldc-1
DataInputStream
read
0x1D08
net_rim_cldc-1
DataInputStream
readUnsignedShort
0x1E32
net_rim_cldc-1
DataInputStream
readShort
0x1E23
MyApplication-1
Serializer
deserializeShort
0x692D
MyApplication-1
TransportHeader
deserialize
0x74A5
MyApplication-1
ResponseParser
readPacketFromDataInputStream
0x6369
MyApplication-1
Reader
run
0x5BD7
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 30 4 0x768B8000
net_rim_os-2
PosixFileOutputStream
write
0x7386
net_rim_cldc-1
DataOutputStream
write
0x2156
net_rim_cldc-1
OutputStream
write
0x609D
net_rim_cldc-13
StringUtilities
writeUTF
0x8F99
net_rim_cldc-1
DataOutputStream
writeUTF
0x22FD
MyApplication-1
LogFilePersister
persistLog
0x4FB4
MyApplication-1
Log
<private>
0x4EC0
MyApplication-1
Log
debug
0x4E38
MyApplication-1
Reader
run
0x5BF7
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 28 2 0x75F50000
net_rim_cldc-1
TimerThread
<private>
0xB7EC
net_rim_cldc-1
TimerThread
run
0xB6FA
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 126 2 0x76372000
net_rim_cldc
Object
wait
0x8951
MyApplication-1
DisplayManager
run
0x233D
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 34 1
net_rim_cldc-1
StringBuffer
append
0xA039
MyApplication-1
Log
debug
0x4E2D
MyApplication-1
DvcRTP
buildStatsHeader
0x4343
MyApplication
DvcNetwork
run
0x21F1
net_rim_cldc-1
Thread
run
0xB0A0
guid:0x9C3CD62E3320B498 time: Thu Apr 23 06:58:14 2009 severity:0 type:3 app:Java Exception data:
ForcedStackTraceException
MyApplication(143) 38 1
net_rim_cldc-1
StringBuffer
toString
0xA386
MyApplication-1
Log
<private>
0x4EBA
MyApplication-1
Log
debug
0x4E38
MyApplication-1
DisplayManager
<private>
0x269E
MyApplication-1
DisplayManager
paint
0x1D72
MyApplication-1
DisplayScreen
paint
0x324B
net_rim_cldc-8
Field
paintSelf
0x2666
net_rim_cldc-8
Manager
paintSelf
0x922B
net_rim_cldc-9
Screen
doPaint0
0x4405
net_rim_cldc-9
UiEngineImpl
<private>
0xB60D
net_rim_cldc-9
UiEngineImpl
doPainting
0x9510
net_rim_cldc-9
UiEngineImpl
pushModalScreen
0xAA29
net_rim_cldc-10
Menu
show
0x8395
net_rim_cldc-9
Screen
onMenu
0x4C49
net_rim_cldc-9
Screen
keyCharUnhandled
0x49E2
net_rim_cldc-11
MainScreen
keyCharUnhandled
0x35BC
net_rim_cldc-9
Screen
dispatchKeyEvent
0x3D7E
net_rim_cldc-9
Screen
processKeyEvent
0x60EC
net_rim_cldc-9
UiEngineImpl
processMessage
0x9F7F
net_rim_cldc-6
Application
processNextMessage
0x13E9
net_rim_cldc-6
Application
enterEventDispatcher
0xAA8
MyApplication
MyApplicationApplication
main
0x30BA