On the startup problem Autorun feature

Hello

I'm having a strange question, try to have my request to start the boot device.  I put the flag in the project settings and it would start to my application, but it would be sort of a State of 'sleep' - it will appear in the list of running applications, but in fact it does not work in the background until opened by the user.  I couldn't find any post on this forum describing a similar problem.  Do you have any idea what's going on?

I write a simple application to test what's going on, but he died with 156 error - application is not responding.  It looks not to I'm blocking the event thread, so I don't know why it would not.

Here is the code example.  Do you see something wrong?

/*
 * AutoStart.java
 *
 * © , 2003-2008
 * Confidential and proprietary.
 */
import java.util.Timer;
import java.util.TimerTask;

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

/**
 *
 */
class AutoStart extends UiApplication implements FieldChangeListener {

    private ButtonField mExitBtn;
    private LabelField mCntLabel;

    private Timer mTimer;

    private int mSecondCount;

    public static void main(String[] args) {
        System.out.println("AutoStart:  entered main()");

        ApplicationManager mgr = ApplicationManager.getApplicationManager();

        System.out.println("AutoStart:  waiting for system to initialize");

        while (mgr.inStartup()) {
            try {
                Thread.sleep(2000);
            }
            catch (Exception e){}
        }

        AutoStart theApp = new AutoStart();

        System.out.println("AutoStart:  entering dispatcher");

        theApp.enterEventDispatcher();
    }

    AutoStart() {    

        System.out.println("AutoStart:  creating main screen");

        // MainScreen is the basic screen or frame class of the RIM UI.
        MainScreen mainScreen = new MainScreen();

        mainScreen.setTitle(new LabelField("AutoStart Test", 0));

        VerticalFieldManager vfm = new VerticalFieldManager();

        mCntLabel = new LabelField("0:00", Field.USE_ALL_WIDTH);
        vfm.add(mCntLabel);

        mExitBtn = new ButtonField("Quit", DrawStyle.HCENTER);
        vfm.add(mExitBtn);

        mExitBtn.setChangeListener(this);

        mainScreen.add(vfm);

        mTimer = new Timer();

        System.out.println("AutoStart:  scheduling timer");

        mTimer.scheduleAtFixedRate(new TimerTask(){
            public void run() {
                timerEvent();
            }
        }, 1000, 1000);

        //show screen
        pushScreen(mainScreen);
    }

    private void timerEvent() {

        System.out.println("AutoStart:  timer event 1");

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

                System.out.println("AutoStart:  timer event 2");

                ++mSecondCount;

                int minutes = mSecondCount / 60;
                int seconds = mSecondCount % 60;

                String strMin = String.valueOf(minutes);
                String strSec = String.valueOf(seconds);

                if (strSec.length() == 1) {
                    strSec = "0" + strSec;
                }

                mCntLabel.setText(strMin + ":" + strSec);
            }
        });
    }

    public void fieldChanged(Field field, int context) {
        if (field == mExitBtn) {
            System.exit(0);
        }
    }
}

Words KushBB is in my opinion, incorrect.

With the help of another entry is a solution often proposed, but also brings its own problems.  And in this case, it is not the reason for this problem.

The problem here is that you are trying to do a job on the thread of events, specifically, you wait until the device is ready.  There was an article that made this kind of delay, but he did it in a background Thread.  You do this in main().

I suggest instead to use this article that describes how do to wait until the device is ready to accept the interaction of your screen, without the wait loop.

http://supportforums.BlackBerry.com/T5/Java-development/write-safe-initialization-code/Ta-p/444795

This article presents similar information:

http://supportforums.BlackBerry.com/T5/Java-development/detect-system-availability-on-startup/Ta-p/4...

A lot of people will tell you you need to do your initialization using another entry.  This is not true.  There are good reasons to use another entry for this treatment, but it is not applicable in all cases and is certainly not in this case.

Tags: BlackBerry Developers

