GUI  locking.

I need help !!!!
I have an java Applet that call web services.That applet has a button wich when is pressed it send a request to the SOAP server.The request is an asynchron call because we are invocating a web service wich will return some results. When I make the call the soap server before of send the response to my applet it send a RPC call to a thread listener that I have runing in my applet. That listener is listening for request in a port . My listener got fine the soap server request but an acction wich the listener must to do is display a dialog message . The problem is that because of the applet GUI es locked waiting for the SOAP server response the dialog shows locked again an it is disabled. the soap server would expect for a response from the listener buto as the dialog shows freezed the response cannot be send to the soap server. after some time the soap server get timed out and send the response to the applet sending a error code. The question is somebody knows how can i display a dialog in a Applet when the GUI is locked due to is waiting for a IO operation be completed ????'
I will tank you very much for your help.

more threads. have the soap request in one thread, the response listener in another thread, and the GUI dialog in another.

Similar Messages

  • GUI locks up when trying to read output from server

    I have a client built in MVC fashion and have two GUI views. One view is for output from the server and input from the keyboard. The other view is for changing connection settings and starting the conection. The problem is when I make the call to connect from the connection GUI it is able to connect and set up the streams but both GUIs lock up once I start trying to output the text received from the server. The strange thing is that when I call these methods just from the Model and not via the GUI and its actionListener the whole thing works. I think it may have something to do with the loop locking up the GUI but don't how to resolve this.
    public void monitorServer()
    try
    char inputChar = (char)fromServer.read();
    while (socket.isConnected()==true && inputChar >-1 )
    inputChar = (char)fromServer.read();
    if ( ( (inputChar >= '0') && (inputChar <= 'z') )
    ||(inputChar == '\n')||(inputChar == '\r')
    ||(inputChar == ' ') )
    String tempString = (""+inputChar);
    mv.addText(tempString);
    catch(IOException ioException)
    JOptionPane.showMessageDialog(null,
    "Error: Failed to read message. Corrupt data sent by server",
    "Connection Error", JOptionPane.ERROR_MESSAGE);
    mv.addText("\nMessage not read.\n");
    The code above is the bot that screws it all up. mv is the other view that it is outputting the text to.
    Please help! I'm gonna fail my degree. :)

    you need to run your server connection part in another thread.

  • GUI lockes even though socket in in different thread

    I have a very simple GUI interface which is designed to simply display the data received from a server socket. The problem is that once I accept the client socket connection the GUI locks until the client socket is closed. This occurs even though I'm creating the socket in a new thread. What am I missing? Thanks
    The server socket:
        Runnable startServerSocket = new Runnable() {
            public void run() {
                try {
                ServerSocket srv = new ServerSocket(port);
                System.out.println("socket waiting");
                // Wait for connection from client.
                Socket socket = srv.accept();
                BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                System.out.println("socket got connection");
                String str;
                String text;
                while ((str = rd.readLine()) != null) {
                    outputArea.setText(outputArea.getText()+str);
                    System.out.println("got msg");
                rd.close();
                socket.close();
            catch (IOException e) {
                System.out.println("Exception: " + e.toString());
    };The socket is run in this manner:
    Action onaction = new AbstractAction("On") {
            // This method is called when the button is pressed
            public void actionPerformed(ActionEvent evt) {
                SwingUtilities.invokeLater(startServerSocket);
        };Any help you could give me would be very much appreciated. Thank you

    This occurs even though I'm creating the socket in a new thread.Actually SwingUtilities.invokeLater causes your Runnable to run in the Swing event thread, which is exactly what you want to avoid doing. Try this instead:public void actionPerformed(ActionEvent evt) {
      new Thread(startServerSocket).start();
    }

  • GUI locking up, why?

    The attached example VI replicates how my VI ended up, I know it needs to be completely redone but I'd like to know whats messing up here.  On running, if the user immediately goes to Page 3 the slider is unresponsive and so are the tabs.  This doesn't seem to be a race condition.  On starting if the user changes the slider, or goes to page 2 before going to Page 3 this doesn't happen.  So what is locking up the GUI.   Note on Page 3 the loop that is poling the slider is still working as the numeric is still being updated.  The GUI gets locked up other ways too.  I have also have noticed that on aborting this VI are restarting the GUI seems to be locked out until one of the event structures runs, at least that is what I think is going on but is not included in this example.
    For those wanting the scoop before downloading.  There are three tab pages.  The controls on one are monitored by one event structure, it runs all the time.  Monitoring the controls on the other two pages are turned off and on with a change of the tab control using a case structure.
    Attachments:
    tab and event structure testing.vi ‏20 KB
    just slider.vi ‏7 KB

    phillman wrote:
    From what my testing seems to show is that if the event structure is within a case structure, and even though the case that includes the event structure is never executed, the event structure is still activated? 
    Why the question mark at the end if you tested and verified it yourself?
    (The user interaction queues up the event in the event queue and locks the front panel (if so configured) and the event structure will handle the oldest event once it is able to execute.)  
    phillman wrote:
    It just seems to me that an event structure shouldn't be activated until it is actually executed. 
    No, it's the other way around. You need to write your code with the knowledge in mind that events are aways queued up.
    Without that feature you would not be able to write a useful program. What if a button is pressed while the previous event has not finished? What if a button is pressed while it is doing an FFT? Should it just ignore the button or should it service it once the event is available to be processed?
    For more fancy requirements you can use dynamic event and register/unregister them depending on the program state. It is all possible, but requires significantly more code.
    If you really think you have a much better idea how events should behave, please write it up and post it in the ideas exchange. If it is a good idea, it will collect votes.
    (More information, for example read rule #1. Once the while loop has completed, the event structure is no longer in a running while loop, violating that rule )
    LabVIEW Champion . Do more with less code and in less time .

  • Oracle XE GUI locks up frequently

    Hello,
    My Oracle XE 10g GUI (browser) keeps pending endlessly in the status bar (processing the SQL statement),
    after I did some statements (be it DDL, DML or a simple select). It makes me think there is an implicit lock going on,
    though when I go to the locks screen, I see none active. I do see various sessions active.
    I simply do this (nr 1):
    SELECT *
    FROM emp;
    I press turn autocommit off and I press ctrl+enter.
    I get the full emp list as expected.
    then I do this (nr 2):
    SELECT ename, sal, hiredate
    FROM emp
    WHERE empno = 20;
    followed by ctrl+enter.
    I get my results as expected.
    Then I go back to repeat these steps using SQL History and it locks up at nr 2.
    This behavior seems to occur sporadically because I was never able to reproduce identical scenarios in succession.
    It only happens when I run the statements from SQL History.
    When I copy paste my previous statements without using SQL History, everything works fine.
    Is this a bug, or what's going on?
    Thank you
    Edited by: 898322 on Nov 21, 2011 6:15 AM

    Hi,
    Are you using Apex 2.1 that comes with XE 10G?
    That version Apex is old and might/have bugs. Also it not support well latest browsers.
    It is better use tool like SQL developer to run queries
    http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
    Or you can upgrade Apex and see does problem go away
    http://www.oracle.com/technetwork/developer-tools/apex/upgrade-apex-for-xe-154969.html
    But note if you upgrade Apex, you lose database admin web interface
    >
    Once you upgrade Application Express within your Oracle Database XE, you will lose the Oracle APEX interface to perform some of your database management functions. This includes the ability to create and alter users, set database parameters, etc. To perform these functions, you will need to use either SQL Developer or SQL*Plus.
    >
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • MB GUI locking up when waking from sleep

    This doesn't happen every time, but sometimes when I wake the MB, the screen will freeze. The OS is still operating, I can ssh in to the machine. The cursor still responds, but I can't click on anything. The clock will be frozen at the time when the MB went to sleep.
    I waited for about 15 minutes, but it never came back.
    It wasn't connected to any network shares, and I didn't have any USB/FW devices plugged in.
    The only thing I can do is to power it off. It's running 10.5.5, with the most recent security updates, etc.
    Any thoughts? I feel like I've tried everything short of a reinstall, which I don't want to do.
    I did run Applejack and let it do its thing, so maybe that will help. I don't know.

    Joanne,
    I believe you are still under warranty. I recommend backing up your data and taking your iBook in to be looked at. Your logic board might be failing.

  • GUI seems to lock, but computer not crashed

    II've got a Mac mini 2010 server, that now has 2 x 1TB SSD and 16GB ram (user installed, but , whilst I'm not an expert, it's not the first time I've installed components in a mac). I'm in the process of trying to set it up as a home server, however I've come across a really dod problem.
    What happens is that after a period of time (sometimes ten minutes, sometimes twenty, sometimes and hour or so) graphical artefacts appear and then the front end/GUI locks. I can still usually move the mouse, but everything else is frozen. There have also been occasions where I get no artefacts and it just freezes.
    There are two things that makes this odd (to me at least).
    Firstly, the Mac mini appears to still be functioning behind this GUI crash. For example, if I'm doing a copy operation (as I was last night copying 300 GB of music over) it will still run. Or a YouTube video will continue to play with sound only. And when I SSH in to the mac mini, you can do top and see a list of running processes (note sudo killall [appname] doesn't effect what is displayed on screen and only sometimes kills the processes (I.e. They don't list in the top command anymore).
    Secondly, this only happens when I physically interact with the computer for a period of time. If I leave it (not touch it whilst it does the process) copying files or downloading it will happily chug away and not lock up.
    I can't see anything significant in the logs, and I've reseated the memory just in case. Am I looking at a graphics card fault here?

    An update. Had a look in the logs and found the following. The crash happened at 20:31:21 – I'd completely forgotten I'd written the time down last night.
    29/07/2014 20:28:20.468 WindowServer[121]: _CGXHWCaptureWindowList: No capable active display found.
    29/07/2014 20:28:20.471 WindowServer[121]: _CGXHWCaptureWindowList: No capable active display found.
    29/07/2014 20:29:13.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:29:13.000 kernel[0]: IOVendorGLContext::ReportGPURestart
    29/07/2014 20:29:13.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:29:13.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:29:14.150 AirPort Utility[4170]: BUG in libdispatch client: kevent[EVFILT_WRITE] delete: "Bad file descriptor" - 0x9
    29/07/2014 20:29:34.750 sudo[4180]:    admin : TTY=ttys000 ; PWD=/Users/admin ; USER=root ; COMMAND=/Applications/Server.app/Contents/ServerRoot/usr/sbin/changeip -checkhostname
    29/07/2014 20:31:20.242 login[3752]: DEAD_PROCESS: 3752 ttys000
    29/07/2014 20:31:21.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:31:21.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:31:21.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:31:21.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:31:21.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:31:41.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:32:01.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:32:05.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = Graphics Engine Error (GR Error 5)
    29/07/2014 20:32:25.000 kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0x6 = DMA Engine Error (FIFO Error 6)
    29/07/2014 20:32:45.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:33:05.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:33:25.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:33:45.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:34:05.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:34:26.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:34:46.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    29/07/2014 20:35:06.000 kernel[0]: NVDA(OpenGL): Channel timeout!
    I'm also noticing that this happens when I am running chrome. Killing it via ssh will see the system return, after a period of time (again could be like 10-20 minutes though).

  • GUI program... CALCULATE button not working... help please

    I am trying to make my GUI work... all buttons work except my CALCULATE button... which I want to say...
    if Binary radio button is set... and user inputs string into the txtFieldOne....
    then when click Calculate - go to my function called "convertBinary( )" and do the conversions and display or setText in the other txtFields...
    For now... some of my code is comented out... but if I could get some help.. that would be great!
    I am trying to use:
    //CALCULATE BUTTON FUNCTION AND EXECUTIONS
              private class CalculateButtonHandler implements ActionListener{
                   public void actionPerformed(ActionEvent e){
                        //if (radioBinary.isSelected() == true)
                        //System.convertBinary(); //NEED TO FIX
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class cis279hw3_new extends JFrame{
    //class variables
         private Container pane;
         private JTextField txtFieldOne,txtFieldTwo,txtFieldThree,txtFieldFour,txtFieldFive;
         private JButton buttonClear,buttonCalculate,buttonExit;
         private JRadioButton radioBinary,radioDecimal,radioHex,radioOctal;     
         private ButtonGroup RadioButtonGroup;
    //BUTTON AND RADIO BUTTON HANDLERS
         private ExitButtonHandler exitHandler;
         private ClearButtonHandler clearHandler;
         private CalculateButtonHandler calculateHandler;
         private RadioButtonHandler radioHandler;
         cis279hw3_new(){
              //textfields
              txtFieldOne = new JTextField(); //Inputs value from user
              txtFieldTwo = new JTextField();
              txtFieldThree = new JTextField();
              txtFieldFour = new JTextField();
              txtFieldFive = new JTextField(); //Displays error message
              //buttons
              buttonClear = new JButton("Clear");
              buttonCalculate = new JButton("Calculate");
              buttonExit = new JButton("Exit");
              //radio buttons
              radioBinary = new JRadioButton("Binary");
              radioDecimal = new JRadioButton("Decimal");
              radioHex = new JRadioButton("Hexadecimal");
              radioOctal = new JRadioButton("Octal");
              RadioButtonGroup = new ButtonGroup(); //create radio button group
              //add radio buttons to the button group
              RadioButtonGroup.add(radioBinary);
              RadioButtonGroup.add(radioDecimal);
              RadioButtonGroup.add(radioHex);
              RadioButtonGroup.add(radioOctal);
              //pane - create pane and add objects to the pane interface
              pane = getContentPane(); // get the pane and associate with this JFRAME
              pane.setLayout(new GridLayout (6,2));
              //ROW 1          
              pane.add(radioBinary);
              pane.add(txtFieldOne);
              //ROW 2                    
              pane.add(radioDecimal);
              pane.add(txtFieldTwo);
              //ROW 3                    
              pane.add(radioHex);
              pane.add(txtFieldThree);
              //ROW 4                    
              pane.add(radioOctal);
              pane.add(txtFieldFour);
              //ROW 5                    
              pane.add(buttonClear);
              pane.add(txtFieldFive);
              //ROW 6                    
              pane.add(buttonCalculate);
              pane.add(buttonExit);
              setTitle("Convert to Number Bases");
              setSize(600,200);
              setVisible(true);
              //FONT CALL IS TEDIOUS... HOW CAN I APPLY TO THE ENTIRE PANE IN ONE setFont????????????????
              buttonClear.setFont(new Font("Arial",0,16));
              buttonExit.setFont(new Font("Arial",0,16));
              buttonCalculate.setFont(new Font("Arial",0,16));
              radioBinary.setFont(new Font("Arial",0,16));
              radioDecimal.setFont(new Font("Arial",0,16));
              radioHex.setFont(new Font("Arial",0,16));
              radioOctal.setFont(new Font("Arial",0,16));
              txtFieldOne.setFont(new Font("Arial",0,16));
              txtFieldTwo.setFont(new Font("Arial",0,16));
              txtFieldThree.setFont(new Font("Arial",0,16));
              txtFieldFour.setFont(new Font("Arial",0,16));
              txtFieldFive.setFont(new Font("Arial",0,16));
              //create action button listeners
              clearHandler = new ClearButtonHandler();
              buttonClear.addActionListener(clearHandler);
              //create action button listeners
              calculateHandler = new CalculateButtonHandler();
              buttonCalculate.addActionListener(calculateHandler);
              //create action button listeners
              exitHandler = new ExitButtonHandler();
              buttonExit.addActionListener(exitHandler);
              //create radio button item listeners constructors
              radioHandler = new RadioButtonHandler();     
              radioBinary.addActionListener(radioHandler);
              radioDecimal.addActionListener(radioHandler);
              radioHex.addActionListener(radioHandler);
              radioOctal.addActionListener(radioHandler);     
         }     //CLOSES my 2nd class "cis279hw3_new"
              //RADIO BUTTON /TEXT FIELD SELECTION FUNCTION
              private class RadioButtonHandler implements ActionListener{     
                   public void actionPerformed(ActionEvent e){
                   if (e.getSource() == radioBinary){
                        txtFieldOne.setEditable(true);
                        txtFieldTwo.setEditable(false);
                        txtFieldThree.setEditable(false);
                        txtFieldFour.setEditable(false);
                        txtFieldFive.setEditable(false);
                   else if (e.getSource() == radioDecimal){
                        txtFieldOne.setEditable(false);
                        txtFieldTwo.setEditable(true);
                        txtFieldThree.setEditable(false);
                        txtFieldFour.setEditable(false);
                        txtFieldFive.setEditable(false);
                   else if (radioHex.isSelected() == true){
                        txtFieldOne.setEditable(false);
                        txtFieldTwo.setEditable(false);
                        txtFieldThree.setEditable(true);
                        txtFieldFour.setEditable(false);
                        txtFieldFive.setEditable(false);
                   else if (radioOctal.isSelected() == true){
                        txtFieldOne.setEditable(false);
                        txtFieldTwo.setEditable(false);
                        txtFieldThree.setEditable(false);
                        txtFieldFour.setEditable(true);
                        txtFieldFive.setEditable(false);
              //EXIT BUTTON FUNCTION AND EXECUTIONS
              private class ExitButtonHandler implements ActionListener{
                   public void actionPerformed(ActionEvent e){
                        System.exit(0);
              }; //class within a class must end in semicolon
              //CLEAR BUTTON FUNCTION AND EXECUTIONS
              private class ClearButtonHandler implements ActionListener{
                   public void actionPerformed(ActionEvent e){
                        txtFieldOne.setText(null);
                        txtFieldTwo.setText(null);
                        txtFieldThree.setText(null);
                        txtFieldFour.setText(null);
                        txtFieldFive.setText(null);
              }; //class within a class must end in semicolon
    //NEED TO USE THESE IN MY CALCUALTE BUTTON SOMEHOW     (FROM HW #1)
                        //convertBinary();
                        //convertInteger();
                        //convertHex();
                        //convertOctal();
              //CALCULATE BUTTON FUNCTION AND EXECUTIONS
              private class CalculateButtonHandler implements ActionListener{
                   public void actionPerformed(ActionEvent e){ //ActionEvent Class used here     
                        //if (radioBinary.isSelected() == true)
                        //System.convertBinary(); //NEED TO FIX
              //class within a class must end in semicolon
    //NEED TO MAKE CALCULATE BUTTON USE THESE
    //FUNCTION: CONVERT BINARY TO...     
         private static void convertBinary(){
              while (true){  //OPEN WHILE
                   String intSelection;
                   Scanner keyboard = new Scanner(System.in);
                   intSelection = keyboard.nextLine();
                   //ERROR CHECKING FOR BINARY.. TOO LARGE IS GOOD!!!
                   String maximum = "1111111111111111111111111111111";
                   String emptybinary = "";
                   if (intSelection.length() > 31){          
                        txtFieldFive.setText("The value is too large");     
                   else {
                        if (intSelection.equalsIgnoreCase(emptybinary)){
                             txtFieldFive.setText("No value was entered.");
                        else {
                        int i;
                        i = Integer.parseInt(intSelection,2);
                        txtFieldTwo.setText(Integer.toString(i));     
                        txtFieldThree.setText(Integer.toHexString(i));          
                        txtFieldFour.setText(Integer.toOctalString(i));     
                        break;          
    //FUNCTION: CONVERT DECIMAL TO...     
         private static void convertDecimal(){
              while (true){  //OPEN WHILE
    //     System.out.print("Please enter a Binary value: ");
                   String intSelection;
                   Scanner keyboard = new Scanner(System.in);
                   intSelection = keyboard.nextLine();
                   //ERROR CHECKING FOR INTEGER.. TOO LARGE IS GOOD!!!
                   String maximum = "2147483647";
                   String empty = "";
                   if (intSelection.length() > 10){          
                        txtFieldFive.setText("The value is too large");               
                   else {
                        if (intSelection.equalsIgnoreCase(empty)){
                             txtFieldFive.setText("No value was entered.");
                        }     else {
                             int i;
                             i = Integer.parseInt(intSelection,10);
                             txtFieldOne.setText(Integer.toBinaryString(i));     
                             txtFieldThree.setText(Integer.toHexString(i));          
                             txtFieldFour.setText(Integer.toOctalString(i));
                             break;          
    //CLOSE MY MAIN CLASS public "class cis279hw3_new"

    Thank you for the reply. I will try and get this better this time - newbie to programming and this forum.
    Here is the area of code I am having problems with...
    - I get no compiler errors...
    - But when I run the program... the GUI sort of hangs or stalls... and doesn't do anything when I:
    Choose the binary radio button
    enter a binary number into the txtFieldOne
    click Calculate...once I click calculate button... the program GUI locks up and hangs... but I get no errors or error messages I can see.
    On calculate... it is supposed to run the convertBinary( ) method... which
    converts the binary to a decimal, a hex and an octal.
    then display, or setText of each conversion into its appropriate textField...
    I have also simply setText on calculate.. to ensure the button even works... and it does work...
    if (radioBinary.isSelected() == true)
    txtFieldOne.setText("This happens when I click calculate");     ------------------
    //CALCULATE BUTTON FUNCTION AND EXECUTIONS
              private class CalculateButtonHandler implements ActionListener{
                   public void actionPerformed(ActionEvent e){ //ActionEvent Class used here     
                        if (radioBinary.isSelected() == true)
                        convertBinary(); //NEED TO FIX
    //FUNCTION: CONVERT BINARY TO...     
         private void convertBinary(){
              while (true){  //OPEN WHILE
                   String intSelection;
                   Scanner keyboard = new Scanner(System.in);
                   intSelection = keyboard.nextLine();
                   //ERROR CHECKING FOR BINARY.. TOO LARGE IS GOOD!!!
                   String maximum = "1111111111111111111111111111111";
                   String emptybinary = "";
                   if (intSelection.length() > 31){          
                        txtFieldFive.setText("The value is too large");     
                   else {
                        if (intSelection.equalsIgnoreCase(emptybinary)){
                             txtFieldFive.setText("No value was entered.");
                        else {
                        int i;
                        i = Integer.parseInt(intSelection,2);
                        txtFieldTwo.setText(Integer.toString(i));     
                        txtFieldThree.setText(Integer.toHexString(i));          
                        txtFieldFour.setText(Integer.toOctalString(i));     
                        break;          
         }

  • ATSServer CPU @ 200%  LOCKS-UP Mac Pro dual quad-core desktop

    My dual quad core running Mac OS X 10.5.5 locks-up frequently at boot.
    Required hard (destructive) reboot, until I figured out workaround
    described below. Apple really needs to fix this as a high priority.
    Symptom: Desktop freezes and the system becomes unusable.
    Usually occurs when booting the system, but can happen
    at other times spontaneously.
    When it occurs during boot (after desktop first appears, usually
    as task bar is starting to populate), the wedging is so bad that
    applications are effectively 'suspended' mid-launch.
    Icons and menu and mouse buttons and keyboard completely unresponsive.
    Usually just a spinning beach ball that tracks with the mouse is present.
    Attempts to resolve (both failed):
    1. Did a fresh install of Mac OS X (with data transfer) and upgraded,
    which brought system to 10.5.5. (Problem appeared immediately
    on fresh installed system).
    2. Totally re-indexed Spotlight and de-selected option to not index
    PDF documents.
    Workaround:
    1. Enable 'ssh' logins and root user.
    2. Login via 'ssh' from remote system, while Mac Pro desktop frozen.
    3. Become super user in 'ssh' session.
    4. Find ATSServer with 'ps -ef' or 'top' command.
    5. Terminate ATSServer with 'kill -9'
    6. Desktop on Mac Pro immediately unwedges and applications
    that hung during start-up finish launching.
    /var/log/system.log (many messages like this):
    System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework /Support/ATSServer[241]: FOExceptionMainHandler caught a fatal exception at 0x96028036
    Safari[151]: GCGetStrikeMetrics failed: error 5.
    Plea from customer:
    Apple: PLEASE post an update to fix this very soon.
    If anyone has clear instructions on what I can do to fix properly until
    Apple comes up with a real fix, for example, caches to clear,
    how to identify a faulty file, or quarantine a faulty faunt,
    or any other diagnostics, please feel free to reply.
    My machine was already in the shop for five weeks recently for repair,
    and I can't afford down time, because I'm mid-project right now,
    and it will be a HUGE setback to have to bring my machine into the
    shop again for another 'n' days.

    I'm also seeing this problem on my MacBook with 10.5.5. After killing ATSServer via ssh, I looked in the Console, and found these console messages which occurred when the GUI locked up:
    10/18/08 12:44:03 PM com.apple.ATSServer[2554] Notice ATSServer(2554,0xa076afa0) malloc: * error for object 0x83ac00: incorrect checksum for freed object - object was probably modified after being freed.
    10/18/08 12:44:03 PM com.apple.ATSServer[2554] Notice * set a breakpoint in mallocerrorbreak to debug
    The problem seems to happen whenever I mount a certain remote shared volume (AppleShare) from my old desktop computer (G4 Dual 450 running 10.4.11). I guess it could be that ATSServer is choking when trying to generate QuickLook previews for some document on the shared volume...

  • GUI freezes when new Thread object start()ed. Neat, brief code included :)

    The title says it all really.. I have the code below in a method startScan() that is called when a button is pressed. The thread executes fine, but the GUI locks up while the thread is executing. I don't really understand why, since a new thread is implicitly separate from the event dispatch thread.
    Must I use a SwingWorker to get things working? Would someone be kind enough to explain why, if this is the case?
    private void startScan() throws InterruptedException {
              final Runnable breadthFirstComparer = new Runnable() {
                   /** Sleep interval used when scan paused */
                   private int interval = 1000;
                    * Kills the current thread
                   public void stop() {
                        scanProgressLabel.setText("Scanning complete");
                        scanComplete = true;
                    * Sleeps the currently running thread if user has paused the scan,
                    * otherwise initiates comparison of the trees' next depth node sets
                   public void run() {
                        while (!scanComplete) {
                             while (scanPaused) {
                                  try {
                                       Thread.sleep(interval);
                                  } catch (Throwable exc) {
                                       Gecko.logException("Scanner thread could not be paused", exc);
                             compareTrees();
                        // Stop thread execution once scan is complete, and disable
                        // scanner-related buttons
                        toggleScanButton.setEnabled(false);
                        stop();
              scanner = new Thread(breadthFirstComparer)
                   public void start() {
                        scanProgressLabel.setText("Scanning in progress...");
                        breadthFirstComparer.run();
              scanButton.setEnabled(false);
              scanner.start();
         }Many thanks.

    it's getting really irritating that pretty much every thread out of the last
    20 I've made, you've criticised me for not posting an SSCCE. How do you think I feel. I'm donating my time to help you solve a problem, but you are not willing to spend 5-10 minutes to post a SSCCE so that we can fully understand what you have done and what the problem is.
    You don't have to post a SSCCE if you don't want to. Thats fine, I just won't answer your questions.
    what's the point me spending 30 minutes or more my end creating an
    SSCE, and you spending 10 minutes or more compiling, running and analyzing it your end?It should not take 30 minutes. If it does it just goes to prove that you don't really understand what you are attempting to do. And if you don't know what you are doing how do you expect us to guess what you are doing? One of the benefits of a SSCCE it to help you learn to develop problem solving skills by learning to simplfy the problem.
    Also, what if we can't figure out the problem based on your verbal description of the problem? If you post code it gives us the option of compiling and testing the code if we so desire. Without the code we give up and move on to the next question.
    but since the simple information that you've provided, and the chunk of code that Michal so kindly donated, are likely more than enough of an explanationThis time we were able to guess what the problem was, but that is not true in all cases. You seem to think that we are all miracle workers, that you can place a couple of lines of code in front of us and we can automatically tell whats wrong. Well, thats not true (at least for me). Many times I use my problem solving skills to solve the problem.
    I really should learn to scroll down and read all the posting before replying. es5f2000 pretty much said it all for me.
    Message was edited by:
    camickr

  • Controlling a thread from the gui

    Hi ive written a small piece of code that demonstrates the problem im having:
    package Util;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Monitor implements ActionListener {
         Mon mon = new Mon();
         public Monitor() {
              JFrame frame = new JFrame();
              JButton start = new JButton("Start");
              JButton pause = new JButton("Pause");
              pause.addActionListener(this);
              start.addActionListener(this);
              frame.setLayout(new FlowLayout());
              frame.add(start);
              frame.add(pause);
              frame.setVisible(true);
              frame.pack();
         public void actionPerformed(ActionEvent e) {
              if (e.getActionCommand() == "Start") {
                   mon.start();
              } else {
                   mon.pause();
         public static void main(String args[]) {
              new Monitor();
    class Mon extends Thread {
         public void run() {
              while (true) {
                   System.out.println("Running...");
                   try {
                        sleep(1000);
                   } catch (InterruptedException e) {
                        e.printStackTrace();
         public synchronized void pause() {
              try {
                   wait();
              } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }I was wondering whether anyone could help me fix this or point out where im going wrong. Whenever the pause button is pressed, i want the thread to temporarily stop printing out "Running" until start is pressed again. At the mo, when i press the pause button, the gui locks up and the thread continues to print out running.
    Cheers.

    Thanks da.futt your advice helped me solve the problem, working example:
    package Util;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Monitor implements ActionListener {
         Mon mon = new Mon();
         public Monitor() {
              JFrame frame = new JFrame();
              JButton start = new JButton("Start");
              JButton pause = new JButton("Pause");
              pause.addActionListener(this);
              start.addActionListener(this);
              frame.setLayout(new FlowLayout());
              frame.add(start);
              frame.add(pause);
              frame.setVisible(true);
              frame.pack();
         public void actionPerformed(ActionEvent e) {
              if (e.getActionCommand() == "Start") {
                   try {
                        mon.start();
                   } catch (Exception ex) {
                        mon.restart();
              } else {
                   mon.pause();
         public static void main(String args[]) {
              new Monitor();
    class Mon extends Thread {
         private boolean running = true;
         public void run() {
              while (true) {
                   if (running) {
                        System.out.println("Running...");
                        try {
                             sleep(1000);
                        } catch (InterruptedException e) {
                             e.printStackTrace();
                   } else {
                        synchronized (this) {
                             try {
                                  wait();
                             } catch (InterruptedException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
         public void restart() {
              running = true;
              synchronized (this) {
                   notify();
         public void pause() {
              running = false;
              synchronized (this) {
    }

  • External Flickering in 10.6.6 (LG M227WDP)

    Hi, i have looked through the forums and seen a lot of people talking about screen flickering on there external monitors in 10.6.5 and then saying that the issue is gone in 10.6.6
    sadly this issue started for me in 10.6.5 and still remains even after i have updated to 10.6.6
    The issue only happens when i have my external monitor set to 1920x1080, i know that a simple fix to this would to just keep the resolution at 1680x1050 but this distorts images and videos and i dont see why i should have to do that when i have the ability to go higher.
    I would really love it if someone could help me out with this problem or if someone on the apple team could inform me of when this will be fixed as it has been 2 updates now since it started and its not been fixed.
    Thank you.

    I get this flicker on both my external monitor and my internal even if I have the external disconnected.
    I have an iMac with nVidia 8800GS and 10.6.6. I get flicker when running MythTV together with Flash video and certain games. Sometimes the GUI locks up altogether with this combination. Any one of them individually is fine.
    If I knew which older OS release didn't have this problem, I'd downgrade.
    Apple, please fix this. It's been this way for several releases of 10.6 and is extremely frustrating.

  • MacBook, Snow Leopard & iPhoto'09

    There have been several posts regarding Snow Leopard and graphics corruption, yet none seem to relate to the problems I'm having (or I haven't found one yet).
    I have recently upgraded my mid-2007 MacBook (2.16GHz C2D, 4GB RAM) to Snow Leopard and updated to 10.6.4 (using the combo update) and also upgraded iLife to '09.
    My problem occurs when using iPhoto'09 (8.1.2) to edit a photo. The display corrupts and the whole GUI locks up yet the machine is visible on the network with volumes and files accessible. The only way out of the graphics freeze is to power off. Following posts in the iPhoto forum, I have reinstalled iPhoto, repaired the library etc. etc.
    Interestingly this also happens on my MacMini. Both these machines have the embedded Intel GMA950 graphics controller.
    In an attempt to diagnose this, I installed SL & iLife on a USB HDD. Clean install from the retail disks, combo update for SL and Software Update for iLife. I get the same corruption when booting from this disk. Next up, I plugged this in to my daughter's MacBook (with an Intel GMS X3100 graphics controller) and it works fine.
    So, I conclude that it's the GMA950 drivers that causes the issue.
    Anyone got any thoughts, or a solution? (other than buying a new MacBook!)
    Thanks
    Steve

    How are you transferring the photos? In the iphoto preferences is look up loations st to automatically?
    LN

  • Internet Accesses Freeze Java Application

    I have been programming a Java application, which is actually an instant text messaging system, that obviously makes internet accesses.
    The thing is, I have got this JFrame, with JScrollPanes, JTextAreas for messaging, and whenever the user presses the magical 'send' button; till the reply comes, the window freezes; you know it turns into grey.
    The way I send the messages is just to call the method that makes the connections and writes the data.
    How should I modify my code that my application should not freeze while waiting response? Is there a way to decrease the priority of a method or something?
    Thanks in advance..

    To clarify a bit.
    When you press the button an event is generated and put into the
    event handling queue (which handles all awt/swing events such as redraws/resizes etc). The Queue is processed by the event processing
    thread which pulls the button pressed event from the queue, finds
    the associated eventHandlers and calls them. What this means is that
    any code inside your event handler is run in the Event handling thread
    which causes it to not be able to handle any more events until the
    code in your handler is finished. Therefore all refreshes/button presses
    /resizes etc. (everything to do with the GUI and some other bits too)
    stop responding until your handler returns. Creating network connections
    can take a fair bit of time which means your handler takes a fair amount
    of time which means that the GUI locks up for a fair amount of time.
    Right, that there is the reason your GUI stalls.
    now, as pkwooster said, the way around this is to create a seperate
    thread that handles your connections to the internet. At the simplest
    level this thread can be created inside your "button pressed" event handler
    . For more complex solutions you will need to find someway of notifying
    a running thread that you have more work for it.
    pkwooster also said that there is a lot of code in this forum on topics
    related to the task you are attempting. You might wish to take his
    advice and look for it.
    matfud

  • Infinity - slow browsing

    I just had my BT infinity installed a couple of days ago and I've had this slow browsing issue like many others.
    Perhaps this is old news but it's not a DNS issue, from a few searches I read about changing DNS settings which did not work for me (at least from the local settings).
    And also why does the HH3 (whatever brand that is?) has such a primitive interface, forgive me if I haven't done enough reading yet but is there a way to get proper stats from the router or the modem directly (i.e SNR, error readings and attenuation?) and a more advanced than the "advanced" interface?
    Si to complete my post, I believe the issue is with the automatic wifi channel assignment for those on wifi at least.
    Use inSSIDer to identify which channels interfere with your signal around your property and manually set your channel in the HH3 router instead of the smart option. As soon as I did this, the pages started loading at light speed. Hope this helps and sorry if it is old news.

    UrbanGrunt wrote:
    mogsy52 wrote:
    soapy wrote:
    the only way to read line stats is through the openreach modem but as someone says it is locked down and you can only access the gui of the modem by "unlocking" it which can be done fairly easily
    Depends which openreach modem it is. The HG612 can be unlocked with custom firmware but I've yet to find an easy way to do the ECI (which I have). It's a bit pointless having the GUI locked down
    Unlocking the ECI is very simple if you have the right tools to hand. Takes 5 mins max
    Yeah but that involves Jtag rather than just a firmware download doesn't it? Never done anything jtag wise before.

Maybe you are looking for

  • How do i run a java program an another directory?

    How do I run a java program that's in a different directory? I have been doing this in the command line: java "C:\Document and Settings\freeOn\Desktop\Java\Test\test" and I get Exception in thread "main" java.lang.NoClassDefFoundError: C:\Document an

  • Safari on leopard 5.0.6 doesn't respond

    My safari on leopard 5.0.6 doesn't respond after a few page loads. This occered just after i downloaded an app to download music from you tube does this have anything to do with it? Date/Time:      2011-11-16 20:26:09 +1100 OS Version:     10.5.8 (Bu

  • Can a pdf presentation be converted to a format for a dvd to play on TV?

    Mac OS 10.4.11 Acrobat Professional 8.1.2 I have a whole series of pdf presentations containing 80 to 200 images each. I need to be able to put this information onto a DVD such that Joe Public can view it on a TV. Clearly I could not rewrite every pr

  • Importing Expense Report from legacy to Oracle Payables??

    All, I need to import ER from legacy to payables. I used ap_expense_reports_headers_all & ap_expense_report_lines_all tables. But the "Expense Report Program" is not picking up the data from the tables though i populated all the required columns of t

  • AirDrop showing the wrong name and picture with iOS 7

    AirDrop is showing the wrong name and picture on my wife's phone....It is showing my name and picture.  She has an iPhone 5 and I just updated her to iOS7 about an hour ago, same time as I did mine. Is it because we are connected with the same Apple