BlackBerry Smartphones UDPDatagramConnection hangs on receive()

Hello

I'm having a problem using UDPDatagramConnection in my BlackBerry application.  I read a lot on the discussion forums on the UDP connections multithreaded applications the main thread of hunger.  However, my situation is a little different.

I have a BlackBerry application that communicates with a server.  The UDP connection all takes place in a separate thread.  The send() function works very well for the UDPDatagramConnection.  The server sends a return message, and the UDP thread calls the function receive().  At this point, the UDP thread depends on the function receive().  There is a message from the standby server, but the function receive() crashes.

The irony is, if I leave the thread hand fill, then the UDP thread can complete the function receive() very well call.  It almost seems that the main thread is starving the UDP thread.  I tried to play with the priorities of threads, join(), yield(), Wait () and notifyAll(), but nothing seems to work

The segment of code calling the UDP thread in the main program:

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

Try
{

Blah NetworkMessageThread = new NetworkMessageThread (Common.CLIENT_register, getAuthServerIP(), Common.AUTH_SERVER_PORT);

blah. Start();
blah. Join();
} catch (InterruptedException ie) {}

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

The code in the UDP thread segment:

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

Try
{
Datagram inDatagram = _receiveConnection.newDatagram (entry, input.length);
_receiveConnection.receive (inDatagram);
                                
some cases only require the decision to receive a message, then close it after single use
If (closeAfterReceive)
{_receiveConnection.close () ;}
                                                                                                                                
Return inDatagram.getData ();
}
catch (IOException ioe) {System.out.println ("error: receive packets failed!" + IOE);}     return null ;}

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

It IS VERY IMPORTANT FOR MY PhD RESEARCH!  Help, please!

I was using the JDK BlackBerry 4.7.0.  This problem has been resolved in JDK 6.0.

Tags: BlackBerry Smartphones

