Network UI Thread blocking

Hello everyone, I am developing an app for Blackberry wich uses networking capabilities. The query is executed by pressing a button with the following code:

 mainButton=new BitmapButton(Bitmap.getBitmapResource("elcomercio.gif"), Bitmap.getBitmapResource("elcomercio.gif"), Field.FOCUSABLE){
            protected boolean navigationClick(int status,int time) {
                //It automatically add itself to the screen stack
                waitScreen=new WaitScreen();
                TimeOutThread timeOut=new TimeOutThread(HomeScreen.this, 10000);
                HttpHelper helper=new HttpHelper("http://www.elcomercio.com/rss/latest", null, HomeScreen.this, HttpHelper.GET);
                UiApplication.getUiApplication().invokeLater(timeOut);
                UiApplication.getUiApplication().invokeLater(helper);
                return true;
            }
        };

As you can see TimeOutThread and HttpHelper inherit both Thread, so that they can be called outside the main flow of execution.  Two of them also receive the current as a delegate object screen, so that I can execute methods later on the screen. in this case timeout executes the following function.

public void onTimeout() {
        if(!didTimeout.booleanValue()){
            UiApplication.getUiApplication().popScreen(waitScreen);
            didTimeout=Boolean.TRUE;
        }
    }

The timeout method is called sucessfully... even the waitScreen is poppedOut with success and the last screen is shown. But the user interface crashes right now... it is like the HttpThread I got runs always block the user interface... I know, because when the network thread times out... the user interface is responsive again. What I am doing wrong?

You do not use your son as separate threads - instead, plan you on the event Thread run() methods (this is what invokeLater). The right way is to use their start() methods to start two threads separately. So, replace your

UiApplication.getUiApplication().invokeLater(timeOut);

with

timeOut.start();

and do the same with your thread for assistance.

Good luck!

Tags: BlackBerry Developers

