Odd screens RuntimeException

Using Eclipse, targeting devices and better 8330, OS 4.5 & better...

import java.util.Vector;
import net.rim.device.api.ui.UiApplication;

public class ScreensApp extends UiApplication {

    public static Vector screenV;

    public ScreensApp() {
        screenV = new Vector();
        pushScreen( new Screens2() );
    }
    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        ScreensApp app = new ScreensApp( );
        app.enterEventDispatcher(); //point of no return
    }

}
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;

public class Screens2 extends MainScreen {

        public Screens2() {

            if (ScreensApp.screenV.isEmpty()) {
                try {
                    Dialog.alert("screenV is empty!");
                } catch ( RuntimeException e) {
                    System.out.println(  e.toString() );
                }
            }

            LabelField label = new LabelField( "screens2 label" );
            add( label );

        }
}

These two classes are the essence of a problem, in that I am running.  I'm developing a simple, single-threaded (no requirement of network) application. The dialog box throws a RuntimeException [1], and I don't know why.  As Screens2 is pushed in the screen of ScreensApp stack and not running in parallel with ScreensApp, I thought he had run on the thread of the event and I wouldn't need to use invokelater or syncronize to get alert dialog to display.  If it's wrong, can someone please explain why (and how) that became a multi-threaded application (or whatever else happens to cause the RuntimeException)? Thank you in advance!

[1] the error is "java.lang.RuntimeException: pushModalScreen called by a thread of non-event."

Your problem is that you are trying to instantiate a modal dialog (your alert dialog box) to the constructor of the class Screens2. At the time when this constructor is running, the application has not yet entered the event dispatcher.

The app is not in the dispatcher of events up to this after the Screens2 object is instantiated.  Get rid of the Dialog.alert here in the constructor.

Tags: BlackBerry Developers

