07-25-2012 11:08 AM
Hi,
I'm having a real difficult time narrowing down a bug. I have a very simple app that runs a single thread that waits for HTTP requests in a queue. The thread sleeps for 50ms and then checks for new items in the queue. If there are new items the thread will perform the http request.
Sometimes when I wake the BlackBerry up from the black screen and unlock it I find the app is unresponsive. The UI doesn't change. I hooked up my device to see the console logs and when i'm tapping UI items i get the following:
[73859.414] Graphics_clear graphics wrapper error: 63[73859.414] com.myappI@6316b51e,java.lang.IllegalStateExceptio
[73859.484] Graphics_clear graphics wrapper error: 63[73859.484] com.myapp@6316b51e,java.lang.IllegalStateException
Eventually (after about 10-20 seconds) the app runs through all the screen presses that I made.
Anyone have any ideas what could be wrong here?
Thanks
Felix
07-26-2012 07:19 AM
Any chance you are running the http requests on the UI thread?
E.
07-26-2012 08:21 AM
No, i create a new thread that runs through the HTTP request queue and processes them.
public class ConnectionThread extends Thread
Then i have a singleton that does the following:
ConnectionThread ct = new ConnectionThread(this);
ct.start();
07-26-2012 08:34 AM
My suspicion is an issue with the update processing when you get the data back from the Thread, or some access to Persistent store being refused because your device is locked. Make sure you are logging your activity and then check the log for the period the device was locked. The easiest thing to do would be to debug from a PC, but I'm not sure the BB will go into the state you see a problem with when connected.
01-28-2013 05:53 AM - edited 01-28-2013 05:54 AM
Ran into the exact same trouble now, while BB was connected and debugging...anybody managed to get more info and/or solution?
Just some more info - it was looking like the whole phone was sorta screwy while this was happening.
For example, I managed to get back to the home screen, but from there I couldn't open the BB menu or get to the task ribbon.
After a few seconds things seemed to stabelize again...
01-28-2013 08:43 AM
I would start a new Thread.
The most likely cause is running networking stuff on the Event Thread. If you are running listeners (like listening to incoming calls and the like) then code running in the listeners needs to be really tight or that can cause similar problems. In addition, it could be a memory issue - is the garbage collector 'timer' displaying at this time?
Make sure there is plenty of logging in your application, and monitor this and the normal logging while the problem is occurring. I think from there you will determine what you are doing wrong in your app.