Similar Questions

  • UI Thread blocks UN reactive

    In my application, Uithread (Main thread) is blocked from estates or sensitive United Nations for some time.

    There is already a user interface Thread, plus she I'm on another thread to access the data through the network. If data accessed via the network to be used on UiThread.While on adding thread becomes blocked or unresponsive.

    and I use

    UiApplication.getUiApplication().invokeLater(arg0);
    

    To make the updations in my screen of the user interface.

    What could be done to avoid a late response in my application.

    What is happening on the Simulator or device?

    I'm suspicious there is an intervention of the user interface in the thread to networking.  To check if that's your logic 'Add' which is causing the problem, you could create a dummy entry and update the ListField this way even by using a Menu item.  What works, OK, then the problem is not in your update code, but in your network.  If it fails, then you have an easy way to track down the problem!

    Edit:

    Just to really understand what I mean, here is a suggested menu item (just write, not compiled, not tested, you get the idea):

    TestMenu MenuItem = new MenuItem ("Test", 110, 10) {}
    public void run() {}

    final details DeviceDetails = ;
    {if (! list_obj.isFound (Details))}
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    list_obj. AddElement (Details);
    listField.insert (listField.getSize (), details.endpoint_name);
    }
    });

    };

  • social networking sites are blocked by administration how can I accesss them?

    like facebook, orkut, youtube are blocked by the administration to the web Center of my college

    Although this isn't in itself a problem with Mozilla Firefox, you may be able to get access to blocked sites thorugh the use of software (or Mozilla add-on) that will allow you to access a site through a proxy, or by the use of a virtual private network.

    However, please consider reading the terms of use of the network of the University (or similar document).

    It is likely that you are not allowed to use any proxy or virtual private network on the University network. If you do, you may lose your account you are unable to access the network at all!

    So, it's up to you. There are also Web sites that provides a form of proxy service where you simply go to the site and enter the URL of the site you want to access.

    But, as I said: you could be prohibited from using the network if you do not follow the rules, so please be careful and know what you can and can't do using the University network.

  • External network access to blocked port 80

    I have blocked port 80 (inbound - firewall) on my Windows 2008 R2 server. I want a few users access to port 80 of the external network. How can I do? External network will have a static public ip address.

    Thank you for your time in advance.

    Post in the Windows Server Forums:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer/

  • HP Network Communicator causes blocking IE

    Since the installation of an HP Envy D411c, an additional service, HP Network Communicator causes Internet Explorer to hang up, (i.e. does not connect to the Internet) after a period of inactivity.  The ony then plug on the Internet is to terminate the HP Network Communicator service via the Task Manager > processes tab which then interrupts envy of connectivity of the printer (or restarts the computer).

    An important note he shat funcionality everything all the other wireless capable wireless enabled deivices (i.e. smartphone, Tablet PC, laptop) as well as another printer (HP Photosmart D7460) is still intact (with or without network Communicator) as that seems to exclude router related issues.

    What could be the cause of the interruption and is there a resolution?

    OS: Windows XP SP3 32-bit

    IE: v8.0.6001.18702

    Other printers: HP LaserJet 1220se, HP Photosmart D7460

    Hi elcedar,

    This problem occurs on a computer running Windows XP with driver HP (23 to 24.6 version) installed. Here are the steps to resolve this problem:

    First step: change ink setting alerts

    1. double-click on the icon of the product HP on the desktop or click Start, click programs principally made, click HP and then click your HP product.
    2. in respect of Shopping resources, click estimated ink levels.
    3. click on the Advanced Settings tab.
    4. click on the box only show me ink alerts when I print, and then click Save near the change.
    5 restart the computer. It is important that you restart the computer to solve the problem.

    Second step: disable the computer analysis

    1. click on Actions of Scanner and then click on manage the scan to the computer.
    2. click the button disable.
    3. Click to remove the check mark next to automatically start the Scan of the computer when I connect to Windows.
    4. click on close to save the settings.

    NOTE: to scan from the HP software or from the control panel of the product, reverse the previous steps to temporarily activate the analysis to the setting of the computer. After scanning, clear the new parameter.

    http://goo.GL/fJ0u7

  • From Firefox blocks all access to the network

    When I start Firefox (41.0.1), all access to the network is completely blocked. Before you start the FF, I can access the Internet (with Chrome or IE), other computers, but as soon as I launch Firefox, all access to the network (including the connection to other computers) is blocked. In addition, my computer will turn off more.

    As far as I KNOW, I have not installed lately extensions or add-ins.

    Thank you for your resolution. Today, when I mentioned to work, I was told to update Firefox. This seems to do the trick (so far, fingers crossed!).

    (https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings) so very probably an extension is causing harm.

    When this isn't ' t the resolution, I will surely return to your resolutions.

  • Last updated on 6 oct 2014 PS vs. Mac: app lock (blocking the gate network home screen)

    Last updated on 6 oct 2014 PS vs. Mac: lock up and my nickname-fix

    I'm on a Mac, using 10.9.5. When I start today's update (06/10/2014), it starts, but the moment I move my mouse, it crashes with the beach of rotation ball.  I have reset the preferences. restarted; Fitness market without plugins and even deleted and reinstalled.

    No change.  Even with my username fix, it happens again... but here's how I can get it to run.

    Monitor of activity performance and you will find that there is a process named CEPHtmlEngine. They are (at least in my case) marked as "(ne répond pas)". "

    Kill these processes and PS comes back to life. (AdobeCrashDaemon of murder could also help, but it seems that only CEPHtmlEngine really needs to die.)

    Unfortunately, I have to do it every time I run the PS application, but at least it seems to work for me.

    HTH

    Ok.  So it seems that something goes wrong with the Welcome screen.  The Welcome screen pull HTML/CSS/JS files from an Adobe server, a little like a browser would.  Learn more about the configuration of your network.  Are you in a business network that would block some sites?  Could you be in a café where you need to display some ad or recognize some opinions before that they will allow an internet connection?  You are someone who is really tight to the bottom of your network security settings to not allow certain communications?  (If you don't know what it could be, then you probably did not.)  We had one of our users of the draft with a bad Antivirus Soft that has been uninstalled at halfway was causing him problems, so it might even be something like that.

    Mark

  • Profile deleted network-, but my computer thinks it still exists and I can't connect to the network at all.

    I had problems connecting to my wireless home network.  It always gave me the error that the network stored on my computer (relevant for my home network) profile did not have the correct network settings.  I couldn't find a way to solve the problem, so I just deleted the profile, in the hope that in trying to reconnect, my computer would automatically detect the appropriate settings.

    Now when I try to connect, I always gives me the same error (that the relevant profile has bad network settings) even if the profile has been deleted.  My computer asks me if I want to open the network profile to check its settings.  If I hit Yes, I gives me another error (because there is in fact no longer the profile).

    I'm running Vista Basic and I have problems connecting to other networks (without thread or hard line).

    Any help is greatly appreciated, thank you-

    Hello

    First of all, make sure that if there's Wireless Utility a utility vendor is not running with the native Windows wireless utility.

    Also, make sure firewall No. preventing / blocks wireless components to join the network.

    Look at the wireless management screen, and then remove the entry from your wireless network.

    http://www.ezlan.NET/Vista/wireless_manager.jpg (Control Panel, network and sharing Center. Upper-left click Manage wireless networks.

    After the form of own connection, wireless tray bar icon.

    Given that your wireless network is more in the preferred list, it will prompt for the password. Put the password that is current, and if all goes well it will connect.

    Jack-MVP Windows Networking. WWW.EZLAN.NET

  • Threading, performance PlayBook, etc..

    I'm in the middle of making my fist PlayBook NDK app...

    I have three threads and more the main thread:

    (1) a thread chart decoding and display of images.

    (2) a wire audio playing a WAV file.

    (3) a network download data wire.

    As I worked on this app, so far I got the graph and network running thread. That worked very well. I have a nice pace.

    I then started to work on the audio, and even thread that seemed to work along side the network wire.

    However, when I have three threads running, everything collapses.  Audio constantly cuts.  The video freezes constantly, etc, etc.

    This is the first time I tried to create such a demanding application, and I was really hoping that the PlayBook has been up to her, as it is the C code, and the PlayBook is dual core.  For example, I don't think that playing a WAV file would be a lot of work for a thread, so I was hoping the network transfers and audio could be easily managed by 1 CPU core, while the JPEG decoding could be managed by the other.

    Any thoughts / recommendations?

    Any help would be most appreciated.

    Thank you

    Daniel

    Have you tried tuning of your thread priorities?  The audio thread priority.

    Calendar is alternating if the wires are all to the same priority, and if you have 3 wires about 2 carrots, 2 son will participate at some point.

    Learn about the use of pthread_attr_t with pthread_create().  See pthread_attr_setschedpolicy() and pthread_attr_setschedparam().  Priority to getprio layout (getpid(2) () + 1 will probably be sufficient.

    I suggest also to investigate the use of larger sizes of audio block, but it looks like the example of PlayWav can already use size frag announced by the pcm device max.  Block of smaller sizes means that your son has to wake up more often in order to keep the pipeline full pcm.

    See you soon,.

    Sean

  • Thunderbird is waiting for the completion of the network of e/s

    I have Thunderbird running on my computer Windows 10.
    There is no way I can go back to earlier versions of windows.
    And it has no option to know the version of Thunderbird for me because Thunderbird keeps by hanging, awaiting the completion of network IO threads (according to windows Task Manager).

    I have no problems when you use Windows 8.1
    I suspect that the problem is somewhere in the calendar, but I can't say for sure.

    Have you tried Thunderbird running in Mode safe? This disable the calendar (lightning) and so maybe solve this part of your suspicions.

    https://support.Mozilla.org/en-us/KB/safe-mode

  • In the Palette of what are endpoints network Stream?

    I adopt/adapt the project for example LabVIEW 2012 in real time to my needs and must create some additional network data stream parameters.  I can't find these on the pallets of façade, or the quick search Drop.  I can, of course, copy one of the code example, or drop down a function of stream network on the block diagram and create a control from the proper flow terminal, but shouldn't this be located somewhere, say in the Refnum palette?  It is also "conspicuously absent" from the help topic "Refnum controls Types", which mentions the other Refnums not on the Refnum palette, but not network streams.

    Suggestion to OR - at the risk of making the Refnum huge Palette (lightened in seen, say, a palette under "Advanced"), put all classes of Refnum NOR in the Refnum Palette, please.

    BS

    Duh - they aren't Refnums, they witness e/s, so they belong on (but not on) the e/s Palette.  The point of origin, that all the that refnums belong somewhere on the Refnum Palette can now be extended to say that all the orders/lights/o Panel belong in the e/s Palette.

    BS

  • -"Save your computer on the network" message after logon

    original title: connect to a modem

    When you use my model, I connect and my user id gets checked and it connects but I get the message "Reistering your computer to the network" amd he block my computer

    Hi JMG_53,

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Temporarily disable the security software.

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 2: Follow these steps:

    Step 1: Start the computer in safe mode with network and check if the problem persists.

    Step 2: If the problem does not persist in safe mode with networking, perform a clean boot to see if there is a software conflict as the clean boot helps eliminate software conflicts.

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state from the link to start the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click restart to restart the computer.

    Method 3: Follow the steps in the article.

    How to troubleshoot a network home in Windows XP

    The modem does not work and cannot open the "Network connections" window after you unplug and plug in the modem several times when a PPP connection is established in Windows XP

    For reference:

    In Windows network connection issues

    Windows wireless and wired network connection problems

  • T61 Wireless Network Configuration

    Hi I'm trying to set up a wireless network small office at home. I created a profile on the other two machines with XP pro. I have a cable router and all can connect through it when I try to create a network home with logins that he seems to think that I want to connect to a different router in a different place, while I use my router to create network wireless home office. I'm better off the coast of uninstallation of access connecitons. It seems that he manages this difficult work or can someone point me in the right direction. I loooked at Lenovo's article on it, but their images of their way to access connections is different from my dial-up connection. I have updated and update regulaily with system update. Advice and prayers... Please... Don't tak the last comment as confirmation that I believe in God or and beyond...

    Hi flambo,.

    I would recommend just UN-installing of logins. You can switch between networks without thread too easily (IMHO) with the standard tools of Windows networking.

    See you soon,.

    Frank

  • my hp deskjet 3050 detects other networks.

    My HP deskjet 3050 detects other networks, should I block the other networks? If I need to block other networks, how do you? And other people use my printer to win my internet useage?

    Just as your laptop and desktop computer can detect other networks around your House, it will be in your printer.   Your printer will connect to a SSID only at a time with YOUR password.  So not to worry.

  • Internet connection with Windows XP, SP3 and Airport Extreme - the status is always "absorbing network address.

    My Airport Extreme connected my IMac immediately, but I am not able to connect on the side PC. Airport utility does not 'no matter what Airport wireless devices". When you check the status of the internet connection with PC tools, the correct network is indicated and shows an excellent signal strength. The status is: "absorbing the network address. However, nothing happens.

    Under 'Repair the wireless network connection', it shows, "Windows is taking the following steps: your IP address renewal" even once, nothing happens.

    Under hardware I show Atheros Wireless Network Adapter and the mention: "this device works correctly.

    Yet, no network connection. Any help will be greatly appreciated.

    Hello

    Keep the changes and open the wireless. For example, to disable security in the router (turn on when to managed to connect).

    You can also try the wireless in a friends house, or an Internet café to get a frame of reference for this behavior elsewhere.

    -------------------

    Wi - Fi in general.

    These steps and tell us where is the breaking point.

    Check the Device Manager for the wireless card valid entry.

    http://www.ezlan.NET/Win7/net_dm.jpg

    If there is no valid entry, remove any entry from fake and re - install the drivers for the wireless card.

    Check network connections to make sure that you have a network icon/entry wireless connection, and that the properties of the icon (right-click on the icon) are correctly configured with the TCP/IPv4 protocol in the properties of network connections.

    http://www.ezlan.NET/Win7/net_connection_tcp.jpg

    ------------------

    The wireless card drivers much also install utility wireless of the seller.

    Make sure that if there are teas from Wireless Utility of seller does not work with the native Windows wireless utility (Service WLAN).

    ----------------

    Make sure you firewall No. preventing / blocks wireless components to join the network.

    Some 3rd party software firewall continue to block the same aspects it traffic Local, they are turned Off (disabled).

    If possible set up the firewall correctly, otherwise totally uninstall and get rid of its remaining processes that permit the own local network traffic flow.

    If the 3rd party software is uninstalled, or disables, make sure Windows native firewall is active .

    party like Hello and NetMagic 3rd network managers can block local traffic too.

    ---------------------------

    Stack TCP/IP work should look like.

    Right-click on the wireless network connection card, select status, details and see if she got an IP address and the rest of the settings.

    http://www.ezlan.NET/Win7/status-NIC.jpg

    Description is the data of the card making.

    The physical address is MAC of the card number.

    The xx must be a number between 0 and 255 (all xx even number).

    YY should be between 0 and 255

    ZZ should be between 0 and 255 (zz all the same number.)

    The date of the lease must be valid at the present time.

    * Note 1. IP that starts with 169.xxx.xxx.xxx isn't valid functional IP.

    * Note 2. There could be an IPv6 entries too. However, they are not functional for Internet or LAN traffic. They are necessary for Win 7 homegroup special configuration.

    ---------------------------------------------------

    A message in the small window that says connected wireless doesn't means that you are really a valid functional connection.

    Above everything is OK, you must be able to connect to the router.

    Connection to the router means that you can enter the IP of the router base in an address bar in one go, being able to connect and configure the router menus see.

    If it doesn't connect to the router, journal newspaper from any computer that can connect to the router wirelessly with a wire, disable wireless security, make sure that the wireless SSID broadcast is enabled and try to connect with no. wireless security.

    Enable security wireless after you eat to make a functional connection.

    Jack - Microsoft MVP, Windows networking. WWW.EZLAN.NET

Maybe you are looking for

  • C309a series will not print black on coloured paper

    Can someone help me understand why my photosmart c309a will not be printed in black ink on colored paper?  The ink levels are fine.  If I put the white paper, it prints in black ink very well.  With colored paper, it prints in a strange greenish colo

  • 2 monitors on m90

    We plan to buy some m90 and use them with 2 monitors each, working independently. What I have to install any special NVIDIA or the graphics processor integrated graphics card is enough?

  • HP OfficeJet 8630: Problem printing Kodak 4 x 6 photo paper

    Using Windows 10 Pro, I set the printer to print 4 x 6 Kodak photo paper.  When I told it to print after a while he can't say no paper in the printer tray, after trying a number of time wherever it will be finally find the book.  The printer has a pr

  • How a screenshot will develop to fit full page orientation landscape?

    I can't conversion of screenshots in full width on a landscape Orientation. I use Word 2011 and the reminder that the use of a much earlier version, it was a simple 2-steps - PrintScreen and then Ctrl V for import into a template that I had previousl

  • A symbol of blue lock on the display screen. How to remove?

    There is a blue lock in the middle of my screen symbol. It opens and closes every 15 seconds?