Thread is not dying

public t() {
     mytable = new myTable(day,hour,minute,show,toggleTime);     
     table = mytable.getTable();
public class myTable{
myTable(Vector day, Vector hour,Vector minute,Vector show,long toggle_Time) {
createTableLayout(day,hour,minute,show);     
     this.toggleTime=toggle_Time;//in milly second
public JTable getTable() {
return table;
private JComboBox createComboBox(Vector colVector)
     JComboBox comboBox = new JComboBox(colVector);     
     comboBox.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e) {
          startThread();
     return comboBox;
private void startThread()
     if(this.thread !=null)
          try{
          this.thread.stop();
          this.thread.join();          
          thread=null;
          s.stop();
          }catch(java.lang.InterruptedException iexp)
               System.out.println("From myTable:"+iexp);
     s=new selectURLToDisplay(table,toggleTime);
     threadFromSelect=s.getThread();
     thread=new Thread(s);
     thread.start();     
class selectURLToDisplay implements Runnable { 
public void run() {
     readTableData();
     running= true;                    
     return;
If I change the value in the combobox of the table it creates a thread with the new table data. But it can't stop the previous Thread .. Any idea .
please help.

Thread termination is a [very] frequently discussed topic, answered numerous times in this forum -- why don't you do a search?
Briefly, threads need to cooperate in order to do graceful interruption and joining. Thread.stop() is not the correct approach to the problem.

Similar Messages

  • Threads not dieing

    would there be any reason for a thread not dieing after the run
    method completes ?
    my run metho completes, but the reads still appear in the '.activeCount()' result
    from Thread.currentThread() ... ???

    wow, so majinda was right; hmm.Amazingly, yes.
    i suppose to be completely sure i need to track them
    myself then ?Yes, I guess so. I looked at the API for 1.5 and noticed the following additional comments:
    "The result might not reflect concurrent activity, and might be affected by the presence of certain system threads.
    Due to the inherently imprecise nature of the result, it is recommended that this method only be used for informational purposes."
    What these "informational purposes" are, I have no idea ...
    any hints on what it uses to do this 'estimate' ... ?Not without looking at the code in more detail. Whatever it uses seems to generate race conditions though.

  • BSP session not dying when browser window closes

    Hi,
    I am having a small problem with the bsp session. I shall explain the prb with an example.
    Lets say i have a bsp application BSP1. I open the application from the Favorites tab in the SAPGUi.
    Initially, i have another browser window open containing google.com(this is imp that i have another browser open all the time containing anything). I now start BSP1, then i close the window by hitting the close button of the browser, as a result the controller sends a exit view back to the frontend which never gets displayed. now i start BSP1 again from SAPGUi, and the browser instead of showing me the logon screen and the start page goes to the exit page of the application. In other words to the last URL that i visited last time in the application. Somehow when the window is closed, the session on the applicaiton server is not dying. This only happens if i have any other browser open all the time containing any thing.
    If i do not have any other browser open, and then i follow the above sequence of events,everything runs smoothly. Also, in the previous case, if i close the google window also and start the application again, everything runs smoothly. In IE settings , in Advanced tab there is a setting for REUSE EXISTING WINDOWS FOR LAUNCHING SHORTCUTS. If i set this option, everything runs smoothly, even if i have a Google(whatever) window open all the time. If i do not set this option, i run into the problem as in the first case. Also, if instead of opening the application through the SAPGui i open another browser from the taskbar and type in the URL , everything runs smoothly inspite of another google window being opened all the time.
    Also this problem is evident in systems with BASIS 640/level 10 and BASIS 620/level 19. It might be present in other versions also but i am working on these two systems with these versions. This problem does not pop up on BASIS 700.
    If on exit, within the controller, i reset the keep_context attribute of RUNTIME  object, everything runs smoothly.
    could you please guide me as to what can be the problem here and how it can be solved. It is important. Any kind of help and guidance would be highly appreciated.
    Looking forward to your response,
    Thanks and best regards,
    Ghufran

    The very first important aspect to understand is that CANCEL kills the session long before the request reaches the ABAP stack. So what ever you want to do, this is not the way to go.
    From reading your first post in this thread through, I have the impression that you might have some confusion between stateful versus authentication. No, I it is not the problem/solution, but just that your very long descriptions without using consistant terminology makes it difficult to understand where we are going.
    Thus, I would recommending read this article for background information:<a href="/people/mark.finnern/blog/2003/09/24/bsp-in-depth-confusion-between-stateless-stateful-and-authentication">BSP In-Depth: Confusion between Stateless, Stateful and Authentication</a>.
    Next, you CAN NOT "redirect it to the browser on the onbeforeunload() event". Well, at least I never have never succeeded.
    Once the closed button is hit, you have not many options. One idea is a window.open, see system application for examples. The other is the image loading trick that Thomas describes in his weblog. Both ideas will actually solve your problems (once you really understand what is happening). This is unfortunately not always perfectly easy.
    brian

  • I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

    made in cosmos help please need it
    using System;
    using Cosmos.Compiler.Builder;
    using System.Threading;
    using System.Windows.Forms;
    namespace IUOS
        class Program
            #region Cosmos Builder logic
            // Most users wont touch this. This will call the Cosmos Build tool
            [STAThread]
            static void Main(string[] args)
                BuildUI.Run();
            #endregion
            // Main entry point of the kernel
            public static void Init()
                var xBoot = new Cosmos.Sys.Boot();
                xBoot.Execute();
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                a:
                Console.WriteLine("------------------------------");
                Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
                Console.WriteLine("------------------------------");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\t _____                                
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |___________");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
                string input;
                Console.WriteLine();
                Console.Write("\nAbout OS     : a");
                Console.Write("\nTo Shutdown  : s");
                Console.Write("\nTo Reboot    : r");
                Console.Write("\nStart Windows Normaly : n");
                Console.WriteLine();
                input = Console.ReadLine();
                if (input == "s" || input == "S"){
                    Cosmos.Sys.Deboot.ShutDown();
                else
                if (input == "r" || input == "R"){
                    Cosmos.Sys.Deboot.Reboot();
                else
                if (input == "a" || input == "A"){
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    Console.Clear();
                    Console.WriteLine("\n\n\n-------------------------------------");
                    Console.WriteLine("version: DISPLAYS OS VERSION");
                    Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                    Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                    Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                    Console.WriteLine("-----------------------------------");
                    Console.Write("You Want to know : ");
                    input = Console.ReadLine();
                    if (input == "version"){
                        Console.WriteLine("--------------------");
                        Console.WriteLine("OS VERSION 0.1");
                        Console.WriteLine("--------------------");
                    else
                    if (input == "about"){
                        Console.WriteLine("--------------------------------------------");
                        Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                        Console.WriteLine("--------------------------------------------");
                    Console.Write("Want to go back to the main window");
                    Console.Write("\nYes : ");
                    string ans = Console.ReadLine();
                    if (ans == "y" || ans == "Y")
                        goto a;
                        Thread.Sleep(10000);
                    else
                    if (input == "n" || input == "N")
                        Thread.Sleep(5000);
                        Console.Clear();
                        for (int i = 0; i <= 0; i++){
                            Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                            Console.Write("\n\t\t|\t\t |  |      |    |     
    |   |  | |  |  |");
                            Console.Write("\n\t\t|\t|    |  |----  |    |     
    |   |  | |  |  |---");
                            Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                            Thread.Sleep(500);
                        Thread.Sleep(5000);
                        Console.Clear();
                        BootUserInterface();
                        Console.ReadLine();
    //                    Form1 fo = new Form1();
                    else{
                        for (int i = 0; i <= 5; i++){
                            Console.Beep();
                            Thread.Sleep(1000);
                            goto a;
                while (true);
            private static void BootUserInterface() {
                Thread t = new Thread(UserInterfaceThread);
                t.IsBackground = true;
                t.SetApartmentState(ApartmentState.STA);
                t.Start();
            private static void UserInterfaceThread(object arg) {
                Form1 frm = new Form1();  // use your own
                Application.Run(frm);
     

    Hi
    Jalil Cracker,
    >>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
    Could you post the error information? And which line caused this error?
    If you want to show Form1, you can use form.show() method
    Form1 frm = new Form1();
    frm.Show();
    In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • B1 8.8 EventLogger:  Cross-thread operation not valid

    Greetings,
    I'm  trying to run EventLogger on Windows Server 2008 for use with B1 8.8.  I converted EL to VS 2005, updated it to use the new UI for 8.8 and when EL runs it crashes as soon as it receives an event.
    The message is "Cross-thread operation not valid: Control 'ToolBar1' accessed from a thread other than the thread it was created on.
    Does anyone have any ideas?  I wouldn't be surprised if it's a security issue, but I wouldn't know how to fix it even if it were.
    Thanks!

    Sheer Genius, Eddy - thanks!
    I tried recompiling the program and used the advanced compile option to tell it X86 but that didn't solve it (by itself, anyway) but when I used the compability mode everything was smooth.

  • Help! facebook saying "this message thread is not available"

    dear all
    i have had facebook installed for 3 months now on my curve, but the past 3 days when i open any message, it says 'retrieving message thread', then "this message thread is not available" every time.
    any ideas as its very frustrating!!! 
    thanks
    Solved!
    Go to Solution.

    This is a good alternative but having a apps dedicated for facebook and not being able to take the benefits of it is very dissapointing!!!
    You better delete the application from your device and download it again. Now check the behavior!
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • HT2731 How can I change my store to US, now that I am in the US? A link in a previous thread says not accessible as the profile still shows different country..

    How can I change my store to US, now that I am in the US? A link in a previous thread says not accessible as the profile still shows different country..

    As long as you have a form of payment (credit or debit card) with a USA source, and with a billing address in the USA, then you just need to change your payment information on your account to that, change your country in the store settings, and you will then be able to shop in the USA store.
    Your AppleID will work in any country's store, as long as your payment source and billing addres are also specific to that country (and you are in that country as well, as there may be IP filters in place to stop use outside of the country).

  • Thread does not get notify

    Hello,
    I start 10 Threads.
    If a thread must wait till recourse are valid then I call wait() method.
    If any recourse are valid another synchronized method calls notify() method to wake up the thread.
    I have the problem, that some the treads are in wait status and these will never wake up again!
    This happens exactly, when I choose for example 10 Threads and 5 recourses, or 8 Threads and 4 resources, etc..
    What could be the problem, that some threads do not get notify, even when I use netofyAll() method, the situation is the same!

    Most likely problem is that you haven't used synchronized sections properly to manage the flags on which you're waiting.
    e.g. notify is being called before wait has done it's thing.

  • Did not die after sending SIGKILL

    In the past 2 days, I've experienced significant slowdown.
    The only thing new is that I'm attempting to switch from Eudora to Mail.
    Here's what is repeating -- ENDLESSLY -- per Console:
    ...com.apple.launchd[1] (com.apple.RemoteDesktop.agent[74]): Did not die after sending SIGKILL 865 seconds ago...
    I have searched and there is no RemoteDesktop or ARD accessible on my machine!
    HELP

    Just FYI, all copies of Mac OS X since, I believe, 10.4 have the Remote Desktop client included.
    Check the Sharing preferences and see if either Remote Management or Screen Sharing are checkmarked. If either are, uncheck them and see if that stops the messages.
    I presume you've restarted your computer, yes?
    Regards.

  • Macbook pro running windows 8.1 system thread exception not handled

    Running Windows 8.1on MacBook Pro with dual operating system. Get BSOD on boot up with following message - system thread exception not handled but no error code.  Have checked drivers all seem to be updated. Ran fine for a few weeks but Is happening daily also external speakers are not working - please help.

    Was W8.1 installed using Bootcamp? Are BC drivers installed? What year/model is the MBP?

  • [SOLVED] xss-lock does not die on logout

    Hello,
    I am trying to find a workaround for the problem I mentioned here
    So far I have installed i3lock from the standard repository and xss-lock from the AUR. I disabled screen locking and screen blanking in Gnome. I added the following desktop files to both users ~/.config/autostart
    [Desktop Entry]
    Type=Application
    Exec=xss-lock -- 'xautolock -locknow'
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name[en_US]=SuspendLock
    Name=SuspendLock
    Comment[en_US]=AutoLock the screen before suspend
    Comment=AutoLock the screen before suspend
    [Desktop Entry]
    Type=Application
    Exec=xautolock -time 3 -locker 'i3lock -d -c 000000'
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name[en_US]=XautoLock
    Name=XautoLock
    Comment[en_US]=AutoLock the screen
    Comment=AutoLock the screen
    I also added a custom keyboard shortcut:
    xautolock -locknow
    with the accelerator set to Super+L
    So far, it seems like this will work fine. It seems to be working better than GDM locking. I have seen one problem thus far... If I log out of Gnome, xss-lock continues to run. If I log in again, I get a new xss-lock process. The original process continues to run and has one core at 100% load. If I log out again and log in again, I get yet another xss-lock process. This also runs at 100% load. This same phenomenon happens if I start the xss-lock from a terminal. xss-lock does not die on logout...
    Why does xss-lock not die on logout?
    Should I be using a systemd service file instead of xss-lock? I did try the service file, but it seems to work inconsistently because the DISPLAY variable continues to change.
    Any suggestions?
    Last edited by bnb2235 (2014-09-28 12:17:32)

    Hi bnb2235,
    I've seen the same behavior from xss-lock.  This is what I've done to set things up with i3 on my laptop:
    1) I don't use systemd and/or an autostart file for xss-lock
    2) I start xss-lock with the following line near the end of my i3 config file:
    exec --no-startup-id xss-lock -- i3lock -b -i /home/username/.config/i3/metal_grid_w_arch.png &
    3) My i3 nagbar looks like so in the i3 config file:
    # exit i3 (logs you out of your X session)
    bindsym $mod+Shift+e exec --no-startup-id "/usr/bin/paplay /usr/share/sounds/Feather/beep.wav && i3-nagbar -f pango:Arimo -t warning -m 'WHAT DO YOU WANT TO DO?:' -b 'Shutdown?' 'systemctl poweroff' -b 'Reboot?' 'systemctl reboot' -b 'Exit i3?' 'killall xss-lock && killall nm-applet && i3-msg exit'"
    So I explicitly kill xss-lock and nm-applet priot to i3 being exited. This has kept xss-lock from exhibiting the behavior you describe (as well as prevents coredumps from nm-applet when i3 exits).
    Last edited by halocaridina (2014-09-25 01:43:52)

  • Self tuning threads are not releasing even though server running fine.

    One of the cluster instance is running fine and serving the requests with good response but there self tuning threads are not releasing .I am not seeing any stuck threads in logs and no errors. why threads are not releasing.How we can troubleshoot this issue. May I know what are the cause of this.

    Arun thanks for your quick response
    Here is the threads details
    Active Execute Threads 192     
    Execute Thread Total Count 222
    ExecuteThreadIdleCount 190     
    QueueLength 0
    PendingUserRequestCount 0
    completed request count 36659285
    HoggingThreadCount     1     
    StandbyThreadCount 30     
    Throughput 7.5     
    More number of threads are waiting for lock
    Here is the sample thread dump.
    "[ACTIVE] ExecuteThread: '218' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock weblogic.work.ExecuteThread@faf757 WAITING
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:474)
         weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:156)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:177)
    "[ACTIVE] ExecuteThread: '217' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock weblogic.work.ExecuteThread@12c34ef WAITING
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:474)
         weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:156)
    some threads are blocked
    ExecuteThread: '9' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@1f39d37 BLOCKED
         weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:93)
         weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    "ExecuteThread: '8' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@1f39d37 BLOCKED
         weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:93)
         weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:177)
    "[STANDBY] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock weblogic.work.ExecuteThread@1bd18aa WAITING
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:474)
         weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:156)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:177)

  • JMF threads can not stop?

    My program is designed for two-way audio conference, but now I met a problem that there are some threads can not stop before I start some calls(maybe 100 times).How can I release this threads? please help me, thank you in advanced.
    RTPEventHandler
    JMF thread: com.sun.media.ProcessEngine@6b9fee[ com.sun.media.ProcessEngine@6b9fee ] ( configureThread)
    JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler
    JMF thread: SendEventQueue: com.sun.media.ProcessEngine
    JMF thread: com.sun.media.processor.unknown.Handler@1ca8dc7[ com.sun.media.processor.unknown.Handler@1ca8dc7 ] ( configureThread)
    JMF thread: com.sun.media.ProcessEngine@e1d29e[ com.sun.media.ProcessEngine@e1d29e ] ( configureThread)

    Hi TGreybeard,
    Have you looked at the [[Firefox keeps opening many tabs or windows]] Knowledge Base article? There is some good information in there that should help you resolve the issue.
    Hopefully this helps!

  • Fail to upgrade my laptop to Windows 10 due to :"system thread exception not handled ndis.sys"

    Hi,I am trying to upgrade my Toshiba satellite Z30 laptop from windows 8.1 to windows 10.every time i try( and i tired more than 8 times already), it goes all the way to finishing installing the drivers and then after the auto reboot it comes up with a :"system thread exception not handled ndis.sys" error. at the second boot phase.I have an Intel I218V network adapter and an Intel(R) Dual Band Wireless-AC 3160.I tries upgrading them manually to a windows 10 compatible driver before the install but still no success.I also tried a clean booot and disabling both adapters before upgrading.does anyone have an additional idea of how to solve this problem? thanks Amose

    My many Win 10 install attempts have failed similarly. In the final phase of install during "Configuring Settings" I get the error message: "System Thread Exception Not handled...."  I'm not sure if it reads, "ndis.sys" at the end. The message doesn't remain long.I have a Satellite L355-S7905 with Windows 7 Home Premium. 

  • Enabled Hyper-V causes "System thread exception not handled" BSOD in builds 10041 and 10049

    I had a Windows 10 TP build 9926 installation with Visual Studio 2013 Community Edition installed, when build 10041 was released Windows Update tried to install it but after restart it got BSOD with "System thread exception not handled" text and
    reverted back to 9926 with error code 0xC1900101-0x40017. I tried update from ISO, got the same BSOD. Tried clean installation, it worked. 
    I decided to install software and restart the system after each installation and discovered that installing Visual Studio 2015 CTP6 caused BSOD after restart if and only if emulators were included. Installation of  Visual Studio 2015 CTP6 without emulators
    and then installation of Tools for Windows 10 also caused BSOD with "System thread exception not handled" error after restart. 
    So I thought that it was Hyper-V related and disabled hardware virtualisation in BIOS settings. It worked, system successfully booted, but, of course, Tools for Windows 10 setup showed up and told me about fail in UAP for Windows Phone package.
    So, my hardware is Gigabyte GA-A75N-USB3 motherboard with AMD A8-3870 APU with integrated graphics, Intel SSDSA2CW080G3 80GB SSD and 8 GB RAM.
    Steps to reproduce are to enable "Virtualisation" item in BIOS settings, install Windows 10 Technology Preview Build 10041, install Visual Studio 2015 CTP6, install Visual Studio Tools for Windows 10 Preview, restart the system and
    see blue screen with white text of description of "System thread exception not handled" error.

    Same issue, MSI A75MA-G55 AMD Fusion Socket FM1 with A8-3850 APU, 16GB RAM.  Hyper-V worked in 9926, but broke in 10041 and remains broken in 10049.  I have found that if you get in this BSOD loop, you can boot to Safe Mode and Un-install Hyper-V
    to recover.  10041 was an update to 9926, and 10049 was a clean install.

Maybe you are looking for