BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-20-2006, 04:30 PM   #1 (permalink)
New Member
 
Join Date: Feb 2006
Location: Dallas
Model: 8800c
Carrier: Cingular
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Process [application name] queue overflow; oldest event dropped

Please Login to Remove!

In all my searching through the web, BlackBerry.com forums and this forum I've never seen an answer that could get me going down the right path to solving this problem, so maybe someone here can help shed some light on this event log message.

I developed a CLDC app which consists of a listener thread launched on startup using the Alternate CLDC Application Entry Point. The listener Thread is then stored in the RuntimeStore. My app also has a UI that later retrieves the data previously stored on the handheld and render it for the user. The background listener listens on port 6676 for an MDS push, once received, it then parses this data and stores it in the handheld's persistent storage for the UI to retrieve.

My background listener works consistently 100% of the time. I even setup test scenarios that push random data to the handhelds in my test environment (about 8 of them) every 30 minutes (24/7) during this time each handheld successfully received the data during a two week time frame. I did this to make sure there wasn't any chance that the listener would mysteriously "stop working" like I've read in so many other posts.

Now, at this point I thought everything was working and fully tested so I'm ready to begin deployment. Then I read a post here that showed me how to (ALT LGLG) get to the handheld's event log. Of course, I immediately went to take a peek to see what was in there, purely out of curiosity, not thinking that my application was writing anything to it - after all it has been tested for almost a month now and doesn't so much as hiccup. To my unfortunate surprise, my app has been filling up the event log with the same thing over and over about every 60 seconds.

a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:40:46
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:40:00
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:39:00
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:38:46
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:38:42
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:38:37
a System - Process [application name](72) queue overflow; oldest event dropped - 2/20 14:38:06

I spent a considerable amount of time this past Saturday going through my code commenting out blocks until I narrowed down the moment this anomaly begins. These events start being written to the log when my background thread begins the infinite loop which wraps the code that waits for the MDS push (_notify.acceptAndOpen()). I won't lie, my code is verbatim what you see in the KB Article "How To - Open a push listener connection" (http://tinyurl.com/qhc36) on the BlackBerry.com site. The moment I include the for(;;) loop it starts writing to the event log - I don't even have to have anything occur within the loop.

I'm at a total loss for what this could be, or what it is even remotely related to, and I've exhausted all of my resources looking for the answer. If anyone at all can point me into a new direction I would greatly appreciate it.

Thanks,
~Chris

environment details:
BES v4.0
JDE 4.02
Handheld: 7290 OS v4.0.2.49
Offline  
Old 02-21-2006, 09:25 AM   #2 (permalink)
No longer Registered.
 
Join Date: Aug 2004
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Not running on the event dispatcher

It sounds like one of two things.
1) You aren't ever entering the event dispatcher
2) You are blocking the event dispatcher thread.

Basically the event dispatcher dispatches events in the application, things like painting, key presses, etc. If you block this thread then you get message queue overflow; if you don't ever enter the event dispatcher then you also get message queue overflow.

1) Is pretty simple; make sure that any call that you don't return from isn't inside the event dispatcher thread. You can check with Application.isEventDispatchThread(); so you should try this before you go into your for(;;) loop.

2) Who ever creates the Application class should yield the current thread to the event dispatcher eventually.

Normally you have something like:

public static void main(String[] arg) {
MyApp app = new MyApp();
app.enterEventDispatcher();
}

kind of code; make sure that if you create an app; you enter the event dispatcher.
Offline  
Old 02-21-2006, 01:26 PM   #3 (permalink)
New Member
 
Join Date: Feb 2006
Location: Dallas
Model: 8800c
Carrier: Cingular
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Post More details

I'm definitely not entering the event dispatcher. My app is a two-part process, all in the same application, so it starts up the background listener thread on startup and later the ui enters/exits the event dispatcher when it it launched from the ribbon.

My UiApplication's main() looks something like this:
Code:
public class PremiumViewer extends UiApplication implements KeyListener
{
    public static void main(String[] args)
    {
        boolean uiStart = false;
        
        //Check for alternate application entry point.
        if (args != null)
            for (int i=0 ; i < args.length ; ++i) 
                if (args[i].startsWith("UIStart")) 
                    uiStart = true;
        
        if (uiStart) 
        {
            _theApp = new PremiumViewer();
            _theApp.enterEventDispatcher();
        } 
        else 
        {  //Entered through the alternate application entry point.
            //Enable application for synchronization on startup.
            PremiumListener.WaitForSingleton();        
        }
    }
    ...
}
That static method on the PremiumListener looks something like this:

Code:
public final class PremiumListener
{
    private PremiumListenerThread   _premiumListenerThread; 
    PremiumListener()
    {
        _premiumListenerThread = new PremiumListenerThread();
       _premiumListenerThread.start();
    }

    //Returns an instance of the running PremiumListener app.
    public static PremiumListener WaitForSingleton()
    {   //Ensure this is a singleton instance.
        RuntimeStore store = RuntimeStore.getRuntimeStore();
        Object obj = store.get(PL_ID);
        if (obj == null)
        {  //Store a reference to this instance in the RuntimeStore.
            store.put(PL_ID, new PremiumListener());
            return (PremiumListener) store.get(PL_ID);
        } 
        else
            return (PremiumListener) obj;
    }

    private class PremiumListenerThread extends Thread    
    { // simplified here for brevity, my code is almost identical to
       // http://tinyurl.com/qhc36
        public void run() 
        {  // begin listener loop
            for (;;)
            { // even with no work done here
              // it will still produce the event log entries
            }
         }
    }
}
Without bogging this post down with a ton of code, this is basically the pattern I'm following. All of this code exists within the same project, so I couldn't figure out a way to enter the event dispatch with the Thread without it causing the application to throw an exception.
In my run method before the for loop (as you suggested) I attempted to check the Application.isEventDispatchThread() and it throws the following exception: IllegalStateException: no application instance

Thanks for the suggestions, I do appreciate the help, please let me know if I'm misinterpreting something you suggested.
Offline  
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





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.