BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 06-13-2007, 07:16 PM   #1 (permalink)
New Member
Join Date: Jun 2007
Model: 7390
Carrier: verizon
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default PushScreen Issue

Please Login to Remove!

I am encountering some weird behaviour of the PushScreen method in the UI class.First and foremost, what could be a simple reason for PushScreen to not push the user screen on to the UI stack and also not throw an exception (saying it was not able to Push Screen). I am having a hard time debugging this issue as the pushscreen is being called and it doesnot throw any exception and passes succesfully without pushing my screen on the stack
One point to be noted here is that , the situation arises only after i get a Time out exception/ IOException in the my Connection class which i will explain it further.

I am aware of the fact that UI thread is a single thread and it should not be blocked. Currently our architecture is such a way that we constantly need to be connected to the server and there is a two way communication going on between the server and the BBclient.

I have a seperate thread for receiving data from the server and the Send thread is inner class of the Recieve Thread. In my exception handling of the receive thread whenever i get a IOException
1)Connection Refused ( i do the needful)
2)exceeded the limit of number of bytes allowed per connection ( i do the needful)
3)Any other exception (connection time out /I get an empty exception message too ( I am not sure what this means , do you know what it could be ) - In this case , i set my boolean for resetting the recieve thread , so what i do is -
A) I have a stop method inside the Recieve thread which closes and notifies , StreamConnection obj ,DataInputStream obj etc (.close and .notify)
B) start the thread.

Can some one tell me whats going on ??? Does anyone know whats the best way to debug this ??? Any help is appreciated

It starts working fine if i quit the application and come back. I have System.exit() call in my Close application which clears up all the threads and hence works fine. But again after sometime if i get any of the IO exception it stops pushing on to the screen.

I have also noticed this sometimes, even after getting the Exception , after some time (maybe a minute or so) if i try to run the same scenario it works fine, but its just too flaky currently.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD
APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD   picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.