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
New Contributor
felixk2
Posts: 2
Registered: ‎07-25-2012
My Device: 9980
My Carrier: Verizon

App freezes for 10 seconds with strange error in console

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.IllegalStateException: EGLManager::CreateWindowSurface failed
[73859.484] Graphics_clear graphics wrapper error: 63[73859.484] com.myapp@6316b51e,java.lang.IllegalStateException: EGLManager::CreateWindowSurface failed

 

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

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: App freezes for 10 seconds with strange error in console

Any chance you are running the http requests on the UI thread?

 

E.

Please use plain text.
New Contributor
felixk2
Posts: 2
Registered: ‎07-25-2012
My Device: 9980
My Carrier: Verizon

Re: App freezes for 10 seconds with strange error in console

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();

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: App freezes for 10 seconds with strange error in console

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. 

Please use plain text.
Contributor
demaniak
Posts: 34
Registered: ‎07-05-2011
My Device: Various
My Carrier: Generic

Re: App freezes for 10 seconds with strange error in console

[ Edited ]

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...

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: App freezes for 10 seconds with strange error in console

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. 

Please use plain text.