BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 01-20-2010, 11:05 PM   #1 (permalink)
New Member
Join Date: Oct 2009
Model: 8820
Carrier: abc
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Blocking operation-How to fix?

Please Login to Remove!

When i debug my program on device. I see the debug window informed that "blocking operation not permitted on event dispatch thread". And this exception thrown from this line in my code "streamConnection = (StreamConnection) int, WIFI));".

And this is getEndPoint code :

private static String getEndPoint(String endPoint, int connectionType){
                String s;
                switch (connectionType) {
                        case WIFI:
                                s = endPoint + ";interface=wifi";
                                s = endPoint;// + ";deviceside = true";
                return s;
Old 01-21-2010, 08:36 AM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

It is the that is causing the issue. THis needs to be done in a worker thread.

If you perform a blocking operation (like this) in the event thread, your event queue will overflow, causing the OS to dump your program as "non-responsive".
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
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.