Similar Questions

  • BlackBerry Smartphones cannot send or receive e-mails on my blackberry curve 9320

    Hi, for the last 2 days that I couldn't send or receive e-mail on my phone, I contacted vodafone and they were not able to help. I would also add that when I click on OPTIONS - SECURITY - the SECURITY STATE INFORMATION my 4 email accounts appear, could be the problem, please help if you have a soloution.

    Kind regards

    Hello and welcome to the community!

    With a strong carrier network (for example, not only WiFi), I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2, each should result in a message from your BB... Please wait just before moving on to the next step):

    1) register HRT

    • KB00510 How to register a BlackBerry smartphone with wireless network
    • Please wait a 'registration' message reach your Messages application

    2) Remove and return Service books

    • KB05000 Remove the maintenance book for the BlackBerry Internet Service email account in the BlackBerry smartphone
    • If you do not have access CMIME, continue deleting
    • KB02830 Send the directories for the BlackBerry Internet Service
    • Please wait "the Activation' Messages, one per already configured e-mail account, arrive in your Messages. If you have not already configured email accounts, please wait 1 hour.

    3) restart

    • With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes.
    • See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    I hope that will move things again for you! If not, then you should try remove and re-add your configurations for the relevant accounts. Otherwise, you should contact your mobile provider to support formal... consider that you pay for your services and official support and now they seem not to be to deliver. They have even the power to escalate your case officially until BlackBerry if they can't solve it, but you have does them not you fob off the coast with things like "it seems" good on our end... they are responsible for the provision of services to you, you pay for it.

    Good luck!

  • BlackBerry smartphones can no longer receive MMS

    Since the installation of the new OS7.1 on my torch 9860 I could not receive MMS.

    I got a notification of download... but the piccy na not yet

    Can someone help me please?

    Hello!!

    I suggest the following, in order, even if they seem redundant to what you have already tried (steps 1 and 2, each should result in a message to your BB to come...) Please wait for this before moving on to the next step):

    (1) registry HRT

    • KB00510 How to register a BlackBerry smartphone with wireless network
    • Please wait a 'registration' message reach your Messages application

    (2) Service reference books

    • KB02830 Send the directories for the BlackBerry Internet Service
    • Please wait "the Activation' Messages, one per already configured e-mail account, arrive in your Messages. If you have not already configured email accounts, please wait 1 hour.

    (3) restart to take batt

    • Each time a random strange behavior or slow creeps, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    I hope that will move things again for you! If no, then you will probably need to perform a clean OS reload... something in the update of the operating system that you have done have been damaged.

    crazylady13 wrote:

    and where is called fm radio?

    For that matter, there is no software that can overcome the fact that your model does not have a receiver of FM radio inside. Only some models which, and so only they can get the FM radio service... see this:

    Good luck!

  • Canoe of blackBerry Smartphones to send and received email on verizon storm 2 9550

    My BB 9550 verizon so far cannot be sent or received by e-mail. XL axiata (BIS). OS v5.0.0.1082. Try to complain in the XL Center and customer service says that the BlackBerry smartphone has boredom, which is true? In the service book, notice is rejected CMIME. several times I try send the maintenance of the device address, delete DM and send the book service once again, but so far is EVEN. NO CONFIGURED MESSAGE SERVICE. YOU WILL ONLY BE ABLE TO SAVE AS A DRAFT. Who's wrong? Provider XL Axiata or smart phone BlackBerry?

    Re: Disabling BES of the handheld

    08/05/2009 20:34

    After his contacts on the PC, I'll make sure that you have installed 4.7 DTM and go to the command line

    type: cd c:\program files Research in motion\apploader enter

    type: enter loader.exe /resettofactory

    This should remove the policy from IT previous of the device and wipe the device then you can resync everything back to the device.

    Thank you so much for: http://supportforums.blackberry.com/t5/BlackBerry-Curve/Deactivating-from-BES-from-the-Handheld/td-p...

    It is very useful for my trouble.

    Thanks for you all.

  • BlackBerry Smartphones cannot send or receive e-mails from 10/23

    Lost all connectivity e-mail to my e-mail account on Roadrunner (socal.rr.com).  Tried to validate my account from the smartphone and also on the Blackberry site.  The email validation fails - has provided no further details.  Have made several unsuccessful attempts to validate the account and have checked that I provided correct email account information.  Also have restarted the unit several times.  Don't know what I can do.  He had to deal with that.

    You can try to delete the email, removing the service books so that e-mail, then put in place again.

    Another idea, if you use a password to connect and the service has two factors optional security, go to that and the new.  Alternatively, if you use the method of the two factor, shut it down and test.

  • BlackBerry Smartphones - manual email send & receive?

    Phones just changed to MotoQ for Blackberry Curve 8330 and I don't always like my email to download automatically.  Is it possible to manual to send and receive in MS Outlook instead of what is happening just manually?  Thank you

    Tracy

    I don't believe it.

    If this answers your question, please take a few minutes to address the message by using the options of the Kudo star.

    Thank you!

  • BlackBerry Smartphones is no longer receive e-mail... impossible to connect to the server to update my password

    I have a Curve 8520.

    Carrier Movistar

    I received an email telling me that I had to update my password of my email that I was no receiving email any longer... I can't connect to the server to do this...

    Please help I need it for work

    Hello EmmaG3845

    Welcome to the Forums of the BlackBerry Support

    Leave a PC browser trying to access the e-mail account if necessary change your password for this e-mail account, restart your device, and then try to update this e-mail account on your device.

  • BlackBerry smartphones, I can't receive e-mail

    I just bought a Blackberry 8330. I have created email Blackberry without any problem. I have a Sympatico account that I put in place, and I am able to send e-mail from him but he will not receive any. Does anyone have any suggestions as to why it will not receive? Thanks in advance.

    Honestly, if she received one of the ways, then it works fine.

    These emails also download on your PC for Outlook?

    There is a setting in Outlook to "Leave Messages on server".

    For MS Outlook 2003 (another version are similar, you just need to find the setting):

    Outlook > tools > e-mail accounts > view or change existing > next.

    Select the e-mail account > change > additional settings.

    Advanced tab > leave a copy of Messages on the server

    Select this check box.

    • You will need to make this change for each Outlook e-mail account, you have.
  • BlackBerry Smartphones phone hangs when connected via USB

    Hi I have a Pearl 8120. There is a problem where the phone will break if I connect it to some PC via USB.

    When I say that it blocks the screen turns off and the red light stays on. To recover from this point, I have to unplug and reinsert the battery.

    But for example if I connect it while the PC is not started in Windows so it will not crash.

    When I connect the phone via a charger cable is also very good, and never, it hangs on my own PC at home.

    Is there a way to fix this?

    Hi, it seems that too much effort for reload software blackberry at this stage.

    Although I solved the problem by changing the option "Auto enable mass Storage Mode when connected" guest.

  • BlackBerry smartphones suddenly stopped to receive emails

    I suddenly stopped receiving my emails from my blackberry torch 9880. I can also not send.

    Ive done some research on the net you and I did power off and also battery traction ive tried to go into the configuration settings and electronic mail but it wont let me check my settings. its really frustrating me now. Can someone help me please!

    Call your provider?

  • BlackBerry smartphones cannot call or receive calls

    Hello

    I have the following problem and hope someone can help me with it:

    • Since yesterday my phone don't make me call or receive calls. In both cases, I get a "call failed". I see a connection activity in the upper right corner in both cases.
    • I use a prepaid card of Fonic/O2 where I can ask my balance by "call" * # 101. Normally it takes a few seconds to get the balance, now it takes much more time. Now, often even, I don't get my balance, but a "supplementary service error: General error:
    • I am still able to send text messages (but there was also a message that could not be sent).
    • Receive any text message does not seem to work.
    • A Wi - Fi connection works as usual.
    • When I put my sim card in another phone, everything works perfectly fine.
    • I was not trying to put another sim card in my blackberry.

    My data :

    • Carrier: Fonic/O2 Germany (without option bb)
    • Phone: BlackBerry Bold 9780

    I hope that there is anyone having a clue!

    Thank you very much!

    bbbcf

    Thanks for your reply. The problem was the signal Tower. I think that my provider has resolved the problems on their own... Thread can be closed.

  • BlackBerry Smartphones suddenly stopped to receive almost all the emails on 8830.

    A lot of email this AM, then this afternoon, nothing.

    Messaging works.  Phone works.  I can even send a message from my computer to my BB, but nobody else can send messages.  Cannot be re-sent service books because I don't remember my password.  When I request, it is sent to my Blackberry, which is not receive emails.   Help!

    The same thing happened to me!

    After HOURS of trying to figure out and reading the online support forums, I thought about it!   Yay!

    Here's what I did: go to the e-mail settings.  Once opened, press 'Books of Service', then 'send Service directories '.

    Don't know why this happened, but after 15-20 minutes, you should be flooded w/e-mail good luck!

  • BlackBerry Smartphones suddenly not not receiving emails

    Out of the blue some days than my Blackberry not received emails from my Outlook account, however no problem before today.

    Check all the appropriate settings (data services "on" under mobile networks for one), removed the Inbox all items on BB to the case where they were too big, audited helped other solution options, and none.

    At the same time, do not view Facebook messages, if I can get the updates, so much information making it to BB. Just not the new incoming email and new entrants FB reviews.

    FWIW, I did sent me an email from BB. Very curious! Any help, troubleshooting, this will be much appreciated.

    Hi and welcome to the Forums!

    Whenever random strange behaviors creep, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    Best!

  • BlackBerry smartphones is no longer receive Emails and Notifications

    Hello

    Farily new to blackberry... I tried looking for a resolved question that looked like before posting, so I apologize if this is a repeat.

    I have my phone set up to receive emails from yahoo directly on the phone (as well as in my yahoo Inbox).  So far its working well, appear when I have a message, etc..  But since this morning, he stopped.  I got messages from one day to the next, but since this AM, I have not received any messages on my phone (but a lot through my Inbox in regular line).  I tried to reboot, perform a hard reboot by removing the battery while on and so far nothing has worked.

    At the same time, I have the Facebook app also and have it configured to indicate when I have a new message.  Worked fine until today.  I uninstalled and reinstalled the application and handed on the phone, but its still not get messages and notifications.

    I would uninstall the installer of yahoo, but the person in the store set up for me, so I have no idea how to do it myself.  Any help? Thank you!

    (Also, I could send and receive SMS text messages all day without problem).

    Cara

    Hi and welcome to the forums!

    Go to options advanced options, host Routing Tables, click to enter. DO NOT CLICK on any list.
    Press the menu key and select sign up now.
    You will receive a verification email. Then go to email settings and send service directories.
    Some models like the Curve 8330 and Pearl require login in carriers BIS of the site
    via a PC. You will receive an email by account. Test address e-mail and facebook.

    Thank you

    Bifocals

  • BlackBerry Smartphones Gmail are more received on my Tower

    This morning when I connected to my Desktop Manager I did an upgrade to the operating system.  now I get all of my gmails on my handheld.  I did the service books and received this notification on my device.  any suggestions or should I just and back to replenish my heandheld to the earlier operating system.  Help, please.  Thank you.

    Hi and welcome to the Forums!

    Before withdrawing your OS, I would try the following steps:

    (1) registry of the THS:

    • Homescreen > Options > Advanced Options > host Routing Table > BBKey (it matter little what line is current) > sign up now

    (2) refer the Service directories (my apologies if this is redundant):

    • KB02830 Send the directories for the BlackBerry Internet Service

    If it still does not work, then I suggest deletion and recreation BIS conduit for this e-mail account.

    Good luck and let us know!

Maybe you are looking for

  • Apple Watch of training active calories very low after reset/restore

    A week ago, my watch has stopped to record all activity data, even after a workout he would not save it to the application of the activity.  I did a reset and restore from a backup and it started working again.  However, the number of active calories

  • Qosmio X 500 - 12N freezes without action or use

    I have a Qosmio X 500 - 12N and got a major prolem, not always but about 4/10 times, the computer crashes, (not authorized stock, mouse freeze, sound continues to repeat) even if I did not open any program or I do nothing I have to shut the power but

  • Glyph library

    My icons and folders are where they are supposed to be.  However, now when I try to change my icons VI editor shows only a white tree.  I think I deleted a XML file which is supposed to be there. When I tried to sync automatically and manually withou

  • All wobbly sound card...

    Recently, I noticed that I couldn't access my maps their EAX, midi or surround settings, whenever I try to do, I get a message stating that the device supported by this function, is not found.  I tried a complete withdrawal and reinstall, but unfortu

  • SCANNING SOFTWARE

    I HAVE A "SMALL FU661E" SCANNER AND CAN NOT FIND A SOFTWARE TO MAKE IT WORK WITH VISTA.