Unknown Thread problem

I call a thread class that receives an object (Almond), so that some variables can be written to the class for use later in the application.

I've been this debugging for hours but cannot get anywhere with it.

Basically the faulty code at line 13 on below the class level, the debugger written «Source not found - change the Source search path...» "And in the debug window, he says that there is a problem in sms_listener_thread. (line): 307

sms_listener_thread. (kernel) line: 13

screen. (line): 24

...

...

...

The debugger is not what anyone in the run() method, seems to fail on line 13:

public sms_listener_thread(kernal kernal1){

I've included both the sms_listener_thread class and the screen so you can see what is happening.

I ' t probably something to do with the way things are called

Thanks in advance

import java.io.IOException;

import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

class screen extends MainScreen
{

    public kernal kernal;
    public screen() throws IOException
    {

        super();
        System.out.println("DEBUG: Screen Loading");
        LabelField applicationTitle = new LabelField("Test");
        setTitle(applicationTitle);
        RichTextField helloWorldTextField = new RichTextField("Main Screen");
        add(helloWorldTextField);

        this.kernal = new kernal();

        sms_listener_thread sms = new sms_listener_thread(this.kernal);
        sms.start();
        //sms.stop();

        kernal.send_info();
    }

    public boolean onClose()
    {
        Dialog.alert("Closing Application");
        System.exit(0);
        return true;
    }

}
import java.io.IOException;
import javax.microedition.io.Connector;
import javax.microedition.io.Datagram;
import javax.microedition.io.DatagramConnection;

public class sms_listener_thread extends Thread {   

    private boolean _stop = false;
    private DatagramConnection _dc;
    kernal kernal1;  

    public sms_listener_thread(kernal kernal1){
        this.kernal1 = kernal1;

    }

    public synchronized void stop() {
        _stop = true;
        try {
            _dc.close();
            // Close the connection so the thread returns.
        }
        catch (IOException e) {
            System.err.println(e.toString());
        }
    } 

    public void run() {
        try {
            _dc = (DatagramConnection)Connector.open("sms://");
            for(;;) {
                if ( _stop ) {
                    return;
                }
                Datagram d = _dc.newDatagram(_dc.getMaximumLength());
                _dc.receive(d);
                String address = new  String(d.getAddress());
                String msg = new String(d.getData());
                System.out.println("DEBUG: sms_listener_thread Message received: "+ msg);
                System.out.println("DEBUG: sms_listener_thread Message from: "+ address); 

                this.kernal1.destination = address;
                this.stop();
            }
        }
        catch (IOException e) {
            System.out.println("DEBUG: sms_listener_thread Cannot open SMS connection");
            System.err.println(e.toString());
        }
    }
}

Bump

Any thoughts or do you need more information?

Tags: BlackBerry Developers

Similar Questions

  • Today I imported recently an android project in my workspace in eclipse android 4.2.2 then when I run the application it is show Eroor: unable to solve the target 'unknown target problem Android android-7 "tru."

    Eclipse SDK

    Version: 4.2.2
    Build id: M20130204-1200

    When I right click on the app and clcik as run as application Android Iam see following errors: -.

    The path location type Resource Description
    Is only permitted to line /tru system AndroidManifest.xml 20 problem with lint Android apps

    The path location type Resource Description
    Is only permitted to line /tru system AndroidManifest.xml 20 problem with lint Android apps

    The path location type Resource Description
    Unable to solve the target 'unknown target problem Android android-7 "tru."

     

    including AndroidManifest.xml is as below:

     

     


    http://schemas.Android.com/APK/RES/Android ".
    package = "com. Tru.
    Android: versionName = "3.47" android: versionCode = "073434" >



    Android: largeScreens = "true".
    Android: anyDensity = "true" / >





    Error: it is only allowed to the system applications

     

     

    A number of permissions of the Android app is not supported. The impact of these unsupported features varies.

    Visit this link and check the authorization of any authorized all in porting the app... If the permissions that your application requires in the right list you might need to make some changes in your application

    https://developer.BlackBerry.com/PlayBook/Android/apisupport/unsupportedapi_playbook_app_permissions...

  • I have several websites in Muse. Everything was fine until last night. When publishing to Business Catalyst I get a message, teling me the following: unknown authentication problem - shared unknown error: 80. What should do?

    I have several websites in Muse. Everything was fine until last night. When publishing to Business Catalyst I get a message, teling me the following: unknown authentication problem - shared unknown error: 80. What should do?

    Hello

    To resolve this problem, you will need to disconnect muse and connect again.

    Here are the steps to the disconnection of Muse:

    1. help > log out.

    2. Once signed on restart Muse (please sign using Adobe ID if she invites to connect)

    You should be all set.

    Concerning

    Vivek

  • unknown device problem

    After I intalled all the drivers for my HP Pavilion Notebook - 15-p112ne OS win pro 8.1

    It was still unknown device please help me solve this problem

    HP wireless button Driver:

    Windows 8 (32/64 bit)

    http://ftp.HP.com/pub/SoftPaq/sp58501-59000/sp58720.exe

    8.1 for Windows (32/64 bit)

    http://h30639.www3.HP.com/pub/SoftPaq/sp63501-64000/sp63564.exe

  • R31 - unknown device problem

    I did a reinstall of Windows XP on my A31 and everything is fine, except for a problem of "unknown device" in Device Manager. The information shows that the unknown device on Intel 82801 CAM LPC Interface Controller - 248 C.

    In the past, I used a Thinkvantage system update utility to easily identify driver problems, but apparently, Lenovo saw fit to put an end to this tool.

    I've updated the BIOS, installed utilities from Intel chipset that I could find in the drivers/download section of the Lenovo support site - nothing did the trick so far.

    Overall, I'm looking in vain to understand what is involved. Also, the infrared driver seems to be part of this interface controller, but is shown as having no problem driver and working properly.

    Thoughts?

    OK, so maybe it wasn't the most scientific way to solve the problem, but it worked. I continued working through more all the drivers that I could possibly Lenovo download and kept pointing to different folders through the interface to 'update driver' in Device Manager. Finally, we found something he liked, which indicated "Thinkpad PM device.

    Don't know if this will help anyone else having this problem, but there is to go.

    Thank you!!

  • thread problem

    Thank you all, I can step vy

    as the last message

    I want to get the image to the server

    simply, I just tested the 17times loop

    while( i++ < 17)
    
    {
    
      Field imageField = new WebBitmapField(url)                            //Coderholic - Blackberry WebBitmapField  add(imageField);
    
    }
    

    He comes back: too much wire errror

    I finally found "a single application can create up to 16 sons."

    where should I turn off the wire in webBitmapField

    For each field, this class creates a new Thread that does not close until the image is uploaded or it encounters an error. You can't 'turn off' the thread. In the event where you start your loop with i == 0, the problem is that you create 17 WebBitmapFields and thus too many Threads, basically all at once.

    I suggest you to write your own worker Thread that will load the images one after another. Once finished, he can remind the event with a Runnable thread to create normal BitmapFields using images (for now). (If not, he can do that for each image as it comes.) You can use pieces of the WebBitmapField code as models for your own thread. (After all, Coderholic wrote: "Do not hesitate to use," then go for it!) )

  • Thread problems

    I'm trying to start a thread after clicking a button from settings in the threads of editfields that are on the page.

    The thread is used to access a php script that checks the values on a data base.

    This causes the Simulator just close, no error nothing:

    final EditField login = new EditField("Name: ",
                    "", 20, EditField.EDITABLE);
            final PasswordEditField password = new PasswordEditField("Password: ",
                    "", 20, EditField.EDITABLE);
            ButtonField submit = new ButtonField("Submit");
            FieldChangeListener submitListen = new FieldChangeListener() {
                public void fieldChanged(Field field, int context) {
                    String name = login.getText();
                    String pass = password.getText();
                    LoginRunnable log = new LoginRunnable(name, pass);
                    Thread th = new Thread(log);
                    th.start();
                }
            };
            submit.setChangeListener(submitListen);
    

    Is there a better way to do it?

    Hello

    Add debug output and debug your application to find the code that kills the Simulator.

    Maybe then you will find the problem.

    Kind regards

    Jochen

  • OBIEE hit 11.1.1.7 thread problem

    Hi all

    How to check thread hit problems.

    It records any newspaper on biserver journal about Struck threads

    I checked the console > biserver > tab followed, but I see none here

    Help, please

    in the paper, in my view, that this occurs when the bisystemuser password is out of sync because users won't be able to connect then you will see these errors

    SecurityService::assertUserWithLanguage [OBI-SEC-00015] could not find the user in the identity store

    [2014-05-19 T 18: 39:41.482 + 02:00] [bi_server1] [WARNING] [OBI-SEC-00046] [oracle.bi.security.service] [tid: [ASSETS].]

    but I think in your case, users can connect to the right? the only thing is, it crashes when executing the graphics? Have you try applying the latest patches? This phenomenon happens for only one report/chart or for each graph u run does crash?

    you have all implemented in it outside the default authenticator LDAP authentication?

  • duplication Oracle10g tnslistener thread problem

    Hello



    Database: Oracle Database 10 g Enterprise Edition Release 10.2.0.1.0 - 64 bit Production



    System: IBM AIX 5.3 64-bit



    I have a strange problem.



    Sometimes, I find that my service cannot create a new connection to the database, and all existing connection without problem. I think that it maybe something wrong with tnslistener, so I order of aix and the type of connection, here is the result:



    bash-3. $00 ps - ef | grep tns

    Oracle 581872 1306654 0 19:42:34 - 0:00 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr EARPHONE-inherit

    Health 1278132 1314848 0 09:44:11 pts/2 0:00 grep tns

    Oracle 1306654 1 0 Nov 02-0:16 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr EARPHONE-inherit



    There are two tnslistenre thread system! Why? And the thread with 581872 pid unwanted forked by the thread of origin with 1306654 pid.

    I kill him:

    bash-3. $00 kill-9 581872

    Now, everything is ok.



    Any advice will be helpful for me.

    Thank you.

    See Note MetaLink #340091.1

    Set SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = OFF in the listener.ora and rename ons.config in $ORACLE_HOME/opmn/conf, if it is not used
    OR
    apply Patch 4518443
    OR
    upgrade to 10.2.0.3

    Hemant K Collette
    http://hemantoracledba.blogspot.com

  • Cannot start Thunderbird without hanging and force quit. [Mac] Developed after trying to remove a large amount of emails. Unknown CAUSE (problem gone)

    I made unusable Thunderbird! Whenever I start it now, it immediately crashes and I have to force him to leave.

    I have deleted thousands of emails, file by file and he was fine, but I must have overloaded it with work or something, because it crashed. Now, I can't even try solve the problems, because it does not actually work.

    I reinstalled it - same problem. I tried to open it in safe mode - same problem.

    Help!

    Restart the operating system in safe mode with network. This loads only the basics needed to start your computer while allowing Internet access. Click on your operating system for instructions on how to start in safe mode: Windows 8, Windows 7, Windows Vista, Windows XP, OSX

    You know that this safe mode information is based on knowledge of apple.

  • Pavilion G6-2210sa: unknown device problem - HPQ0004 (Code 28)

    I have a unknown device in my device on the PCI Express Root Complex Manager: ACPI\VEN_HPQ & DEV_0004 ACPI\HPQ0004 into the conduct of a preliminary search, it seems to be for HP 3D drive guard? But as my laptop is not supported no matter what more I can't find the right file. Can someone point me in the right direction? Thank you

    Hello:

    You need this version of the driver for the ID of HPQ0004.

    FTP://ftp.HP.com/pub/SoftPaq/sp64001-64500/sp64144.exe

    One whereby Hüffer post is for the ID of HPQ6007.

  • Thread problem - after getting thread information, not able to change the main screen

    Hi all

    I'm new BB please help me in this issue

    It is that I have a few options in the menu when I click on the first menu. A thread calls its responsibility is to obtain the list of records and change the field with the new record to the screen, but after obtaining records from the internet, I try to extract the field on the Edit screen but application gives null pointer exception.

    in simple words how to change the field of screens according to new information.

    Thanks in advance

    To expand a little more on this answer, only the user interface thread can access the user interface.

    The API provides several methods to the user interface to perform this work, or to synchronize a different thread with the UI thread.

    See UiApplication, invokeLater (), UiApplicaiton.invokeAndWait (), UiApplication.getEventLock)

  • What happened to the thread problem light red import screed?

    I was about to buy the ambient light for use with my items 11 and found this very interesting thread. Where at - it go?

    SG

    Hoping that you will read this thread, please emply some of your messages to your private Message Inbox so that messages from our private for you are not rejected because your private Message Inbox is overflowing.

    Thank you.

    RTA

  • Thread: Problem of development: I have 1600 line query

    The problem of development: I have 1600 line queryy but report generator 1320 lines. But I m cannot create views because many parameters is used in it please give solution how can I paste line 1600 report bulder.

    Yet once, by using functions to replace subqueries or views seem to average achievable.

  • unknown password problem

    I bought a computer laptop compaq armada7800 at a estate sale, it has Windows 98/NT. It has a 'drive-lock' password that nobody knows (the owner died), how I can 'crack' this password?

    Hello

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    See you soon.

Maybe you are looking for

  • Random number

    Hello I want to build the app to get a random number between 200 and 250 How can I do in labview nots I have labview 9 Thank you

  • Independent 5 GHz band Aironet 1041

    Hello I do a base installation of X 8 of 1041. All devices must connect to the 5 GHz band. The specification of the 1041 says its supports 802.11 a/b/g/n on the 2.4 Ghz + 5 Ghz band. When you configure the 1041 I see only the options related to the 2

  • ASA5510-CISCO871 DOWN IPSEC TUNNEL

    Help! Site between ASA 5510 and 871 ROUTER ipsec tunnel site cannot be established. Config and debug info: ASA:1.1.1.26 external ip address1.1.1.254 the gateway ip3.3.3.0 LAN network3.3.3.250 ip LAN3.3.3.20 PC in LAN ROUTER 8712.2.2.226 external ip a

  • Display driver problems

    Whenever I start, I can't launch the heavy graphics programs. It gives me an error of shader 2.0. If I update my drivers and reboot and I get the same error. I tried several different versions of drivers, each time as a "clean" installation The only

  • I bought the full package of the creative cloud, but my product is not active