Application hang ? Perhaps white one of the threads is blocked on system.in

Hi All,
I have a SE application that does mainly GUI and takes additional input from System.in.
It seems that the application hangs from time to time.
Weired enough, my way to reproduce the problem is by running MS Spy++ while the application is waiting for input from System.in
I'm in the dark - any clues?
Thanks,
Jacky

First, thanks for your quick reply. Here are some more details (which I probably should included in the first place)
My code has two threads - The main that does the GUI (Swing).
The second thread takes input from external process (as a pipe) using:
private Scanner scanner = new Scanner(new BufferedInputStream( System.in), "UTF-8");
and:
String s = scanner.next();
I tried to use system.in.available() and scanner.hasNext() to make sure that I have something to read but it didn't seem to help.
One more data point - the problem seems to happen in Windows XP but not with Win 7.
Thanks for the help,
Jacky

Similar Messages

  • I just bought my the new ipad black 64gb wifi   4g, but I really like white one.Because the shop finished white one and I want to buy it immediately and I bought black one. Now Can i change a white?

    I just bought my the new ipad black 64gb wifi   4g, but I really like white one.Because the shop finished white one and I want to buy it immediately and I bought black one. Now Can i change a white?

    There's nothing anyone here can do to help you return your iPad; we're all just fellow users. Call the store from which you purchased your iPad and ask about their return policy.

  • How can I merge conference calls and hang up on one of the instead of both on iOS 8.1.1

    How can I merge phone Calls and make conference calls with iOS 8.1.1 and hang up on one instead of both of them , it's not giving me an option like before on iOS 7 ?

    The following from the 8.1 user manual (http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf) may help
    Create a conference call. While on a call, tap Add Call, make another call, then tap Merge Calls. Repeat to add more people to the conference.
        Drop one person: Tap  next to a person, then tap End.
        Talk privately with one person: Tap , then tap Private next to the person. Tap Merge Calls to resume the conference.
        Add an incoming caller: Tap Hold Call + Answer, then tap Merge Calls.

  • My application hangs after 10 hours in the serialport read sub-vi. Why?

    My application is programmed under LabView 5.1.1 on a windows 2000 platform.
    I use a MOXA RS232 extending module with a B&B RS485- converter.
    After 10 hours trouble-free working, the application, using semaphores, hangs in the serialport read sub-vi.
    In the same constelation without RS485-converter, once the application hanged up in the serialport write sub-vi. After Restarting LabView I was still not able to access the serial port. So I had to restart the PC.

    I am not sure, but it looks for me as some buffer overflow error.
    Like you read or write something before it is ready.
    Try to play with the lines like DTR and so on.
    regards
    PP
    Isildur wrote:
    >
    > My application is programmed under LabView 5.1.1 on a windows 2000
    > platform.
    > I use a MOXA RS232 extending module with a B&B RS485- converter.
    > After 10 hours trouble-free working, the application, using
    > semaphores, hangs in the serialport read sub-vi.
    > In the same constelation without RS485-converter, once the application
    > hanged up in the serialport write sub-vi. After Restarting LabView I
    > was still not able to access the serial port. So I had to restart the
    > PC.

  • URG & IMP: How does one stop the Thread.currentThread?

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to help.
    If I try Thread.currentThread.isAlive() post tehinterrupt, it doesnot work as desired and teh thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile varible to stop the thread as recommended by sun and since this is the currentThread, it cannot be assigned to null.
    Thanks
    Priya

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()Whyever would a thread want to deliver a stop() to itself.
    Did you mean that you wanted to stop() a different thread?
    As indicated in the (depreaction) documentation for stop(), using interrupt()
    is a better idea. However, that requires you to have a protocol
    where the receiver of the interrupt then reacts in an appropriate
    manner, i.e. interrupt() can be the basis for cooperative
    thread termination; it can't merely replace a stop() call
    in an existing application without any other changes.
    >
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to
    help.
    If I try Thread.currentThread.isAlive() post
    tehinterrupt, it doesnot work as desired and teh
    thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile
    varible to stop the thread as recommended by sun and
    since this is the currentThread, it cannot be
    assigned to null.Think about what you are trying to achieve. Did you want
    to just do a Throw() out of the current method, with (or
    without )a corresponding Catch() in some outer context)
    so that the you can unwind in case of an exceptional
    condition and have the thread exit?
    >
    Thanks
    Priya

  • How can one use the physical memory of our system rather than virtual memory while running Labview?

    We have a Windows NT system with 2 Gb of physical memory and would like to utilize the RAM fully using Labview. What usually occurs is that Labview uses a tremendous amount of page file space while a majority of the physical memory is unused. Is there a way to configure Labview (or our system) to overcome this problem? It seems that our processes would be much faster if they were mainly using the physical memory. Is it possible to trick the system, by creating a RAM disk and allocating this as virtual memory space?

    > We have a Windows NT system with 2 Gb of physical memory and would
    > like to utilize the RAM fully using Labview. What usually occurs is
    > that Labview uses a tremendous amount of page file space while a
    > majority of the physical memory is unused. Is there a way to
    > configure Labview (or our system) to overcome this problem? It seems
    > that our processes would be much faster if they were mainly using the
    > physical memory. Is it possible to trick the system, by creating a
    > RAM disk and allocating this as virtual memory space?
    LabVIEW the application doesn't know anything about physical versus
    virtual memory. LV asks the OS for general purpose memory and goes
    from there.
    Drivers like DAQ and IMAQ will have a combination of general user
    memory and page lo
    cked physical buffers.
    I'm not up on the details, but this is something that the OS is in
    control of, so that is where you need to look for the solution. One
    of the things to look at is the disk cache. By default, I think that
    NT takes a percentage of the RAM to use for disk cache. With that
    much RAM, this is probably unnecessary and is using too much.
    Similarly, the OS may be attempting to keep the working set size
    to a fraction of the total RAM to reserve space for other things.
    It doesn't make sense to me, but then I don't work for MS.
    Greg McKaskle

  • Is there a way to close the PO even if one of the item is blocked?

    Is there a way to close the PO even if one or more item is blocked?

    You can block the items at any time. If you get errors, then you have to take care about them individually.
    However you just create problems for standard SAP design of archiving. As I already said, SAP cannot archive blocked orders. Deletion indicator is precondition for archiving.
    This deletion indicator is usually set with the archiving prerun program, but it does not set deletion indicators for blocked items.

  • Need to hide one of the selction screen block

    Hi Gurus!
    I need to hide one of the block in my selectrion screen and only display one radio button in that selection screen block . Somehow its not hiding the enitre block , so I tried doing the fields invisible but when it is transported it again makes it visible . Is it possible to do it through programming code itself rather than through screen.
    Follwoing is the block that I need to hide.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
    PARAMETERS:
    rb_list RADIOBUTTON GROUP rb1 DEFAULT 'X' USER-COMMAND opt.<<<<<<<<need to hide this
    SELECTION-SCREEN BEGIN OF BLOCK b4i WITH FRAME TITLE text-005 .<<< need to hide this block
    PARAMETERS: p_header AS CHECKBOX MODIF ID b5,
                p_send   AS CHECKBOX MODIF ID b5 USER-COMMAND opt,
                p_overr  TYPE sy-uname MODIF ID b6,
                p_alines AS CHECKBOX MODIF ID b5.
    SELECTION-SCREEN END OF BLOCK b4i .
    PARAMETERS: rb_alv  RADIOBUTTON GROUP rb1 DEFAULT 'X'.<<<< Just need to show this on my selection screen
    SELECTION-SCREEN END OF BLOCK b4.
    In the above code I need to hide the block b4i and the radiobutton rb_list.
    Help will be gretaly appreciated.
    Regards
    Aarav

    Hi!
    Thanks for the input but addition of that still gives me the first radiobutton 'rb_list 'in my selection screen .
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004 .
    PARAMETERS:rb_list RADIOBUTTON GROUP rb1 MODIF ID rad .<<<<< This is still showing up --want to hide this
    SELECTION-SCREEN  BEGIN OF BLOCK b4i WITH FRAME TITLE text-005 .<<<<< want to hide is block completely
    PARAMETERS: p_header AS CHECKBOX MODIF ID b5 ,
                p_send   AS CHECKBOX MODIF ID b5 USER-COMMAND opt,
                p_overr  TYPE sy-uname MODIF ID b6,
                p_alines AS CHECKBOX MODIF ID b5.
    SELECTION-SCREEN END OF BLOCK b4i .
    PARAMETERS: rb_alv  RADIOBUTTON GROUP rb1 DEFAULT 'X'.<<< Just need to show this param,etere on the screen
    SELECTION-SCREEN END OF BLOCK b4.
    * At Selection screen output
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF rb_list IS INITIAL AND ( screen-group1 = 'B5').
          screen-active = '0'.
          MODIFY SCREEN.
        ELSEIF screen-group1 = 'B5'.
          screen-active = '1'.
          MODIFY SCREEN.
        ENDIF.
        IF p_send IS INITIAL AND screen-group1 = 'B6'.
          screen-active = '0'.
          MODIFY SCREEN.
        ELSEIF screen-group1 = 'B6'.
          screen-active = '1'.
          MODIFY SCREEN.
        ENDIF.
        CHECK screen-group1 = 'RAD' OR
              screen-group1 = 'B4'  OR
              screen-group1 = 'B5'  OR
              screen-group1 = 'B6' OR
        screen-active = 0.
        MODIFY SCREEN.
    Thanks
    Edited by: Aarav  Agnihotri on Sep 29, 2009 6:08 PM

  • TLS cipher suites: Is there any Windows application that is using one of the two NULL cipher suites?

    My question is about these two standard cipher suites from Windows 7/8 (and Windows Servers):
    TLS_RSA_WITH_NULL_SHA256
    TLS_RSA_WITH_NULL_SHA
    Question: Is there any native Windows 7 application/process that must use one of these two ciphers?
    If not, I would simply kick them out to make sure that they are never used.
    Bonus question: Is there any reason to keep these on any Windows Server?

    Thank you for your response. I kicked out the NULL ciphers and everything weaker than 3DES. Consequently I also deactivated SSLv3 on five windows clients (computers and not servers, no server admin here). Rearranged the order of preference according to
    my needs. So far I don't experience any issues. Did the same with JRE many years ago (just kicked it out), now I lean back and enjoy the show.

  • Can one use  the iphone with car  stereo systems as one does an ipod?

    My car has a "jack" for mpegs/ipod to interlace with the existing stereo. Is there an accessory that will allow me to use my iphone as one would an ipod with such systems?

    Dewey Cheatum,
    Apple doesn't make most of the adapters out there. Instead Apple provides the specifications so that other manufacturer's can make products that are labeled as "Works with iPhone".
    I would contact the manufacturer of the car stereo to see if they have one that is certified by them to meet the "Works with iPhone" standard. If the radio came with the car, then the dealer and car manufacturer would be the resource to utilize.
    This link described how manufacturer's can get their products labeled as "Made for iPod" or "Works with iPhone".
    http://developer.apple.com/ipod/accessories.html
    Hope this helps,
    Nathan C.

  • Getting all the threads running in one JVM from another JVM ...

    I want to get all the threads running in one JVM from another JVM.
    Is it possible ?
    namanc

    I am going to write a java application that prints all the java application running at the background. And this application has a control over all the threads. means killing the threads, restart the thread etc
    namanc

  • Application hangs when using ProcessStartInfo and Process.WaitForExit.

    I've looked on different threads about this, but all of them uses the Process.RedirectStandardOutput = True, which I don't.
    I'm trying to open a process (console application, not made by me) to make it compile a special .acs file to a .o file. The structure is simple, the only argument is the file you want to compile.
    But on certain files my application hangs when trying to open the process. Here's my code:
    Dim p As New Process
    Dim ps As New ProcessStartInfo
    ps.Arguments = SavePath 'Path example: "C:\Program Files (x86)\Zandronum\File.acs"
    ps.FileName = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory(), "Script Compilers\Zandronum\acc.exe")
    ps.CreateNoWindow = False
    ps.ErrorDialog = False
    ps.UseShellExecute = True
    ps.WindowStyle = ProcessWindowStyle.Hidden
    ps.WorkingDirectory = Path.GetDirectoryName(SavePath)
    Dim ErrorCaptured As Boolean = False
    Try
    p = Process.Start(ps)
    Catch ex As Exception
    ErrorCaptured = True
    End Try
    If ErrorCaptured = False Then
    p.WaitForExit()
    End If
    If ErrorCaptured = True Then
    Exit Sub
    End If
    Thanks!
    //Visual Vincent
    EDIT:
    For starting the process I use pretty much the same code that another guy made in C#. And his code is working perfectly...
    // Setup process info
    processinfo = new ProcessStartInfo();
    processinfo.Arguments = args;
    processinfo.FileName = Path.Combine(this.tempdir.FullName, info.ProgramFile);
    processinfo.CreateNoWindow = false;
    processinfo.ErrorDialog = false;
    processinfo.UseShellExecute = true;
    processinfo.WindowStyle = ProcessWindowStyle.Hidden;
    processinfo.WorkingDirectory = this.workingdir;
    try
    process = Process.Start(processinfo);
    catch(Exception e)
    // Unable to start the compiler
    General.ShowErrorMessage("Unable to start the compiler (" + info.Name + "). " + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
    return false;
    // Wait for compiler to complete
    process.WaitForExit();
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

    Hi,
     Have you compared the FileNames and Arguments of ones that work and ones that don`t? Is there any difference in them such as the ones that work do not contain blank spaces in the FileName or arguments and the ones that do work don`t contain blank spaces
    in them? If you find that to be the problem then you need to add Quotes to the beginning and end of the FileName or Arguments.
     My first guess is the Arguments needs the Quotes like this because, i see blank spaces in your example of the Arguments.
    ps.Arguments = Chr(34) & SavePath & Chr(34)
    If you say it can`t be done then i`ll try it
    This actually made it. I had forgotten that blank spaces makes it a new argument, silly me. I don't use process arguments that often. ;)
    Thanks alot!
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

  • Application hangs on filterFunction

    Hello all,
    I'll try to describe the problem before posting the code, which is a little bit long.
    I have a search popup with a dataGrid, who's dataProvider is connected to an ArrayCollection object, which is fed by a HTTPService that is reloaded every 5 minutes.
    When I launch the application for the first time and the popup is called, the application hangs. If I refresh the browser and repeat the exact same steps, the application works perfectly.
    The size of the data loaded into the ArrayCollection does not influence the results; I have tried with one record and the full size, 3Mb, and the problem keeps going on.
    Has someone gone through this issue before ? Any suggestions ?
    Thanks in advance.
    André

    First question is - did you get a thread dump?
    On Solaris, if you run the app in a terminal window, then type C-\ (control-backslash) you get a thread dump. What you'll be looking for is multiple threads "waiting for monitor" on the same object.
    - David

  • Firefox hangs when accessing video and the process has to be killed

    Relatively new problem. Seems to affect version 5 as well as older versions. Running current version of Adobe Flash. Firefox hangs COMPLETELY. No buttons of any sort are active. Have to use procexp.exe to kill Firefox. Just before the hang it says one of the following: Waiting for AD-g.doubleclick.net or Waiting for Motifcdn2.doubleclick.net or Waiting for Static.inplay.tubemogul.com or Transferring data from S0.mdn.net. If I leave machine running with Firefox hung in this state, the machine eventually gets Blue Screen Of Death. None of this happens when I use Internet Explorer to access exactly the same sites and videos (Youtube for example but the problem is NOT confined to Youtube. It seems to randomly occur even in yahoo videos.) I am a software engineer with only 45 years continuous experience writing scientific software so it could be me? :-) I've tried Firefox 3.6.8, the update to that (was it 3.6.18 or something), and Firefox 5.0. Also tried an older version of flash but nothing seems to help. Again Internet Explorer is NOT having these problems. I will be using IE as primary until whatever is wrong is fixed... Darn! I really liked FireFox... Thanks!

    At this point we want to pinpoint exactly where in your code this behavior is originating from. Try running the included examples which can be found here:
    C:\Program Files\National Instruments\MeasurementStudio\CVI\samples\IMAQ\Display
    C:\Program Files\National Instruments\MeasurementStudio\CVI\samples\Vision\1.GettingStarted
    and see if you experience the same behavior. If we still experience this, then we know that it is a setting within the functions that we need to change. If not, we know that it is somewhere else in the code of the bigger project which is the culprit. 
    Daniel G.
    Applications Engineer
    National Instruments

  • Open Attachment Application Hangs

    Open Attachment Application Hangs
    1.open item (all the Attachment)
    2.query record
    3.view(menu)->Attachment
    When user try to view the attachment that has been attached , Application hangs!
    application:EBS:11.5.10.2
    db:10.2.0.5
    Thanks!

    Does this happen in all forms or specific ones only?
    Any changes have been done recently?
    --Yes.This is new install ebs 11i,upgrade ATG7\sun JDK 1.6_20\other application (as:ar,ap,fa,gl,om,inv and so on)
    Please verify if you have any errors in the database log file.
    ---No errors (applications and database)
    I hava try the follow command
    Generate jar files
    Generate Applications Files menu
    Compile/Reload Applications Database Entities menu
    Reload JAR files to database
    but the issue still.
    Edited by: gavin on 2010-9-19 上午1:52

Maybe you are looking for

  • My impression after 1 day having my Ipad2

    Hi everybody, I just wanted to share my first impression on my Ipad2. As a non-apple user (I never had any Apple related computer, Ipod,...) In Spain the release dat was last friday. Well here go my impression of my Ipad2 32GB + 3G: 1) First of all t

  • M trying to connect a wireless Samsung 2525W printer

    Hi I know it should be easy but I am trying to connect a wireless Samsung printer to my network without success It offers WPA personal or WPA2 personal - have tried both think WPA2 the right one Then offers AES or AES&TKIP - think either should work

  • Processing of aquired signal during aquisition (arrays?)

    Hello, I'm aquiring a voltage signal from a thermistor using DAQ and Labview. I'm using "for-loop" in Labview for that. Is it possible to take my previous readings of the voltage signal (through A/D channel), say, V(i-1), compare it to its current va

  • Re: NoClassDefFoundError

    This is a classpath problem.           Please try following,           C:\BEA\wlserver6.0\config\examples>java -classpath           C:\BEA\wlserver6.0\lib\weblogic.j           ar weblogic.jspc           It should work.           "stephen zeng" <[emai

  • Rename GO Button

    Hi All, I would like to rename GO button as Query. Could you please help? Thanks, Suresh.