Similar Questions

  • iBook G4 with the odd screen issue

    I use my iBook G4 since 2008, os x 10.4.11 and never had any problems with it. Last year, I was ready to use it and when I turned it on, the screen was 'weird' (as you can see in the photo below):

    There are still all the sounds while starting up, but after the logo, it shows a pure blue screen and nothing else happens. I tried to boot with a CD of Ubuntu and even if it works, the screen is divided in two, and it is difficult to see what is on the screen (some letters looks like stuff and big white squares). I can still access all my files on it and even play music/videos I have here, but using it like that, it starts to get hot and the screen worsens. Has tried to buy a cable for the screen external but also got no results.

    No idea of what the problem is, or if there is a way to fix it? I have no installation CD because it came from Japan as a gift from someone who bought to another person.

    Thank you.

    Honestly, given the current value of this machine, not worth fixing.

  • A positive review on the V3 771 g 9809

    Many come to forum questions and receive help. I still want to give positive results on the laptop that I chose.

    Model: Aspire V3 - 771 g-9809

    First of all. It is a portable large Due the screen 17.3 ". She is described as a replacement of officeor mobile desktop. Newer models have been improved with changes to the kernel and the bowels (units pre-installed windows 8).

    First of all, I need to say that the current reviews and benchmarks there are no where near reliable. The sad truth is tomshardware and many sites did not include unity that they received, the fact there bi - GPU, and when they compared the games, clearly, they have therefore, using GPU and not the default HD4000 energy saving GT650m. I assure you, run 3dmark in all 3 formats and GPU will amaze you.

    GAMES:

    The unit uses 2 GPU. The HD4000 and the GT650m. By default (with the standard version drivers), the device will use the HD4000. IF you have the latest Nvidia drivers for it, some games are in the profile list of games, and those who will move to the use of the GT650m. You can add programs to the list, or force the laptop to use the GT650m for the high end games.

    I installed Battlefield 3 THE on the laptop. He ran flawlessly on the spot at the appropriate resolution. Locked capsule rate of 60 frames per second, with a few depressions in the places of strong thickness, but nothing below smooth frame rates. The only downside is the loading time can be long due to the upper part of the Tower standard RPM hard disk. However, if running off a Solid State drive secondary, load times are quick (this game is infamous for the slow charge).

    I am an Alpha tester for Final Fantasy XIV Online: A Kingdom Reborn. He is the alpha of the game again, which by the way, is a lot better now. The laptop the big plays on the spot with all the effects to the top. The downside is that alpha can't stand the odd screen resolution, so it assigns 720 p. However by the HDMI it plays fine on a 1080 p HDTV. Time of loading between the areas are a few seconds.

    Amular Kindoms: Reckoning - Mount. The game is played flawlessly at a constant speed. Loading times are not as long. It supports the resolution of monitors and looks amazing. (use an Xbox controller for this game for ease of use).

    DISPLAY:

    There are units that short coming with a resolution of 1600 X 900 on the unit, but higher supported via HDMI and VGA. However it is far around that if you know where to look, but it makes it a little less visible window 8. The screen is bright. You have total control over the brightness, contrast, color saturation, gamma and other entities via the Intel Board, which controls the GT650m (equivalent to a GTX 640) same settings. The default brightness is too high. You can type up to-3.

    SOUND:

    Output is good, but the small speakers, like many high knees, don't you not bass. Just for video chats and listening to low level. The screen surround is good for headphone Virtualization or use a USB surround headset. I wouldn't mind better speakers built in.

    KEYBOARD:

    The fact he has a num pad, is great. Many controls feature keys. It's not backlit, but that's ok. There is however no lights for NumLock and caps lock shift which he should have. With windows 8 it let's you know when caps lock shift is on.

    FEATURES OF ACER:

    Acer is known for putting things added on their devices. However, they actually use. We can not all use clear.fi so that you can disable.

    Acer device Fast Lane, is very convenient. It's in your quickbar in airplane mode, bluetooth, press the key and you said it if your shift caps lock is enabled or disabled (so there for an app for the lids and num lock on screen is simple).

    The power button icon: It is located on the bar in desktop mode as well. For fast Lock, sleep, Hibernate, restart, and shutdown.

    All the standard Acer apps, backup soft, is also included.

    I love this laptop. It's fast. Play games well. Has a nice big screen. A lot of features. Extra slot Bay for adding a second drive or Solid State Drive. The USB 3.0 ports are blue on the left side, USB 2.0 black on the right side. That way you know which is which.

    If you are not sure, the cost of the laptop with the CPU and GPU power makes good worth. Even more so for students who need to work on classes, but who want to play as well.

    Thanks Diorio

    You made my Christmas... IM my opinion, it is one of the best review ever! Great mate!

    Kind regards

    FReeZA

  • My Apple Watch has a black screen and will not load.  I have it odd, but I can't seem to pair again.  Any ideas?

    My Apple Watch appears to be dead.  The watch screen is black.  I have not matched the watch and we tried pair again, but the iPhone doesn't seem to acknowledge that she and I can't manually pair either.  Any ideas on what's going on?

    Charge the watch first. Instructions here > check your battery and load your Apple Watch - Apple Support

    If necessary, restart the Apple Watch.

    You should force reboot your device as a last resort, and only if it does not. To force the restart your Apple Watch, press in and hold the side button and the digital Crown for at least 10 seconds, and then release both buttons when you see the Apple logo.

    Try the assistance provided in this support article > If your Apple Watch does not load, or it will not turn on - Apple Support

    And here > set up your Apple Watch - Apple Support

    Apple Watch user's Guide will be useful > https://help.apple.com/watch/

  • 7 HP flow display problem - odd of scratches on screen

    I have a problem with a kind of washed out appearance of the screen and lines running in parallel along the long side of the screen (landscape in landscape mode, vertical in portrait mode). This occurs before the device is even started in Windows, for example, that the icon "load" looks like this. Stripes are a ghost image of graphics that are already on the screen, the pixel discoloration so not permanent. What is a power supply problem? -everything (cameras, audio network,) is very good.

    Sorry for this inept description of the problem, if you could point me to a post that describes it better, I'd be very happy.

    BTW, this is a new tablet, delivered yesterday.

    defective... Send it back. If you got a place like office depot you can beable to return it to the store and get another.

  • Unresponsive, black screen with mobile mouse, Odd blue lines during startup (Vista 32)

    First a little background seems to be in order.

    At first my problems seemed associated GPU. Play games would often result in freezes after explosive and muzzle flash effects. The entire computer freezes, pixel green and pink lined the edges of most objects. The only solution was to turn it off and restart it manually.

    The problem persisted in programs like the use of the internet for non flash based sites average.

    In Device Manager, I noticed a few red flags on my graphics card and problems with my drivers (I've updated my drivers recently, but after the initial problems) but I couldn't find a way to remedy the situation.

    Now start is messed up. The loading with green bars screen has shifted but evenly spaced blue lines on the entire screen. It takes a lot of time on this screen before the end. After that, it becomes a blank black screen with only my mouse visible and usable.

    All I can do is to move, clicking does nothing.

    Startup Repair seems to be corrupted on my computer from a previous problem, because it no longer works and a few start up via F8 options I tried show no effect.

    Safe mode shows no difference.

    I'm sure if the GPU is a part of the problem, but I have a nVidia 9800 GT.

    -Thanks in advance.

    By using the Vista recovery disc did fix my computer.

    After some trial and error, with execution of the various options for disk based, I finally got a restore point for work and now my computer is working again (I am actually posting about it right now!)

    I couldn't get startup repair to make no progress, nor could the repair options do much.

    But I was able to restore for some time in mid-August and I hope I can keep this race.

    I still have the blue lines when you start upward, but they appear not anywhere after that. I think that the root of my problem lies in my graphics card because my computer does not show that any evidence that I'm using a (cannot run games) and the device manager says that the device has been disabled due to a problem (code 43).

    But I'll leave a thread in the hardware forum where it belongs.

    Thank you all for your help, it is appreciated.

  • Firefox poster and odd string of text on the bottom of my screen.

    It's the line of text:

    "< overlay < =" "^ =" "p =" "xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> < / overlay >"

    screenshot here:

    http://i48.Tinypic.com/21eyi5v.jpg

    This problem may be caused by an extension that is not working properly.

    Start Firefox in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

  • I'm getting a beep at odd intervals, nothing appears on the screen.

    It is a simple beep, sometimes repeated at an interval of a few times, then stops. I had an accident after one episode do beep, don't know if it is connected.

    End 2009 and 27 inches, Yosemite.

    Hello Bayard,

    Thank you for using communities of Apple Support.

    Please use the support article below to help diagnose the startup sounds that makes your Mac.

    On Mac computer startup tones

    Take care.

  • surf to Propelleheads.se using Firefox causes the screen to go black and PC unresposive.

    My PC works fine and no problem, recently upgraded to widows 10 - no problem. All of a sudden (and oddly enough) I have this error. I need activate the new software of reason on Propellerheads.se site. The site loaded and I saw the image for about 2 seconds and then the screen went black. The music I was paying more (so I knew that Windows was still running) but the PC was insensitive - Alt.Tab, start, Control/Alt/Delete non of them worked. The Sleep button worked but when I woke up Windows screen remains black. Only has a hard reset. So I tried to access the Propellerheads.se with Microsoft Edge - it worked fine. So I uninstalled Firefox, made default client of edge and made the activation. Then reinstalled Firefox, but still the same problem. I have reset the default user agent, delete all the cookies/history etc., Firefox update, run in safe mode, disabled plugins. Yet Propellerheads.se will not load successfully. I'm not running edge - my preference is Firefox - BUT!

    Make music
    across continents and time zones, or just across town

    No problem accessing the site.

    Check this box:

    • see if there are updates for your graphics card disk drivers

    https://support.Mozilla.org/KB/upgrade-graphics-drivers-use-hardware-acceleration

    • Disable protected mode in the plugin Flash (Flash 11.3 + on Windows Vista and later versions)

    https://forums.Adobe.com/message/4468493#TemporaryWorkaround

    • turn off hardware acceleration in the Flash plugin

    https://forums.Adobe.com/thread/891337
    See also:

    Start Firefox in Safe Mode {web link} by holding down the < shift >
    (Mac options)
    key and then from Firefox. Is always the problem?

  • Portege R930 replace odd with ssd in caddy

    Toshiba
    Hello
    I change the optical drive from the with an ssd of caddy. In the bios, it's ok. I see my hdd and odd my ssd. I can not install. He stops at a black screen. I change the order of the bios and it starts on the hard drive.

    I have ´ve had the latest updated bios. If I only put the ssd in the hard disk box, that's ok.

    Help, please

    I think that the ODD port is designed for ODD only. SSD won't work.

  • iMac 27 freezing at random, leaving weird video on screen

    I'm having a problem with my Imac end 2013.

    For the last week or two, he has been randomly freezing upwards. The display freezes just upward to let appear an odd of the fragments of the screen.

    All I can do is hold down the power button and shut down and then restart.

    Downloaded and installed the OS X El Capitan, ran the Apple Hardware test, evrything OK.

    Any other ideas where to troubleshoot them?

    The graph is NVIDIA GeForce GT 1024Mo of 755M

    3.2 GHz Intel Core i5

    Please post a report of EtreCheckof your system. We then look for obvious problems. Please click on the link, download the application and run the report. Once you have the report, please copy and paste into your response to this post.

    If you would like more information on what is EtreCheck, just click on the link and you will find a description of the application.

  • Equium P300-16 t BSOD and black screen after the removal of GPU

    I have a Toshiba Equium P300-16 t and I was getting 90 c - 95B on realtemp so I bought a thermal paste of isopropol alcohol and yesterday that I changed the thermal past on the CPU and the GPU.

    When I booted up after that there was a long beep that lasted a few seconds and my speakers a few cracking apart from that everything was normal, but then after a few minutes my screen is odd (for example, green artifacts) and then went black.

    After awhile, I started my laptop to the top and the same thing happened with the speakers and a beep but the screen was fine. I opened realtemp and became c 65 - 70 c, then restarted because of an Avast update.

    Now, when I turn on my laptop the screen becomes either black or I get a BSOD 0x0F4. I tried to boot from a USB Win7 and repair, but the rest screen went black, so it is not a HARD drive problem as some sites say (from the BSOD error).

    BSOD is mainly a product of serious software problems or it seems due to a malfunction of the equipment.
    I guess this is NOT question related software since you don't touch software (am I right?). So I think you damaged somewhere during the disassembly of the laptop or the removal of CPU and GPU.

    I have no other way for you to control the affected parties? How?
    I guess you need a help from a technician who would be able to analyze the material for potential problems.

  • Satellite Pro P100-188: screen keeps blinking on and off at random intervals tension

    If anyone can help me with my computer so please PLEASE publish it because I have no idea of what is happening to her.

    I just bought a new laptop, a Toshiba Satellite Pro P100 - 188 Dual Core and I'm having a problem with it. Sometimes (not all the time) if the computer is plugged in or not, the screen flashes and repeatedly and then will slow down and its suspicious home.

    I have no idea what's wrong with it, I sent it to the store where I bought to be fixed and they just he sent to me, but the problem persisted. They say they have done tests on the machine and can't find anything wrong with it, but if that were the case, then it only would not have messed up again.

    What is just a software problem? The screen seems to flicker on and off at intervals irregular or not I'm in the middle of using it or not. All the drivers are the latest drivers and I admit now that I'm at my wits end.
    Any thoughts, anyone?

    Hello

    This seems very odd. However, you posted that this problem happens sometimes and not all the time.
    In my opinion I n t think that the software could be responsible for this issue.
    Perhaps one loses the connection cable? But believe me; It's not easy to say what's wrong without diagnostic tests.
    You have suggested that you have sent the unit to the store.

    I recommend you contact Toshiba service partner in your country. Technicians must check the laptop.

  • iMac 24 "(2006) begins with Pink/White pixelated screen"

    Hi, my iMac 24 "2006 frozen while watching a YouTube video. Its done but the video froze. Had to force a shutdown. Handed on to a screen to Pink/White pixelated patterns. It starts, Apple logo, spinning wheel, then a blip, but just a pixelated pink and white screen blank. He went 3 - 4 (screen pixelated) Apple hardware test, 4 passes a Memtest, I got in Single User Mode (screen black green pixelated), Verbose Mode (screen pixelated), Disk Mode target (no problems in this mode) and Boot Mode target (no problems in this mode) with an another iMac. Fix problems with the HARD drive and also repaired permissions. All my files are intact and my OS x (Snow Leopard) seems well intact. It won't start any disk inserted in the drive Superdrive. I can eject the disc with a re - start to hold the eject button on the keyboard or the mouse. I get the startup chime, no beeps, no codes and only get the kernel panic when I try to boot from a CD/DVD disc. Do NVRAM/PRAM rested and reset the SMC have swapped the RAM with new RAM without result. It shows a ZERO GPU issues or fail before that. But he began to act more slow when t switched to firefox as my browser. With only 3 GB of Ram, not surprising. Other odd and random questions like losing all my personal settings one night a week earlier, as well as all my applications at rest again. As when I opened iTunes I got the Welcome screen and start again with iTunes. My files were intact, but even some of my emails had to be searched and imported again. Things like this. I thought of something was about to give... and it was probably the case. I'd hoped to Ram instead of the GPU problem. I do not suspect the GPU at the moment, even if many tell me that it's probably the GPU.  The only thing I found was under "Graphics" bad Apple hardware test it reads 'Unknown Video' in the profile section. No other beeps, errors, codes, etc. other than the screen pixelated and don't pretend to begin the OSX. I know it's 10 years old, obsolete, etc... but he has run nearly impeccable and had a very easy life so far.  My next step is to try an external monitor and see what happens. I need to find and get the right adapter for this first. It's a bit frustrating that I read some say HDD, another RAM, many GPU, some the OSX... but it has passed all Tests of material thin Apple. No error codes, beeps, blinking, nothing. Any other ideas? Thank you.

    DWD

    To connect an external monitor to this iMac, you'll need a Mini DVI to... Adapter (DVI, VGA, or HDMI) .

    See > https://www.google.com/search?q=mini+dvi+adapters

  • Satellite A300 - black screen, Win7 is not booting

    I was working on my Toshiba A300 when suddenly Microsoft Security Essentials detected a threat, after cleaning it asked me to restart my laptop, after restart, it shows only the TOSHIBA screen with F2 and F12 options, but after that, else nothing happens. There is only a black screen, not even a cursor or anything like that.

    Nothing else happens, I tried to insert Win 7 bootable disc to repair the operating system, but my laptop does not seem to start through the drive, I checked the boot order in the BIOS settings, but still nothing, it does not accept the disk/USB nothing at all, it is not even go into safe mode by pressing F8 key continues to beep when I press any key regularly , I'm stuck & useless what to do, kindly help.

    It seems that the system on the HARD disk has been confused upwards and you will need to reinstall new OS.

    > I tried to insert Win 7 bootable disc to repair the operating system, but my laptop does not seem to start through the disk
    Insert the floppy disk. Then power on and press F12. Now, choose ODD (optical disc) as the boot device and press ENTER.

    The laptop boot from the CD?
    If this isn't the case, you should check if the laptop could start from any other bootable disk. This is necessary because you need to know if his problem of disk problem drive or an optical disc.

Maybe you are looking for