Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
Accepted Solution

Getting exception on reboot the device.

[ Edited ]

I have made an application in which multiple threads are running. Its works fine when i install the build. But when i reboot the device then i am getting the exception.

 

uncaught exception application (150) is not responding process terminated blackberry.

 

Can you please help me to solve this issue and reason why i am getting this on reboot the device.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Getting exceptino on reboot the device.

it usually means that you blocked the event thread of the device, for example with networking.
see
http://supportforums.blackberry.com/t5/Java-Development/What-is-the-Event-Thread/ta-p/446865
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

Re: Getting exceptino on reboot the device.

I am not opening the UI of application. Application start multiple thread on reboot the device. So How event thread blocked of the device,

 

On reboot the device i am calling mutiple webservice. Please help me...

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Getting exceptino on reboot the device.

check if you follow these guidelines:
http://supportforums.blackberry.com/t5/Java-Development/Detect-system-availability-on-startup/ta-p/4...

also ensure that all threads are launched by using start()
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

Re: Getting exceptino on reboot the device.

This class execute on reboot the device.

 

public class SBextends net.rim.device.api.ui.UiApplication implements
        SmsRecordListener {

    public SB() {

        try {
            CheckRequest _thread = new CheckRequest();
            _thread.start();
        } catch (Exception e) {

        }

    }

    public class CheckRequest extends Thread {

        public void run() {
            // Creates an instance of the system’s application manager.
            ApplicationManager myApp = ApplicationManager.getApplicationManager();
            while (myApp.inStartup()) {
                try {
                    Thread.sleep(20000);
                } catch (Exception e) {

                }
            }

            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    startUpProcessing();
                }
            });
        }
    }

 

and starting the thead like this..

 

new GeoFence().start();
        // new PhoneCallListener();
        // Phone.addPhoneListener(pcl);
        new OutboundSms();
        new InboundSms().start();
        new WebsiteRestrictions().blockWebsites();
        // 8696699897
        // CodeModuleManager.addListener(this, this);

        new MainThread().start();
        new PhoneCallLogsListener();
        new MyContactListener();
        try {
            MyEventListener _eventListener = new MyEventListener();
            _eventListener.init();
        } catch (Exception e) {
            System.out.println("Exception at::" + e.toString());
        }
        
        try {
            MyMemoListener memoListener = new MyMemoListener();
            memoListener.init();
        } catch(Exception e) {
            System.out.print("Exception at::" + e.toString());
        }
        
        new MyPhotoListener();
        MyEmailListener mel = new MyEmailListener();
        mel.init();

        GPSTimerTask timer = new GPSTimerTask();
        GlobalVars.gpsTimerTask = timer;
        timer.start();

        BlockPhoneThread bt = new BlockPhoneThread();
        bt.start();

        CheckBlockTime ct = new CheckBlockTime();
        ct.start();

        MonitorThread mt = new MonitorThread();
        mt.start();

 

Please check and let help to solve this.

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Getting exceptino on reboot the device.

[ Edited ]

You said this:

"I am not opening the UI of application. Application start multiple thread on reboot the device. So How event thread blocked of the device,"

 

You are correct that you are not doing UI, but you are using the Event Thread:

 

            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    startUpProcessing();
                }
            });

 

Review startUpProcessing() code, I suspect there is some blocking code in there.  I would change the code above so that you invoke it using a standard Thread, and make sure you only use the Event Thread when you need to.