Similar Questions

  • Help with the startup problem. Start load page never stops

    This morning, I found a window on my PC (vista home prem SP 3) who said he had a problem with my departure upward. And that characteristic fixed departure could not fix it. I tried to restart my PC and he had charge green/starrt infinite loading bar. I tried to start in safe mode, but can apparently do not have start that is. I grabbed my system recovery DVD, tried to have either boot with the DVD or are looking for a repair-start feature. But when I try to start from the DVD he wants to restore then only of factorry. Did I miss something there at - it something I can do? I don't want to do a restore with since I have given, I don't want to lose and he's going to take me with all my software and udates about 1 week at least for good install and configure my PC.

    Hi Henry,.

    ·         What is the exact error you see on the screen?

    ·         You did changes to the computer before the show?

    Check to see if the following is useful.

     

    Method 1: Remove non-essential external devices and reboot the computer.

    Method 2: Repair of the boot from WinRE (Windows Recovery Environment) mode. Follow the article mentioned below, to do.

    Startup Repair: frequently asked questions

    See also:

    What to do if Windows does not start correctly

  • HP p6-2464eo with the startup problem!

    Hello!

    I read somewhere this problem s with usb 3.0 to start from, but with my computer is usb 2.0, a problem also.

    It s works fine when the computer is operational in the running, but I want to change my hard drive and I give up soon!

    I tried to make changes in the bios, which can help the Don t at all.

    Anders

    I think you must disable secure boot and select mode in the BIOS to boot from a drive flash, DVD, or USB.

    Step 1 in the above link.

    Then follow the instructions in step 2 to select the desired legacy boot device.

  • Pavilion dv7: Press esc at the startup problem

    I get the Press esc for boot menu message and it crashes it whenever I try to start. I can make it work if I remove the battery and hold down the button to start for 10 seconds or more. I know that it is supposed to discharge the static electricity while doing this, but what else who don't.

    I'm shocked that a seemingly independent problem could cause such a problem but after swapping of batteries for laptops with a friends same battery, my laptop has no start-up problems. I tried several times and no problems. It seemed to be too quickly into the routine of starting for something like that, but I guess that my problem is solved.

  • How to solve the startup problem

    I have a few things how changed so that now when I start every program wants to start using Word.

    Restore things to normal

    Hello

    This should help you.

    'Restore. Association of exe in Windows 7/Vista after incorrectly associating it with another program"

    http://www.Winhelponline.com/blog/restore-exe-file-Asso-Windows-7-Vista-incorrectly-associated/

    "When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program.

    Run the Mr.Fixit here or you can use the manual method it y to correct yourself

    http://support.Microsoft.com/kb/950505/en-us

    And also, read information please.

    'Change the programs that Windows uses by default'

    http://Windows.Microsoft.com/en-us/Windows7/change-which-programs-Windows-uses-by-default

    See you soon.

  • BIG problem - the startup information is missing

    Hi, I tried to install windows vista on my computer and I don't have time. Currently, my C drive is fully formatted, I have no OS and cannot start all discs, I get bootmgr is missing error.

    By pressing F2, F11 or F8 does not work because I still got the message "bootmgr is missing".

    Is it possible to get at least the computer so I can try to fix it?

    ·       Do a startup repair, boot from the disk Installation of Windows Vista genuine (or one that you can borrow from someone) or a recovery disc.  Here is the procedure: http://www.bleepingcomputer.com/tutorials/tutorial148.html.  You may need to change the BIOS to do first the CD drive in the boot sequence to boot from the CD.  To do this, hold the screen that tells you the key F to push to enter the menu start or start of installation.  Push it quickly. Make the changes, save your work and exit.  Put the CD in the drive and reboot.  When you are prompted, press any key to boot from the CD.

    If you do not have a floppy disk, you can make a bootable recovery disk by using http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/ with burning software like:http://www.snapfiles.com/get/active-isoburner.html and, of course, a blank CD.

    If this does not resolve the problem, try the following:

    To run the Bootrec.exe tool, you must start Windows RE. To do this, follow these steps: (you need an Installation of Vista disc to do that)

    1. put the Windows Vista installation disc in the disc drive, and then start the computer.

    2. press a key when you are prompted.

    3. Select a language, a time, a currency, a keyboard or an input method, and then clickNext.

    4. click onrepair your computer.

    5. click on the operating system that you want to repair, and then clickNext.

    6. in theSystem Recovery Options dialog box, click command prompt.

    7 TypeBootrec.exe and press ENTER.

    Note If rebuilding the BCD does not resolve the startup problem, you can export and delete the BCD, and then run this option again. In doing so, you ensure that the BCD is completely rebuilt. To do this, type the following commands at the command prompt Windows RE:

    ·       bcdedit/export C:\BCD_Backup

    ·       c:

    ·       Boot CD

    ·       BCD attrib s h - r

    ·       Ren c:\boot\bcd BCD.old

    Bootrec /RebuildBcd

    If you do not have the disk, try EasyBCDhttp://neosmart.net/dl.php?id=1 and see if that helps the problem.

    Good luck and I hope this helps!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • New problem z50 - 75 wireless? Startup problem

    Hello

    I had an another hp laptop which had a problems but the know-how could not fix it so they give money and I brought another Hp 4 days but then she had to be exchanged because of defective. Currys and PCWORLD even gave, but the problem kept pass. So I just paid the HP one and brought 3 days LENOVO Z50-75 it y a. the first Hp laptop, I had, had dns clients warnings in Event Viewer when you use wireless. Same thing on the new computer hp laptop. This problem still occurs in the LENOVO one too. These events started in Windows 10 for all laptops hp and lenovo. My computer laptop lenovo came with windows 10 in any case. So either it's a bug that should be fixed by a new update for the network adapter needs to be released. Computer laptop lenovo has Qualcomm Atheros the old hp laptop realtek the new computer hp laptop that was defective was and intel double wireless broadband and the same edition, DNS CLIENT EVENTS 1014 WARNINGS are still happening. This is definetley not my ISP fault because I replaced the router, more they found nothing on a week 2 diagnostics test on my internet. SO I just want to say lenovo that if there is a way you can fix this. Another thing is that after installation WIN10 threshold 2 on Lenovo Z50-75 when starting of the laptop it shows the logo screen once then black lenovo and then black screen again, then it boots. I have also all the latest updates. So if there is a way guys can fix that also. I'll post this in the microsoft forums too if they can help. Thank you

    Hi I managed to solve this problem by disabling the DNS CLIENT service, but always the startup problem also happens when I stop or restart the cirlce logo going arouns the shows as usual then flashes then closed restartsor and the same thing happens in the Welcome screen it flashes (black screen for a second), and goes after UPDATE of TH2

  • Startup problem blue screen that seems to be associated with BHDRVX64

    I have a laptop model Dell Inspiron N5110 running Windows 7 Home Premium 64 - Bit.  I have Norton Security Suite running - seems to be normal.  When I started my pc this morning, I got the dreaded blue screen of death.  A window will appear which indicates that there is a startup problems and offers several options to correct the startup problem.  One option is to run a startup repair program.  I tried and failed, then it has proposed restoring to a previous date program.  It does not work.  He suggested then reload the Windows program by providing more options of Windows rereloading.  I'll try the drive backuo system I created when I got the new computer-, but then, for reasons unknown, my pc suddenly decided to restart all of himself and it started normally.  Happy, happy.  But then a window pops up that says my computer has a device problem that has been identified as "ROOT\LEGACY_BHDRVX64\0000" she added that "BHDRVX64" was absent, does not, or that he needed a driver. Okay now my pc works normally, but I'm afraid to turn my pc off because this problem seems to be associated with start-up. »

    HELP, HELP. Any suggestion would be appreciated. Thank you. Bobbysan 70

    This program is part of the Norton Security software, so I would like to uninstall and reinstall.  For more information, see with Symantec.  Here is a link to the Google search, I did, FWIW.

    http://www.google.com/webhp?sourceid=toolbar-instant&hl=en&ion=1&qscrl=1&rlz=1T4TSNP_enUS464US464#hl=en&sugexp=les%3B&gs_nf=3&cp=8&gs_id=0&xhr=t&q=BHDRVX64&pf=p&tbo=d&qscrl=1&rlz=1T4TSNP_enUS464US464&output=search&sclient=psy-ab&oq=BHDRVX64&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=89c683d2e84ef3a4&bpcl=38625945&biw=768&bih=460&ion=1

    When you got your system back as you, I invite you to buy an external hard drive, and a good backup 3rd party program. You can configure it to automatically do everything in time and frequency of your choice. 1 TB external hard disks around $ 70 these days and a very good FREE backup program corresponds to the Easeus todo backup free of charge that you can download from

    http://www.todo-backup.com/products/home/free-backup-software.htm . Who can make you save a lot of time and frustration, the next time something like this happens. Sooner or later, it happens to all computers for one reason or another.

    Good luck.

  • Boot Manager Windows problem asit always starts with a selective startup under the Startup tab

    Whenever I start my laptop I get Windows boot manager options in which it highlights the option of windows 7 and I have to press Enter and continue with this option selected.

    I tried to change my boot options in msconfig, but once again the configuration back to selective Starup of Normal startup. Also I disabled some startup applications, but even changes are not get saved when I restart the system after changes. My touchpad no longer works between the two, and then it starts to work. My left and right keyboard arrows keys do not work.

    My change in normal startup is get back on selective startup.

    Please help me to solve these issues.

    Hello

    It is very possible that this is for the reason that you have corrupted files on your system. System File Checker will scan your system for the missing, corrupt or damaged files. In addition, it will try to correct them. If you have changed the important system files, System File Checker will be - make sure you make backups of them!

    How to run the System File Checker

    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    I would also recommend that you run the Startup Repair to the problems that Windows may be displayed when you start your computer.

    How to run the Startup Repair tool

    http://Windows.Microsoft.com/en-GB/Windows7/products/features/Startup-Repair

    Thank you

    Legaede

  • Flashing question mark in the Macbook Pro Retina early 2015 at startup problem

    I have the 128 GB of Macbook Pro retina early 2015 model. I bought my macbook, the year last January 2015. I am just now having problem with my mac. When I'm trying to boot my laptop it shows the flashing question mark and it does not start after that. For a while it worked, but after the update the laptop is never again.

    After reading all the articles related to this issue and even after trying it the entire process for the departure of mac. I'm not able to start.

    I tried all the normal recovery process in the process of recovery of the internet, but still it does not work for me. When I select the disk utility in the dialog box, the drive does not appear here, so I can't erase and start to reinstall the operating system.

    What should I do now? I was looking for OEM SSD, but it's very expensive. with this prize money of (here in INDIA RS - 50 k) I can get the Macbook Air.

    If please guide me on how to start the mac or what do I do next?

    Thank you.

    Frank Bsu

    We have no way of knowing exactly what you have tried that doesn't work unless you tell us. A flashing question mark boot means that your Mac is unable to locate a startup disk to boot from.

    If you haven't tried... start your Mac holding the key Option. That should launch the boot window manager have been, you can select the startup disk, and then click on restart.

    If this does not help, you will need to take the Mac for the service.

    If a flashing question mark appears when you start your Mac - Apple Support

  • message from startup problem: imac photos: er zich een has doing voorgedaan bij het recovering bevoegdheden van (an error occurred in restoring the powers)

    message from startup problem: imac photos: er zich een has doing voorgedaan bij het recovering bevoegdheden van (an error occurred in restoring the powers)

    Do you mean, there is an error message about problems with access rights? (toegangsrechten?)

    Where your photo library is stored? In your pictures folder, or on an external drive?

    You share the photo library with another user?

  • Value problem of features for the INF with the winpk filter installation.

    Hello

    I use an inf to my driver installation using properties of LAN, but I am facing the following problems during the installation of my driver with the installation of the winpk filter:

    All these changes are made with windows 2008 R2 64-bit Server.
    Pharmacodependance1:

    Filtering software 1) install winpk.
    (2) after the installation of the filter to winpk, I am trying to install my driver certified by using properties of LAN, but it is not properly installed. Inside the LAN properties, it shows two icons of the winpk filter installed on my system instead of one.

    Solution of two icons of filetr winpk:

    (1) we changed the value of characteristics in the 0 x 40000 to 0 4410 INF. With the help of 0 x 4410, it installed correctly through LAN properties.

    (2) we made a few changes in the inf file associated with the certification and we do a build certified "a" and install it using the APPLICATION to DISABLE DRIVER SIGNATURE properties.

    (3) after installation winpk filter and committed a few changes in the INF as characteristics = 0 x 4410, installed correctly.

    But when we tried to install using this inf file(Characteristics=0x4410), without winpk filter driver is not correctly installed, and settings in not correctly updated in the registry.

    problem2:

    (1) when I made an installer using the same inf that contains the features = value 0 x 4410 and install it after the installation of winpk, my driver settings is not added to the registry and also in the LAN properties there is no all the icons just linked to my driver.

    > using the same inf file, it was installed via LAN properties.

    Note: when I installed the same installer on windows 64-bit computer, it installed correctly and icons also comes in the LAN properties, but all settings is not updated in the registry.

    Please inform the desired solution and the behavior of the different characteristic values.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

    It will be useful.

    Let us know if you encounter problems under windows in the future. We will be happy to help you.

  • Error: "Windows cannot start because of a configuration of the disk of the computer problem" in computer Dell Dimension 2400 Windows XP startup problem.

    Original title: problem starting on a Dell Dimension 2400 - how to set up the drive with a keyboard.

    I have a Dell Dimension 2400 with Windows XP, start, he can't go to the home screen, so I can't use the suggestions to start right click.

    The error message indicates "Windows did not start because of a configuration of the disk of the computer problem".
    "Cannot read disc startup selected." check material stand of disk and the path.
    How to set up or fix this problem with a keyboard

    Hi MarieButler64,

    You did it of any material changes or software on the computer before this problem?

    You can follow this link & check if the problem persists:

    Error message: "Windows did not start because of a configuration of the disk of the computer problem.

    Hope the helps of information.

  • NTOSKRNL.exe problem during the startup of windows xp on a dv5000i Pavilion

    Hi all!

    I have a Pavillion dv5000i

    I get an error message mentioning a NTOSKRNL. Order EXE corrupt during the startup of windows xp.

    I can't boot from a disc XP system either.

    Could this be a HW problem?

    I've extracted the original HD and put it in a usb interface

    I can read it without problem with another PC (so the HD should not be the problem)

    Thank you all

    Kind regards

    Gino

    NTOSKRNL is a software, and it must be there for the machine to start.  The recovery discs should fix this.

  • How to "Windows did not start because of a configuration of the disk of the computer problem. Could not read the selected startup disk... "on a netbook without a CD/disk drive?

    I did a lot of research and unfortunately havnt found a road toward the front of the detroit to a fix. Long story short... I installed Jolicloud as a dual boot with windows xp on netbook gateway of my wife. This netbook has no cd/dvd drive. Jolicloud wanted to screw up the startup option to not allow me to boot into windows, going Strait to jolicloud without option of windows. I tried to change it via the "menu.lst" and Grub.cfg file (I think) the only value I changed was I think 'boot... ". ' value between 1 and 2. When I restarted, then finally got a startup list (although I don't think that my modification of the value gave me the list, I had already installed manually "Grub" via the cmd prompt. I should have just restarted from there without changing anything else... because when I chose 'windows xp' in the start menu... He gave me a black screen and kept going back to the start menu. Then, I tried the "Vista loader" option... hoping that it would some how solve my problem... He asked me if I wanted to run a repair any. I agree with him and when he finished he told me that there is no enough space on the hard disk to copy the files (or something like that) then it froze kind of there. I had to do a hard reboot after that that it froze, then I got the code "Windows did not start because of a computer disk configuration problem. Could not read from the selected boot disk.  check the hardware path and startup disk, please check the windows documentation about hardware disk configuration and your hardware for more information reference manuals.

    Again, I have no drive cd/dvd on a netbook... IM assuming that im going to have to return a key USB with windows boot info to load the Manu F2 at startup... But I do not know... Help, please. Thank you

    Hello

    Follow method 1 and 4 in the article below and check if that helps resolve the issue.
    Error message: "Windows did not start because of a configuration of the disk of the computer problem.
    http://support.Microsoft.com/kb/314477/en-us

    I hope this helps.

Maybe you are looking for