Problem with In Rainbows

Hi everyone
Just renamed my Radiohead 'In Rainbows' folder, and was then told iTunes could not find the file. I located them all, but now none of the album plays. If you try to covert it to AAC, it gives me 'an unknown error has occurred [-50]'.
I've got in touch with Apple, but no such luck. Has anyone else had the problem, or anyone know how to fix it? Thanks

Hi Adam UK,
iTunes suddenly unable to play Radiohead album
http://discussions.apple.com/thread.jspa?messageID=6472014&#6472014
Another thread with the same solution:
can't import Radiohead In Rainbows
http://discussions.apple.com/thread.jspa?messageID=7015756&#7015756

Similar Messages

  • Lots of problems with newer MacBook Pro

    I bought my first Mac about a year and a half ago. Unfortunately I've had lots of problems with it. I need to get it repaired, but I'm not sure what's wrong. I live in Thailand so I want to have some idea of what's going on before taking it to a shop (so they don't try to price gouge me).
    The first problem happened about 9 months after i bought it. The computer would become incredibly slow. Sometimes it would take 15 minutes to boot up and sometimes it wouldn't boot up at all. But sometimes it was fine. If it did boot up, sometimes when I'd go into a folder in Finder, nothing would show up. The spinning loader graphic would just spin at the bottom of the Finder window. I ran a disk check and it said it found multiple errors that could not be fixed. I erased the hard drive and reinstalled Lion and everything seemed fine. Since I live in Thailand and I need my computer for work, I didn't want to ship it off to Apple to be fixed. It seemed fine after formatting the hard drive, so I figured it was fixed.
    About 3 months later the problem came back, but much worse. I couldn't boot up or anything. I took it to a small Mac repair shop because at this point the 1 year warranty had expired. Of course inside the shop it booted up fine and I had to explain to the guy that for 5 days I haven't even been able to turn it on. Finally after restarting 4 times it began slowing down and he could see what I was experiencing. He said he could try replacing the hard drive, but couldn't guarantee it would fix it. I needed my computer badly at this point so I said let's try. I came back a couple days later and he had transferred everything to the new hard drive and installed it. Everything seemed to be working fine.
    That worked, although sometimes (rarely) something weird would happen, like the computer would just shut down for no reason. But, the DVD drive stopped working. It loads a disc OK, but it can't read it and won't burn a DVD. One time it wouldn't eject my DVD for about 30 minutes. I was trying everything I could find on Google. Finally it spit it out.
    Now, about 6 months later, I was watching a movie and about 10 small colored boxes popped up on the screen. They went away after a few seconds, so I closed my movie and went to shut down my computer. The entire screen then filled with horizontal rainbow colored static. It stayed for about 30 seconds, then the screen turned grey. I could hear and feel the fans blowing at full speed.
    And then for about a full day it went away, until earlier today. As I was backing up all my files I played a quick part of a movie. The same squares popped up on the screen so I immediately closed the movie and they went away.
    I finished backing up and then erased the hard disk. I started installing Mountain Lion, and it stopped at about 75%. I canceled the installer and restarted. After a few seconds the screen turned solid blue with white staticky lines. And now that happens every time I turn on the computer after about 30 seconds. There's no operating system because before I can even get to the installer before the screen goes.
    Sorry for the huge amount of info. I just don't have enough experience with Macs to know what's going on. My current issue resembles a video card problem, the issues before resemble a hard drive and DVD drive issue. Replacing the hard drive fixed it temporarily. Could a problem with the logic board cause all of these issues?
    Thanks for any help with this.

    A few things to note...
    If you had contacted Apple about each of the issues that you reported here, they would  have kept a log of the problems that would help them determine whether to continue support after the warranty expires.
    You might consider asking about "Flat Rate Repair Pricing." See the discussion thread here and note that some users report that the flat rate repair pricing is only available in the U.S. and Japan.
    gavin310 wrote:
    (typically they just ship your computer to Singapore instead of working on it "in-house" from what I read).
    Actually, I had great  experiences with two different macs sent to the repair depot. One computer had narcolepsy on day one. Apple sent me a box, I packed up the PB and dropped it off at UPS. Apple fixed and returned to my house two days later. The second MBP had a known video card problem. I took it to an Apple Store Genius who ran a specifc test and deduct that it was the known defective video card. The store was out of parts and ordering would take a week. Knowing my past experience with the Repair Depot, I ask for that option. The genius took my MBP and shipped it to the depot that night. Three days later, I received the fixed MBP and on the work order, their tests showed failed fans that they also replaced. Three or four weeks later, the Apple Store called to tell me they got the video card in stock.
    Gather up your grit, perseverance, and persistence before contacting Apple. Try bypassing phone support by contacting them via their online support system with the link I provided in the previous post. (I remember using the online support system and was able to choose to have them call me. At the time, I had AppleCare so i'm not certain with out-of-warranty.) Another option is to seek an authorized Apple service provider.
    Good Luck!

  • Problems with Disk Utility

    Hi,
    iPhoto crashed my computer in a big way and after leaving the rainbow wheel for about an hour, with very sluggish response I kept the power button down and reset (without doing a shutdown).
    Unfortunately it has a created a massive problem with my Macbook Pro, in so much that it no longer boots up.
    I get the grey screen with the Apple and progress wheel, but then nothing.
    I have booted from an external USB hard disk (also 10.6) and ran disk utility.
    S.M.A.R.T. reports all ok
    Repair disk reports all ok
    Repair disk permissions fails with the following error:
    Error: Permissions verify or repair failed
    I've checked the system.log file and this is the error:
    com.apple.DiskManagement.RepairPermissions|2011-09-05 18:15:02 +0100
    Sep  5 18:16:38 unknown-c4-2c-03-37-31-6d diskmanagementd[1230]: APICALLBACK_dmAsyncFinishedForDisk_PERM_result dmErr=-9901 detailErr=10
    Sep  5 18:16:38 unknown-c4-2c-03-37-31-6d com.apple.ReportCrash.Root[2005]: 2011-09-05 18:16:38.593 ReportCrash[2005:2703] Saved crash report for repair_packages[1996] version ??? (???) to /Library/Logs/DiagnosticReports/repair_packages_2011-09-05-181638_localhost.cra sh
    There's other errors in the system.log, but these seem the most pertinent to the problem.
    Can anyone please advise on how I repair this, or do I need to buy Disk Warrior and rebuild the directory structure?
    Thanks,
    GD

    Hi,
    Thanks for the reply.
    Superduper to create a bootable carbon copy and TM for incrementals.
    I really don't want to re-install OSX and then recover the components from TM though for several reasons.
    Thanks.

  • Problems with mac book pro (os x 10.5.8)

    g'day
    recently i have, for me serious, problems with my mac book pro (os x 10.5.8).
    discovered that it runs slower and somewhat unstable, i attempted housekeeping and burned large files on cd. furthermore i deleted some files i do not use to trash from 'application'
    now once i turn on straight i get a garbled screen with tool bar on top.
    if i start with installation disk 1, i get to the complete start-up and is operational.
    upon opening the 'dock' to open safari for example - comuter freezes for a few minutes with spinning rainbow wheel.
    what might be the problem?
    did run
    - safe start-up - no change
    - disk utility - all ok
    - hardware test - all ok
    - extended hadrware test - did not work
    - activity monitor - cpu - user 16%, sstem 4%, indle 87%
                              - system memory (2 gb) - free 850 mb, wired 172 mb, active 970 mb, inactive 51 mb
                              - disk usage (185 gb) - 135 gb used - 50 gb free
    what else can i do? anone encountered similar?
    would truly appreciate our kind assistance
    thanks a lot
    ursfsta

    "did try to repair disk but it allowed me only to 'verify'"
    You did not follow my post.
    Insert your OS installer disk and reboot while holding down the c key. Select Utilities>Disk Utilities. Then run Repair Disk on your ard drive.

  • Problems with apps and safari since installing Yosemite

    I could have shot myself after installing Maverick when it cam out but after a zillion updates and finally a 100 mile drive to the nearest Apple store and the genius bar it seemed to be working fine.  I dreaded installing Yosemite but as I have and iPad mini, and Yosemite is billed to work more harmoniously with that, I did the download.  Since then and even following the recent 'update', opening Safari takes forever, I get the rainbow wheel of doom. There is frequently a delay between my typing (about 35 words per minute) and actually seeing the curser and letters on screen, and often webpages just dump.  Other times, apps or webpages will just spontaneously pop open.  Sometimes Safari can't connect to pages.  Not my wifi as if I just choose another page it is fine.  I am actually back to using Chrome because I don't seem to have the same problems as with Safari.....  go figure.  5 years ago after years of pc's and the frustration of having hardware and software that were specifically made for each other, I thru in the towel and paid the bucks for a MacPro laptop and I loved my first three years.  Now, my machine ***** as does Safari!! an Apple app!  I feel like I need to debug, but I don't have any thing like MacKeeper on it now (the Genius bar guy took MacKeeper off when I had that visit to solve the Maverick problems).  I'm tempted to reinstall it but I read so many posts saying that folks had problems with a virus that they attributed to MacKeeper.   So, anyone else having these same problems and can anyone recommend a good cleanup and maintenance software so I can clean this up?

    Do not install MacKeeper.
    Back up your Mac if you have not already done so. To learn how to use Time Machine read Mac Basics: Time Machine backs up your Mac - Apple Support.
    Determine if the same problems also occur in "Safe Mode":
    Safe Mode or "Safe Boot" is a troubleshooting mode that bypasses all third party system extensions and loads only required system components. Read about it: Starting up in Safe Mode
    You must disable FileVault before you can start your Mac in Safe Mode.
    Starting your Mac in Safe Mode will take longer than usual, graphics will not render smoothly, audio is disabled on some Macs, and some programs (iTunes for example) may not work at all.
    Merely starting your Mac in Safe Mode is not intended to resolve the problem, it's to observe its performance without certain additional components.
    To end Safe Mode restart your Mac normally. Shutdown will take longer as well.

  • Really really annoying problem with slooooow Adress Book

    I have a really, really annoying problem with Address Book.
    Ever since I connected it with the MobileMe service it has this problem, and I just cant get rid of it. I have tried logging out and back into the MobileMe service, resetting the sync history etc., but to no avail.
    Each time I open the application it freezes for about 5 to 10 seconts, then that blooming annoying, Windows reminiscent, rotating rainbow circle appears for about a minute at a time. Then it goes away and the application works..........that is until try something demanding like adding a new group or changing a group name, then it starts over. It is making the Address Book almost unusable and very un-Mac-like.
    Can someone please help???

    Try deleting this plist:
    (yourUserName)/Library/Preferences/com.apple.AddressBook.plist
    As well, the general approach at this time is to ask if you've checked for any problematic fonts (all languages) with Apple's Font Book (look in the Applications folder). Find and remove all duplicates also.
    Start there to be sure all fonts that are in play come out with a clean bill of health.
    Also, don't hesisate to perform wholesale deletion of old and/or little used fonts - be skeptical of anything that has come from Office 2008, including those related to an Equation Editor installation.
    By all means be sure your 3rd party apps are Snow Leopard compatibl

  • My computer is extremely slow, with the rainbow wheel appearing with every click. It is one year old, and has all the most recent updates. Why is it so painfully slow?

    My computer is extremely slow, with the rainbow wheel appearing with every click. It is one year old, and has all the most recent updates. Why is it so painfully slow?

    That sounds horrible. There are a number of reasons it could occur.
    The first thing to do is ensure you have adequate backups, because what you describe can be a symptom of impending disk failure.
    To help determine the possible causes of this behaviour read the following. None of what follows is intended to fix anything, but it will provide the additional information required to advance troubleshooting. There are four separate parts to it; read everything first.
    Boot OS X Recovery by holding ⌘ and r (two fingers) while you start your Mac. At the Mac OS X Utilities screen, select Disk Utility. Select your startup volume (usually named "Macintosh HD") and click the Repair Disk button. Describe any errors it reports in red. If Disk Utility reports "The volume Macintosh HD appears to be OK" in green then you can be reasonably (though not completely) assured your hard disk is in good working order.
    When it finishes restart your Mac and test again for operation. If it's still not behaving as you expect it should, please post the results of EtreCheck in accordance with the following instructions:
    Apple Support Communities contributor etresoft wrote a very useful app to quickly gather certain system information that may help point to a cause of this problem. Read about it here. It contains a link to download EtreCheck. Don't download it from anywhere else (such as may be found by following the results of an Internet search).
    Click Open - etresoft contributes to this forum frequently and can be considered a trustworthy developer.
    It will take a moment to run as it collects its data.
    Copy and paste its output in a reply.
    Do not be concerned about anything that says "Problem" or “failed” or anything else that may appear in red.
    EtreCheck was designed to remove any personal information (such as your computer's name and serial numbers) but if you see anything that looks like an email address or any other personal information that should not be divulged to others, please delete or obscure that information when you post the reply.
    When you are finished with EtreCheck, quit the program. It occupies very little space, and you can keep it or drag it to the Trash as you wish.
    After completing the above please determine if the problems also occur in "Safe Mode":
    Safe Mode or "Safe Boot" is a troubleshooting mode that bypasses all third party system extensions and loads only required system components. Read about it: Starting up in Safe Mode
    You must disable FileVault before you can start your Mac in Safe Mode.
    Starting your Mac in Safe Mode will take longer than usual, graphics will not render smoothly, audio is disabled on some Macs, and some programs (iTunes for example) may not work at all.
    Merely starting your Mac in Safe Mode is not intended to resolve the problem, it's to observe its performance without certain additional components.
    To end Safe Mode restart your Mac normally. Shutdown will take longer as well.
    System performance problems for reasons that cannot be isolated to any other cause justify an SMC reset. Be sure to read the procedure carefully and follow all the steps exactly as written, even if they seem inapplicable or trivial.

  • Problem with various programs freezing/not working

    I'm not sure if it's a problem with the computer itself or with the software, but perhaps someone on here can help me.
    For about a week now I've been having problems with various programs on my iMac. These programs include iTunes, Force Quit, Shut Down, Safari, Finder, and certain functions on the keyboard.
    The problems I've been having revolve around the programs freezing up when you either first try to operate them or after opening the programs and trying to click on things within the program itself.
    A good example: I haven't been able to use iTunes past the point of opening it up. Once I try to play a song, it freezes up and the rainbow wheel comes up and just keeps on spinning for eternity, or until I manually reboot the computer via the power button.
    The volume controls on the keyboard don't work at all. When I first boot up the computer, I can press a volume button and the symbol will appear on the screen, but the level won't move up or down and if you press it again after that disappears then it doesn't reappear.
    Force Quit and other applications tend to stay on the screen after you click the quit button or other end/cancel button and won't go away until iMac is rebooted manually by button on back.
    Safari gets stuck on occasion depending on which site I go to. It happened once when I went to MySpace.com, but only cos of one of the flash sites they were advertising. I went to the same site an hour later and it was fine since it was advertising something else. I have a job site I can't access because when I click on the 'jobs' link to look for a job, it gets 3/4 of the way through the upload and freezes.
    And right now I can't tell you which model I have since I can't access the 'About This Mac' info, other than to tell you it's the 20" with 320 GB with Leopard software, Mac OS X v10.5. It gets regular updates.
    So... if there's anyone who could help me, I would greatly appreciate it.
    Please note, I don't have Apple Care since I can't afford it yet, and I just bought my computer in October 2007. Thanks!

    Start with http://www.thexlab.com/faqs/multipleappsquit.html

  • A sea of problems with my MacBook

    I have a week 22 MacBook that I have recieved (3rd one traded with Apple Store, other 2 had problems) that has been having many problems.
    -Yesterday I was on iChat, and all of a sudden I see the message "You are currently in active chats. Are you sure you want to quit?" but I was typing a message and only saw it for a split second before i hit enter, then the computer shut off? Is this random shut down?
    -Processor Whine
    -MagSafe Whine
    -This is the order of affects when I turn on my computer: hit power button, hear a high pitched click like the fan is starting to turn? Then superdrive, then high pitched click again, then apple startup chime, then i can hear the fan clicking. I have to hit the computer a couple of times to get that noise to stop.
    -Click when I open the MacBook. Plastic rubbing on each other I think.
    -If I push on the near bottom right side of the black screen casing, I can hear it click.
    -I've had those weird rainbow lines like the logic board is failing, but resetting the PRAM fixed this. This has happened twice.
    -1 Kernel Panic
    What would Apple do about this? Also, I've heard some people have had their computers upgraded by Apple (white to black MacBook, etc). What would happen?
    Thanks,
    Robert

    Hi Robert,
    1) I wouldn't call that a random shutdown yet unless it keeps doing it. That sounds like something went wrong software wise and made the computer turn off.
    2) The new Intel CPUs wine. I think that is something that you are going to have to get used to. My Pentium M even wines.
    3)That you might want to call AppleCare about. My freinds MacBook had that and they said that the power adapter/MagSafe should not make any noise.
    4)That sounds like something is wrong with your fan. I would again call AppleCare about this or stop by an Apple Store.
    5)That sounds like something is wrong with the hinge, maybe it is too tight? Again, call AppleCare or go see a Genius.
    6)A lot of machines are having problems with the screen bezel. Most of the repairs getting done right now, also have the bezel replaced even if that was not requested. Call AppleCare or got see a Genius.
    7)Once you start up, change the resolution in System Prefs., restart, and then change it back to normal. That should fix this issue.
    8)My friends MacBook had Kernel Panic problems when it would get too hot. If your fan isn't working correctly, then that could cause the computer to overheat and KP.
    I think that Apple would probably just have you send it in for repair. If it is inside the 14 day return policy, or within at least a month of when you traded in the last one, go get it replaced. It seems like you arn't having very good luck with MacBooks, maybe you will be lucky if you get another replacement. I doubt they would upgarde you, but maybe if you called Apple Customer Service then they would since this is your 4th MacBook.
    Hope this helps.
    -MRCUR

  • Does LION have a problem with Quicklook?

    Quicklook in Lion does not display images and will not follow arrow command when in display.
    It will only display one image and not scroll via arrows to the below or next images.
    Solution are welcome,
    Thank you

    YES AND ITS DRIVING ME TO THE POINT WHERE I'M GOING TO BUY A PC!
    I have a lot of music on my computer. Nearly 55 gigs. After I reached a certain unknown amount my iMac has been freezing every time:
    I listen to music - it will stop half way through a song and then give the rainbow wheel.
    Add new songs to my library - will happen occassionaly, forcing me to manually restart.
    Turn on Genius
    NB: None of the songs are corrupt as they all work perfectly on my iPod!
    At first we thought it was the new iPod that I bought which was giving me trouble. We found that that iPod was corrupt and I got it replaced. I later discovered it was actually my computer that was giving me the trouble as the same thing still happened with the new iPod.
    After taking my computer to apple, they suggested a hardrive replacement, which worked until I started using iTunes excessively.
    I will probably take my computer to apple again because applecare does not know how to fix my problem, but I would like to avoid doing that as I am very busy and I do not have to to continuously take my computer to the store.
    My computer does unfreeze after about 5 minutes, but then continuously freezes after I press a mouse button or keyboard, or try to open an application. (almost seizure-like).
    Is it a problem with RAM or memory?
    Please help me!
    PS My friends have told me to put my music on an external hardrive but that it is a huge inconvencience as I like my computer to be up to date with my iPod.

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • If I make a new Apple ID can I take my old ID's music library over safely?

    Currently our entire family shares one ID, but I want my own, yet all of my music library is manually sorted. Is there any way I can take all of my music over to a new library with a new ID without having to re sort them? Know this; majority of my mu

  • Airport cant see the network its created

    Did the update today...unsure that has anything to do with it, as the problem hapopened before.  Anyway, I've reset a few times - to factory and hot reboot.  Nothing!!!!!! Help -

  • JSF Datatable row data - Expand/Collapse

    Hi, I just started learning the JSF concepts. I read articles by BalusC which are very clear and easily understandable. Thanks to BalusC. I have a requirement to implement expand and collapse data using JSF datatable. The data comes from the backing

  • IPhoto Clone repair tool - Where is it?

    Since upgrading to iPhoto '11 I have found the programme to "de-noise" and "enhance" my photos so well that the only artifacts left in my scanned photographs of many years ago contain only a few specks of dust that show up as white blobs. In previous

  • Major problems publishing to .mac-tried everything

    I have tried numerous times to publish to .mac, but have received a "the .mac servers are busy, try again in a few minutes" message. I checked the .mac site and all lights are green. i tried two different internet connections at two different locatio