My GUI gets stuck

I have a very simple graphical application. The first two constructions are responsive and variations on the third not. The responsive code is very simple:
frame = new JFrame("Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);or
frame = new JFrame("Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new JPanel());
frame.pack();
frame.setVisible(true);The below example (and pretty much anything more complex) results in bad behavior:
frame = new JFrame("Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new JButton("Button");
frame.pack();
frame.setVisible(true);In all cases I construct the GUI in a Runnable via (EventQueue/SwingUtilities).invokeLater(). Now for the circumstances. Prior to scheduling the Runnable I'm doing some JNI stuff with a USB device in Windows. I open my file handle to the USB driver which resets the device, I then send a protocol reset command and receive a reset response. Let's say I don't send the protocol reset. In this case all the examples work as expected- I can resize the frame, it responds to a close operation (top right 'X' or Alt + F4), any added elements respond to mouse clicks, etc. However, if I do send a protocol reset then only the 'frame' and 'frame & panel' versions work. I can adjust the window repeatedly to any size, maximize, minimize, etc., it always paints and the close operation is also responsive. The final case is when I send the reset and the frame is constructed with, say, a button. The button behavior is intermittent. Rollover changes to the button may work but then get stuck. Clicks may work but then no more. Resizing the frame will always do it in- you can still drag the edges to a different size but you see background painting gets all messed up. The added element no longer paints. Once it's hosed it will no longer accept a close operation- I need to manually kill the process.
Here's another tidbit. I thought maybe sending the reset was causing perhaps the thread in the driver wrapper library to go high priority or something. So I scheduled a Timer/TimerTask to execute some additional operations on the USB device at 2 and 20 seconds after the reset. I thought if the library thread was a problem then the timer shouldn't run. Well, upon both expiries the TimerTasks were able to run, sending commands and receiving events from the driver lib.
And if that wasn't enough, here's some more circumstantial evidence. This was awhile back but I was trying to couple this application (sans the GUI if I remember correctly) with some RMI. Admittedly I haven't done much with RMI but just enough to be familiar. I had a working example in one case and when I brought something equivalent into this workspace I would see an RMI call seemingly block (never return) on a call that shouldn't block. I don't have that part of the workspace in front of me but I really believe the method was non-blocking and should've returned.
So, I tried to give the executive summary. I can give more JNI details if you think it'll be useful. I don't see how sending the reset changes anything in the driver/library, because in both cases when it reaches steady state there's still a thread blocking on a read from the driver.
Any help you have will be greatly appreciated. Thanks. Jerry.
P.S. I'm using JDK/JRE 1.6.0 update 18.

That was the entire class, just not the entire .java file. I'm really not trying to make this any more difficult for you than it has to be. It's not compilable or runnable because you would need several other things: the .jar, the driver .dll, the driver .sys, and a Bluetooth dongle. My guess was this isn't necessary or even wise as you probably shouldn't install drivers from someone you don't know. I'm not even certain if I can attach such things to a post. So from my understanding it will be impossible for you to compile and run my setup if even one of those is missing. Therefore I'm asking if you can think of anything from what I've described that can lead to the problems I'm experiencing. For .java entirety:
package com.spongeminded.protocol.bluetooth.gui.test;
import com.spongeminded.protocol.bluetooth.BluetoothStack;
import com.spongeminded.protocol.bluetooth.stack.transport.UsbTransport;
import com.spongeminded.protocol.bluetooth.stack.transport.UsbTransportIdentifier;
import com.spongeminded.util.log.Logger;
import java.awt.EventQueue;
import java.io.IOException;
import java.util.Enumeration;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.UIManager;
public final class
BluetoothStackFrame
    private final JFrame frame;
    public
    BluetoothStackFrame()
        try
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        catch (final Exception e)
            Logger.throwable(e);
        frame = new JFrame("Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setContentPane(new JButton("Button"));
        frame.pack();
        frame.setVisible(true);
    public static void
    main(
        final String[] args)
        final Enumeration<UsbTransportIdentifier> enumeration;
        UsbTransportIdentifier usbTransportIdentifier;
        usbTransportIdentifier = null;
        enumeration = UsbTransportIdentifier.getIdentifiers();
        while ((null == usbTransportIdentifier) && (enumeration.hasMoreElements()))
            usbTransportIdentifier = enumeration.nextElement();
            if (!usbTransportIdentifier.path.contentEquals("\\\\?\\usb#vid_0a12&pid_0001#5&c7739ab&0&8#{00873fdf-61a8-11d1-aa5e-00c04fb1728b}"))
                usbTransportIdentifier = null;
        if (null != usbTransportIdentifier)
            try
                final UsbTransport usbTransport = usbTransportIdentifier.open();
                final BluetoothStack bluetoothStack = new BluetoothStack("", usbTransport);
                //SwingUtilities.invokeLater(new Runnable()
                EventQueue.invokeLater(new Runnable()
                    public void
                    run()
                        new BluetoothStackFrame();
            catch (final IOException e)
                Logger.throwable(e);
}Again, I verified that what I post here has the same problems as described. I changed it oh so slightly to make the point that simply commenting out 'final BluetoothStack bluetoothStack = new BluetoothStack("", usbTransport);' prevents the problems. Thank you for your input. Jerry.

Similar Messages

  • Px4-300d, no gui access, stuck 95%, lost shares, unstable

    Hello,
    i'm having a TON of issues with a px4-300d unit with 2x1tb drives:
    1) with sw 4.0 (cant remmber the exact subversion) webgui stops responding after random days, but otherwise unit still is accesible
    2) snapshots simply stopped working(generated) months ago when webgui stopped working, last ones are from september, in fact one of the snapshots made itself into a public share!
    3) yesterday afternoon uniot could not be accessed anymore, after a powercylce it gets stuck in 95%, following another thread i removed disk 1 and it booted, but it lost ALL shares(in webgui, if you go to shares it stays there for a minute then empty) but i can see the volumes in the disk management.
    Powercycled then readded drive 1, booted ok started rebuilding, same, no shares.
    upgraded to 4.1.104.31360, i completed setup wizard yet status keeps telling me i need to complete setup :/.
    Shares are STILL empty AND i have no "add" button or anything, it just stays there.
    Checked drive status there's no smart failure or reallocs, dmesg also is not showing any particular error.
    now it's rebuilding the array but i have no way to create shares or anything else
    This is a RMAed unit from february 2014(prev unit failed similar to this one, but instead of losing the shares, it lost all DATA inside them, after debugging it turns the internal usb flash drive was corrupted).
    OFC the unit is now out of warranty...
    All in all so far it's more reliable to put data on a floppy drive than on this unit, it fails in the most basic of functions which is to safely keep data, confidence in this model unit is zero

    Wesley,
    it's raid 1
    i checked it in the support log package for smartctl
    188 is not present, the other 2 values are at zero on both drives.
    Drives are Hitachi Ultrastar A7K2000 (the ones that came with the nas itself).
    After the reconstruction is complete i did a fs check and rebooted, shares ae definititely still gone but i can't create new ones!
    when i press the create shaes it stays there in "waiting" for a minute then the share dialogs apear, i select the volume i want and create a "test" share then the gui stopped responding, i reopened it, went to shares, nothing, create new share "test" and it tells me "A Share already exists with the name 'test'." Yet nothing is there and if i browse via SMB or FTP nothing is there
    i need to fix this urgently!

  • DS6.3 Installation - getting stuck at  " Registering JESMF agent into Cacao

    Hello,
    Am trying to install DS 6.3 on the Solaris 10 Box. But its getting stuck in the end. I ran dsee_deploy install -v -c ALL /opt/SUNWdsee command. But when it didnt complete the installation. Please see below:
    inflating: /opt/SUNWdsee/dscc6/dccapp/html/fr/help/proc-suffixes.html
    inflating: /opt/SUNWdsee/dscc6/dccapp/html/fr/help/toc.xml
    inflating: /opt/SUNWdsee/dsee6/data/sun-ldap-console-gui-help-l10n.lis
    extracting: /opt/SUNWdsee/dsee6/data/sun-ldap-console-gui-help-l10n.del
    Removing /opt/SUNWdsee//dsee6/data/sun-ldap-console-gui-help-l10n.del
    Creating WAR file for Console
    Configuring Cacao at /opt/SUNWdsee/dsee6/cacao_2
    Setting Cacao parameter jdmk-home with default value [opt/SUNWdsee/dsee6/private]
    Setting Cacao parameter java-home with default value [opt/SUNWdsee/jre]
    Setting Cacao parameter nss-lib-home with default value [opt/SUNWdsee/dsee6/private/lib]
    Setting Cacao parameter nss-tools-home with default value [opt/SUNWdsee/dsee6/bin]
    Registering DSCC agent into cacao
    Starting Cacao if necessary
    Registering JESMF agent into Cacao
    After this it didnt move up in the installation process. What could be the reason.. Any help on this would be greatly appreciated.
    DS 5.2 P6 is running on this machine on a different path. But same installation got completed on another box successfully.
    I dont see any log messages for DS6.3 installation under /var/sadm/install/logs directory.
    Thanks in advance!.

    Hi,
    Looks like dsee_deploy hangs during JESmf registration. For this registration dsee_deploy launch the following command v"dsccsetup mfwk-reg -t".
    You can try to run the command manually and check if it works or not.
    Log of cacao ( <install_path>/dsee6/cacao_2/var/cacao/instances/default/logs/ ) can also help to see if JESmf module has been registered correctly or not.
    Hope this helps
    -Sylvain

  • New documents get stuck at top of 2nd display only in First Class app and mavericks

    I've read a lot of the discussions about windows getting stuck in the left corner, etc. My problem  is slightly different.
    I seem to have a unique problem.  I am running 10.9.2 Mavericks and have an hdmi cable connecting my tv as a 2nd display (extended desktop).
    We use First Class as our LMS, and I will frequently have a window open on the 2nd display (random) and get "stuck" at the top of the screen.
    It doesn't seem to matter what the display settings are.  The bar with the close/max/min buttons is not showing, so I cannot drag the window anyplace. The only way I've found to unstick it is to change the display setting for the second display and then move the window. sometimes this will happen each time I open a window in F.C., and sometimes it stops.  The display settings don't seem to matter, except that when I change them (only for the 2nd display), the window unsticks.  Thoughts?

    That is because you don't make any attempt to clear the old list and repopulate it, you just make a new one and add it in. Try making a constructor that creates your GUI then just add, clear, and otherwise manipulate the objects/lists in the GUI--you don't need new ones.

  • I was editing photos and it was getting stuck or frozen and working really slow, so I attempting to close aperture and reopen it but it won't quit aperture and now it won't open up to my photos either.  Any ideas?

    I was editing photos and it was getting stuck or frozen and working very slowly.  I attempted to restart the computer but it would not allow me to quit aperture.  Now aperture appears in my toolbar but will not open up so I can work on any photos.  Any ideas?

    Did you try opening from the Applications folder?
    Depending on how far that gets you, I would also take a look at the Troubleshooting Basics.

  • I am unable to email an image from camera roll. the image gets "stuck". cannot input email address or subject line. am unable to cancel and go back to camera roll

    i am unable to email images from my camera roll. the image gets "stuck". cannot insert email address or subject line. cannot cancel... return to camera roll.
    what to do. i tries taking new picture and sending it in an email... same thing... gets "stuck "
    Waht to do ?

    Hello lohmann8,
    Thank you for providing so much detail about the issue you are experiencing with emailing photos from the Camera Roll.
    The first thing I recommend is quitting and relaunching the applications on your iPhone:
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    You can find the full article here:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    If you are still seeing the same issue after quitting and relaunching the Photos and Camera app, I recommend restarting your phone and then resetting if it's still not working:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    You can find the full article here:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If the issue persists, the last thing I recommend is backing up and restoring your iPhone:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Logout, restart, shutdown all get stuck

    After Quicksilver G4 has been idle for a few hours and I come along to shut it down or log out, it starts the process but gets stuck at the blue screen and spinning doohickey. (not the beachball). I've let it sit for over a half hour.
    I can SSH into it and there are no stuck processes, no CPU overload, no memory overruns. It's just sitting there drooling.
    The only other symptom is that the eject key doesn't function sometimes. If it is one of those times, I can be sure it will hang on reboot. Other times the eject key works fine regardless of whether there is a disc in there or not.
    Happened with 10.5, 10.5.1, 10.5.2, but never with 10.4.x
    Strange huh?

    Open Activity Monitor (/Applications/Utilities/Activity Monitor.app), and see if you can spot any thing to do with Safari or Firefox in there.

  • SuPM home page getting stuck and couldnt able to enter

    Dear All,
    Greetings....
    we are not able to enter into SuPM home page and getting stuck while its loading.. due this cause, we have installed flashplayer_10_ax_debug (No flash player exist earlier).
    Now while loading SuPM home page in Portal, its displaying..
    Adobe Flash Player 10
    An Action Script error has occured
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at com.sap.xapps.analytics.sr.material.command::MaterialGetListCommand/onServiceLocatorResult()
         at com.sap.mvc.control.events::Callbacks/onResult()
         at com.sap.xapps.analytics.sr.business::WebServiceFactory/resultHandler()
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.rpc::AbstractService/dispatchEvent()
         at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
         at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
         at mx.rpc::Responder/result()
         at mx.rpc::AsyncRequest/acknowledge()
         at DirectHTTPMessageResponder/completeHandler()
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at flash.net::URLLoader/onComplete()
                                                                                    [Dismiss All]    [Continue]
    i tried even by giving both options but still same issue.
    Please help.
    Regards,
    Nagarjuna

    Hi Nagarjuna
    The flex UI for SuPM is sturctured within the SUPM Portal packages OPMFNDUI and ANASUSTUI,so please re check whether you have installed the correct SuPM portal packages from service marketplace.
    Since I see some webservice related message in the log please re check the following post installation step in the installation guide :
    Configuring SAP UI Framework Web Service Proxies (look for the authorization details also).
    If you still get problem during loading the SuPM UI through portal please go to NW administrator and view the error log.
    Thanks
    Debraj Roy
    RIG APPS

  • Ipad app store is getting stuck and will not let me puchase any apps or books

    My ipad app store is getting stuck.  I can not purchase any apps or books.  It works for a few seconds and then freezes. 

    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    If there are multiple apps trying to download at once, only one can download at a time and the rest say "Waiting" until it is then their turn. Try this. Double tap the icon of the Waiting app, and it should resume the download.
    If that doesn't work:
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

  • Photoshop CC Toolbar buttons sticking.. getting stuck on single click

    Toolbar buttons get stuck in dropdown menu with single click... it's extremely irritating especially being in photoshop all day. I have to click the intended tool button twice in order to get rid of the drop down menu options. I realize it should do this when I double click or hold down click.. but not when I simply want to select a tool with a single click.  I've tried everything. Please help!

    Try resetting the tools:
    Also try changing the mouse settings such as double click speed..
    Benjamin

  • Latest update of Muse is not installing on several tries,installation gets stuck at 43% and shows '' waiting'' at the  ''Extracting''  stage for 7-8 hours after which it does not progress

    latest update of Muse is not installing on several tries,installation gets stuck at 43% and shows '' waiting'' at the  ''Extracting''  stage for 7-8 hours after which it does not progress.

    Refer to EX11....
    Creative Cloud Error Codes (WIP) | Mylenium's Error Code Database
    Mylenium

  • HI, I just got a Macbook Pro.  It's great but my mail doesn't work at all.  It will come up correctly, but take forever to download messages,  then won't delete them,  then won't save them to folders.  Then when I go to quit mail it's like it gets stuck.

    HI, I just got a Macbook Pro.  It's great but my mail doesn't work at all.  It will come up correctly, but take forever to download messages,  then won't delete them,  then won't save them to folders.  Then when I go to quit mail it's like it gets stuck between quitting and not.  I have to force quit, then restart my computer if I want to pull up my mail again.  How can I fix this?

    If you just got your new MBP you have phone support from Apple (which is quite good) call them.  800-692-7753 tell the automated answerer "mail technical support" you'll have human quite quickly.  Hope this helps.

  • My Mac is doing strange things: delaying between users, mouse flickering and bouncing, gets stuck with rainbow wheel flickering. I ran the appel hardware test and it detected an error: 4MOT/4/40000003:HDD-1233 Does anybody know what that means? HELP!

    My imac is doing strange things:
    -delaying between users: when closing session it goes to blue, then takes a while to appear users signin box, and then wont recognize mouse command to enter until a couple of minutes later... then everything seems alright until....
    -it gets stuck between things, the rainbow wheel appears and its just delays there forever....
    -and every now and then the mouse starts flickering and bouncing wildly onscreen.
    I ran the appel hardware test and it detected an error:
    4MOT/4/40000003:HDD-1233
    Does anybody know what that means? HELP!

    WZZZ answered about where to get iStat. And do check the SMART status. If it is an overheating problem due to a fan or logic board problem, your hard drive is possibly cooking itself to death. If so it isn't a faulty hard drive even though the hard drive might fail. So assuming it's a temperature problem, even if you are able to repair things on the disk with software, that is working on symptoms, not causes. I could be wrong however.
    RE: AppleCare: Your iMac came with one year of AppleCare (Apple's warranty program), but within the first year you can buy 2 more years. You have to extend by the one year anniversary of purchase of the computer. Your 10,1 is too old to still be in the first year, and since you asked what it was, I'm sure you don't have it. Bottom line meaning is that whatever this problem turns out to be, you'll have to pay for it. Unless there is something like this. It is for 2011 iMacs with certain Seagate drives. You can put in your serial number for fun, but it looks like yours is too old. Lastly, some people have had Apple help them anyway if it is just out of warranty, but many have not. Your machine is one of these. Type in 10,1 in the search box. Is there an Apple Store near you? Just b/c it's out of warranty doesn't mean you shouldn't have it looked at by Apple. But no one here can say at all what Apple will or will not do.
    Hope you get it taken care of!

  • Internet recovery gets stuck on the spinning globe with the progress bar below.

    Hello Everybody!
    I'm trying to fix the iMac (27-inch, Mid 2010) of my friend. He said it doesn't boot anymore and just gets stuck on the grey screen with the Apple logo and the spinning wheel below. So my first step was to go into the Startup Manager by pressing the Option key after the chime. There I was presented with the Macintosh HD and the Recovery HD. After selecting the Recovery HD to access the Disk Utilities I got stuck on the grey screen with the Apple logo and the spinning wheel again. So I guess the data on the drive is corrupted and might have to be replaced. But before I do that, I wanted to give the Internet Recovery a try. I connected the iMac to the internet using an ethernet cable and pressed Command + Option + R after the chime and the spinning globe appeared with the info: "starting recovery process from network. This may take a while". After a short time the sentences are replaced by a progress bar and a timer that is counting up. The progress bar then moved for a tiny little bit and then nothing happens anymore but the timer keeps counting up. I waited for quiet some time before I gave up. I did not get any errors so I can't provide any other useful information. Can anyone give my some advice? I read in other posts that the ISPs of specific countries block ports which are needed for the internet recovery. I'm in Thailand right now. Does anyone know if that might cause the problem?
    Thank you for all your help!

    Neither we nor Apple support jailbroken iDevices.

  • This just started happening.. I open Itunes and the little round rainbow loading indicator just goes on and doesnt stop.. My itunes wont function.. It gets stuck. Then i have to force quit.. I tried to shut down and restart. also reloaded the latest itune

    This just started happening.. I open Itunes and the little round rainbow loading indicator just goes on and doesnt stop.. My itunes wont function.. It gets stuck. Then i have to force quit.. I tried to shut down and restart. also reloaded the latest itune 11.1.3 and it still gets stuck.
    i use an external HD and thats fine.. all files are in there.  But I have no idea why my itunes app is getting stuck.
    Am I the only person this is happening to? What can I do to correct this problem?

    Hi marlonbnyc!
    This article will help provide some basic troubleshooting steps that will serve as a guide for you to resolve this issue:
    Mac OS X: How to troubleshoot a software issue
    http://support.apple.com/kb/ht1199
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

Maybe you are looking for

  • "managed by" attribute of computer object

    Hi all, I am working on a script to manage the computer's attribute "managed-by" through power shell. I have found the command Set-ADComputer "AAECNBJ003403L" -ManagedBy "dn_path_of_user" which does not seem to be a solution in my ad environment. In

  • ITunes cannot open HELP NEEDED!

    Everytime I try and open it, it will say that it has encountered a problem and needs to close. I have used Windows Install Clean-up b/c it gets an error when uninstalling normally, deleted the two quicktime files in system32, manually deleted both th

  • Standard and Detailed Profitability

    Hello Gurus I am a newbie in HPCM. I am aware that there are standard and detailed HPCM available, standard HPCM uses Essbase while detailed HPCM uses a relational database. What are the Pros and Cons and major differences for these two? Thank you ve

  • Why Bridge CS5.5 is opened and not CS6 is opened for non admin user?

    Hi, I have CS5.5 updated to CS6 on my computer but CS5.5 version of Bridge is opened instead of CS6. This happens when I try to open CS6 version of Bridge by  using the CS6 icon, selecting CS6 version from the program list of Windows 7 and selecting

  • Diagnostics Setup - remembers old settings

    Hi, have a strange problem and it's really giving me a headache. We did set up solution manager diagnostics earlier ago and it worked fine. Recently I logged on again to the SolMan Diagnostics page and got the message that Diagnostics was not running