ImageIcon corruption?

We had a strange thing happen to our application and I think it is a Java bug. The swing application with toolbar icons and other images was left running over night - during that time something may have happened where the resources got low and the gui (probably) started to redraw all haywire like it does - in the morning some of the images became corrupt - in that some of them were blank and others were all haywire looking but stagnant and others were fine. And they didn't clean themselves up - they just stayed in that corrupted looking state. If you restart the app - the images look fine. Has anyone seen similar behaviour - I haven't seen it before? Or could suggest a fix? We are using 1.4.1_01 - I've already looked in Sun's bug database and couldn't find this exact problem. The one thing is my ImageIcons are loaded on init and are static finals - I don't know if that is a factor. It seems like Java cached them in some funky state and saved them that way. Does anyone know how this caching works for images?

Its a bug:
http://developer.java.sun.com/developer/bugParade/bugs/4664818.html

Similar Messages

  • Corrupted image in applet from web cam

    Hi there I created a little webcam server application that listens to port 8080 for requests, then displays an image. The image is jpeg encoded frame grabbed from a logitech web cam using the java media framework. I got the code from this forum.
    I have tried it across a 56kb modem on four different computers. On three the applet displays the images without problems. On the fourth the image is corrupted like it didn't receive all the data.
    Anyone have any idea why this occurs in one and not the others
    Here's some of the source
    The applet just uses getImage( http://[host]:8080 )
    and media tracker with a thread sleeping for a second
    public class WebCamServer extends JFrame
         // class variables
         private HttpServer webserver;
         private int port = 80;
         private ServerSocket server;
         private ImageIcon gfr;
         private Color backcolour = new Color( 255, 255, 255 );     
         private Player player = null;
         private MediaLocator ml = null;
         private JPanel campanel = null;
         public boolean active = false;
         public Buffer buf = null;
         public VideoFormat vf = null;
         public BufferToImage btoi = null;
         public Image img = null;
    public WebCamServer()
              // initialise Frame with this heading and font
              super( "eyespyfx - Web Cam Server" );
              setFont( new Font( "Verdana", Font.PLAIN, 12 ) );
              // initialise web server
              startServer();
              // set up ServerSocket to listen for requests on port 8080
              try
                   server = new ServerSocket( 8080 );
              catch( IOException e )
                   System.err.println( "Server Socket Error" );
                   System.err.println( e.getMessage() );
                   shutdown();
              // set frame icon to gfr.gif
              gfr = new ImageIcon( "gfr.gif" );
              this.setIconImage( gfr.getImage() );
              // get content pane set a layout
              java.awt.Container c = getContentPane();
              c.setLayout( new BorderLayout( 0, 0 ) );
              // create panel to hold web cam image
              campanel = new JPanel();
              campanel.setLayout( new BorderLayout( 0, 0 ) );
              campanel.setPreferredSize( new Dimension( 320, 240 ) );
              // locate web cam from JMF Registry
              ml = new MediaLocator( "vfw://0" );
              // set lightweight renderer for improved framerate
              Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, new Boolean(true) );
              try
                   // create realized video player
                   player = Manager.createRealizedPlayer( ml );
                   //start player
                   player.start();
                   Component comp;
                   // display the visual component
                   if ( ( comp = player.getVisualComponent() ) != null )
                        campanel.add( comp, BorderLayout.CENTER );
              catch (Exception e)
                   System.err.println( "Exception in creating or displaying player" );
                   System.err.println( e.getMessage() );
              // add campanle to the frame
              c.add( campanel, BorderLayout.CENTER );
              // size & colour of frame
              c.setBackground( backcolour );
              setBounds( 0, 0, 0, 0 );
              setResizable( false );
              setSize( 350, 250 );
              show();
              // active set to true - means software is listening for image requests
              active = true;
         // Thread listener for image requests
         public void execute()
              // while active is true          
              while ( active )
                   try
                        // client connects
                        ClientApplet newclient = new ClientApplet( server.accept(), this );
                        // Grab a frame
                        FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
                        buf = fgc.grabFrame();
                        // Convert it to an image
                        btoi = new BufferToImage((VideoFormat)buf.getFormat());
                        img = btoi.createImage(buf);
                        // set client thread with image
                        newclient.setImage( img );
                        // start the client thread
                        newclient.start();
                   catch( IOException e )
                        e.printStackTrace();
                        System.exit( 1 );
    // ClientApplet class to manage each Client Applet as a thread
    class ClientApplet extends Thread
         // class variables
         private Socket connection;
         private PrintWriter out;
         private BufferedReader in;
         private WebCamServer control;
         protected boolean threadSuspended = true;
         public Image img;
         // constructor creates a socket on port 8080
         public ClientApplet( Socket s, WebCamServer t )
              connection = s;          
              control = t;
         // grabbed frame set as output image
         public void setImage( Image img )
              this.img = img;
    public void run()
              // image is buffered to create a 2D graphics object               
              BufferedImage bi = new BufferedImage(240, 180, BufferedImage.TYPE_INT_RGB);
              Graphics2D g2 = bi.createGraphics();
              g2.drawImage(img, null, null);
              OutputStream out = null;
              // create an output stream to the socket
              try
                   out = connection.getOutputStream();
              catch ( IOException io)
                   System.out.println("Error getting socket output stream");
                   System.err.println( io.getMessage() );
              // create jpeg encoder on output stream
              // set the image as a parameter
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
              param.setQuality(0.25f,false);
              encoder.setJPEGEncodeParam(param);
              // encode the image through the output stream
              // close IO connections
              try
                   encoder.encode(bi);
                   out.close();
                   connection.close();
              catch ( IOException ioe )
                   System.out.println("JPGE IO exception");
                   System.err.println( ioe.getMessage() );
              // end of thread image is served to webpage or applet
    }

    Hi,
    I don't know how to solve this problem,
    but I want to ask you how you managed to get
    FrameGrabbingControl which is not null.
    I use Logitech QickCam and everytime when I try to get a FrameGrabbingControl from the Player it returns me null?
    Can you help me?
    have you any ideas why I get null?
    WebCamLocator - is OK. If I can use it to record a video clip. But I can't take a single frame..
    Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, new Boolean(true) );
    Player WebCamPlayer = Manager.createRealizedPlayer(WebCamLocator);
    WebCamPlayer.start();
    FrameGrabbingControl fgc = (FrameGrabbingControl)WebCamPlayer.getControl("javax.media.control.GrabbingControl");
    Buffer buf = fgc.grabFrame();

  • ImageIcon doesn't completely load image, occasionaly :(

    I am using an ImageIcon to display thumnails. Everything seems to work just great, except occasionally the image has a large black area where it appears to have not loaded completely. The images are JPEGs. If I refresh the image, nothing changes, which is why I think it doesn't load.
    I've added a pop-up menu to reload the image, which seems to work, except when the reload doesn't seem to load the image either. Continued reloading will eventually get the image, but I am using an ImageIcon because I thought the ImageIcon constructor would not return until the image was completely loaded.
    Now, if it is completely loaded, but is not displaying properly, what could be wrong that the image is corrupted, since it will eventually load on the next try or one in the future?
    Has anyone else had this kind of trouble?
    I'm using JDK 1.3.1 and developing on Windows.

    I've just had a similar problem. See if this hepls.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=229754
    It worked for me :)
    Bow_wow

  • Icon corruption and loss of sound?

    I wrote a messenging application in java, think of it like a glorified version of WinPopUp or something similar. Anyway, when it is loaded on a Win2k/XP system (haven't tried it on other operating systems), it appears to be working perfectly until you leave your computer for an extended period of time. You lock the workstation, and come back a few hours later. What I have noticed is when I come back to my station and unlock it, the icons on the application are often corrupted. To try and fix this, I added repaint() calls to JFrame.windowActivated(). Doesn't help. I also noticed that after locking the workstation and coming back a few hours later, that occationally the sound effects stop working for no reason that I can explain. My sound code is rather straight forward:
    public void playSound(String s) {
    InputStream iStream = null;
    AudioStream aStream = null;
    try {
    iStream = new FileInputStream(s);
    aStream = new AudioStream(iStream);
    catch (Exception e) { System.err.println(e.toString()); }
    AudioPlayer.player.start(aStream);
    If I close the application and reload it, the problem goes away. To make matters more confusing, is after the program displays corruption, if you lock the workstation and leave for a few hours and come back, the corruption you witnessed earlier may have gone away. I'm very confused. Has anyone else had this sort of problem or have any suggestions as to fix it?
    I'm running and developing with the Java SDK 1.4.1 on a Windows XP Pro box...

    Sifted through the bug database -- didn't find anything applicable. Still have to finish looking through it however. As for unloading the graphics and audio data...
    Perhaps I have a misunderstanding of how java handles function calls, but the only Audio streams or mention of the AudioPlayer class that exist in my program are handled by the playSound function (above). Since they are local to that method, they shouldn't exist outside that function, and thus Java's garbage collection should be unloading the data when the function call is finished. I suppose I can try and force that by setting all the variables in the method to null when I'm done, but that seems like a waste of typing (although admittedly, at this point I'll try anything). That function takes a string which points to the location of the .wav I want to play... and since the strings are constants I know they aren't changing somehow during execution... shrug.
    As for the graphics idea... I suppose I can set my ImageIcon variables to alternate copies of the same graphics every now and again to "reload" it, but what I'm really shooting for is either A) I'm doing something wrong, with ideas on how to fix it, or B) this is a known bug that will miraculously fix itself once Sun gets around to fixing the JVM.

  • List view in iCal on my iPod touch is corrupted

    The 'list view' seems to be all wonky in Calendar on my iPod touch.
    The dates for a given day that's displayed don't make sense:
    i.e. Sunday Oct. 27 2030 followed by Saturday July 14 2001 followed by Tuesday Jan. 16 2001 are listed in consecutive order instead of today, tomorrow and next day (with correct dates).
    Also, the 'events' given for each day listed don't make sense and are often duplicated.
    The 'day' and 'month' views however, seem to be ok and not corrupted. The 'list' field in the month view also seems fine ?
    Has anybody experienced this ? Very frustrating, since I like the list view.
    I make most of my entries/changes to iCal on our main desktop (iMac 24") then sync. to my iPod. The list view seems ok on the desktop.
    Any help greatly appreciated.
    ps. not sure if the problem corresponded with an upgrade of the Ipod software to OS 3.1 from 2.x....

    See this previous discussion:
    FIX for iPod Touch Home Button: Apple Support Communities

  • Download error in (osx) adobe desktop app (corrupted download link).

    Here is a discription of the problem. Please consider that some of the wording might not be correct, as I do have to translate the error message from German into English.
    Using OSX 10.9.2, when clicking inside the adobe desktop app (top of the screen bar) on the tap "apps", the following screen (screenshot) appears, which states, translated from top to bottom:
    download error
    download error. Please contact support.
    (link) contact support
    (link/button) download creative cloud -> This button unfortunatly leads to the following error page "http://www.adobe.com/special/errorpages/404.html"
    All apps, like Bridge, Photoshop, Lightroom, etc. are installed and work just fine. So no problem here. I seem however unable to redownload the desktop app (in order to reinstall). As stated above the provided link inside the desktop app itself is coruppted and within the (online) web-based download centre (user logged in) I am only adviced to use the desktop app. This is a dead end and I do not know what to make of this error, let alone solving it. Please help!

    I am sorry Romsinha but this doesn't really help.
    I already restarted the desktop app and while I am obviously online and connected the problem (error message) remains the same. Information within the "home" tap is recieved/loaded  (little blue spinning wheel) stating that various apps recently have been updated. Yet the same loading wheel within the "apps" tap results in an error. My best guess is that some internal link within the app is corrupted, leading to a source on a server that can not be reached.
    UPDATE
    I clean uninstalled adobe creative cloud as discribed in the article you provided (using the cleaner tool) and even uninstalled the browser plugin. After downloading and reinstalling creative cloud the problem however remains the same. "Apps" tap still shows the same problem. "Home" tap now displays the following:

  • Help, itunes wont open and saying it is corrupt

    HELP! I just went to open my itunes and it is coming up with error message saying it is corrupt. It is asking me to reinstall it. If I reinstall it, will I loose all of my music?
    Please be aware I am useless with computers especially our mac that we have had for 3 years now !

    indi4 wrote:
    If I reinstall it, will I loose all of my music?
    no !
    click here and follow the instructions. *read the article to the end !*
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

  • Resized animated gif ImageIcon not working properly with JButton etc.

    The problem is that when I resize an ImageIcon representing an animated gif and place it on a Jbutton, JToggelButton or JLabel, in some cases the image does not show or does not animate. More precicely, depending on the specific image file, the image shows always, most of the time or sometimes. Images which are susceptible to not showing often do not animate when showing. Moving over or clicking with the mouse on the AbstractButton instance while the frame is supposed to updated causes the image to disappear (even when viewing the non-animating image that sometimes appears). No errors are thrown.
    Here some example code: (compiled with Java 6.0 compliance)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test
         public static void main(String[] args)
              new Test();
         static final int  IMAGES        = 3;
         JButton[]           buttons       = new JButton[IMAGES];
         JButton             toggleButton  = new JButton("Toggle scaling");
         boolean            doScale       = true;
         public Test()
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel p = new JPanel(new GridLayout(1, IMAGES));
              for (int i = 0; i < IMAGES; i++)
                   p.add(this.buttons[i] = new JButton());
              f.add(p, BorderLayout.CENTER);
              f.add(this.toggleButton, BorderLayout.SOUTH);
              this.toggleButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e)
                        Test.this.refresh();
              f.setSize(600, 300);
              f.setVisible(true);
              this.refresh();
         public void refresh()
              this.doScale = !this.doScale;
              for (int i = 0; i < IMAGES; i++)
                   ImageIcon image = new ImageIcon(i + ".gif");
                   if (this.doScale)
                        image = new ImageIcon(image.getImage().getScaledInstance(180, 180, Image.SCALE_AREA_AVERAGING));
                   image.setImageObserver(this.buttons);
                   this.buttons[i].setIcon(image);
                   this.buttons[i].setSelectedIcon(image);
                   this.buttons[i].setDisabledIcon(image);
                   this.buttons[i].setDisabledSelectedIcon(image);
                   this.buttons[i].setRolloverIcon(image);
                   this.buttons[i].setRolloverSelectedIcon(image);
                   this.buttons[i].setPressedIcon(image);
    Download the gif images here:
    http://djmadz.com/zombie/0.gif
    http://djmadz.com/zombie/1.gif
    http://djmadz.com/zombie/2.gif
    When you press the "Toggle scaling"button it switches between unresized (properly working) and resized instances of three of my gif images. Notice that the left image almost never appears, the middle image always, and the right image most of the time. The right image seems to (almost) never animate. When you click on the left image (when visble) it disappears only when the backend is updating the animation (between those two frames with a long delay)
    Why are the original ImageIcon and the resized ImageIcon behaving differently? Are they differently organized internally?
    Is there any chance my way of resizing might be wrong?

    It does work, however I refuse to use SCALE_REPLICATE for my application because resizing images is butt ugly, whether scaling up or down. Could there be a clue in the rescaling implementations, which I can override?
    Maybe is there a way that I can check if an image is a multi-frame animation and set the scaling algorithm accordingly?
    Message was edited by:
    Zom-B

  • Questions on Logical corruption

    Hello all,
    My DB version is 10g+ - 11.2.0.3 on various different OS.  We are in process of deploying RMAN on our system and i am having a hard time on testing/get a grip around the whole logical corruption... from what i understand(please correct me if i am wrong)
    1. I can have a check logical syntax in my backup cmd(and that will check both physical and logical corruption)...But how much overhead dose it have, Seems to be anywhere from 14-20% overhead on backup time. 
    2. Leaving the maxCorrupt to default(which i beleive is 0)...if there is a physical corruption my backup will break and i should get an email/alert saying backup broke...
    3.  Would this be same for logical corruption too ??, would RMAN report logical corrution right away like physical corruption would do?  Or do i have to query v$database_block_corruption after backup is done to figure out if i have logical corruption
    4. how would one test logical corruption ?? (besides the NO_LOGGING operation, as our DB have force logging turned on)
    5. Is it a good practice to have check logical corruption in your daily backup? ( i guess i have no problems for it if DB are small, but some of our DB are close to 50TB+ and i think the check logical is going to increase the backup time significantly)
    6. If RMAN cannot repair logical corruption, then why would i want to do the check logical (besides knowing i have a problem and the end user have to fix it by reload the data...assuming its a table not index that is corrupt)..
    7. any best practices when it comes for checking logical corruption for DB in 50+ TB
    I have actually searched on here and on google, but i could not find any way to reproducing logical corrpution(maybe there is none), but i wanted to ask the community about it....
    Thank you in advance for your time. 

    General info:
    http://www.oracle.com/technetwork/database/focus-areas/availability/maa-datacorruption-bestpractices-396464.pdf
    You might want to google "fractured block" for information about it without RMAN.  You can simulate that by writing a C program to flip some bits, although technically that would be physical corruption.  Also see Dealing with Oracle Database Block Corruption in 11g | The Oracle Instructor
    One way to simulate is to use nologging operations and then try to recover (this is why force logging is used, so google corruption force logging).  Here's an example: Block corruption after RMAN restore and recovery !!! | Practical Oracl Hey, no simulate, that's for realz!
    Somewhere in the recovery docs it explains... aw, I lost my train of thought, you might get better answers with shorter questions, or one question per thread, for this kind of fora.  Oh yeah, somewhere in the docs it explains that RMAN doesn't report the error right away, because later in the recovery stream it may decide the block is newly formatted and there wasn't really a problem.
    This really is dependent on how much data is changing and how.  If you do many nologging operations or run complicated standby, you can run into this more.  There's a trade-off between verifying everything and backup windows, site requirements control everything.  That said, I've found only paranoid DBA's check enough, IT managers often say "that will never happen."  Actually, even paranoid DBA's don't check enough, the vagaries of manual labor and flaky equipment can overshadow anything.

  • You click on a .pdf file; Firefox won't load and says "not a pdf or corrupted," but all other browsers open it normally

    Clicking on a link to a .pdf file in Firefox results in Firefox displaying the box "Format error: not a .pdf or corrupted"
    This has happened for several years with any number of web pages. A link to the latest event is below, but it typically happens almost every time I click on a link to a .pdf

    Upgrade your browser to Firefox 9 and check
    * getfirefox.com

  • I downloaded mountain lion and then the new office suite (word, ppt, excel) but now when I try to display one of my ppt's it says 'ppt cannot open the file...the file may be corrupt, in use, not a type recognized by ppt etc.." how can I fix it?? HELP

    I downloaded mountain lion and then the new office suite (word, ppt, excel) but now when I try to display one of my ppt's it says 'ppt cannot open the file...the file may be corrupt, in use, not a type recognized by ppt etc.." how can I fix it?? HELP

    Did you try to open teh fle by double-clicking its icon? If the file was made with an older version of Office, you may get that message. Try opeing PP and, from its "File" menu, see if you can open the ppt. I've foundthat often gets around that message and then yo ucan save the file from the newer version.
    If that doesn't work, consider asking in the Microsoft Office: Mac forums here:
    Office for Mac forums
    PowerPoint is not an Apple product and it seems a lot of people around here avoid Office.

  • How can I replace just the corrupt page(s) in the domain file of iWeb using Time Machine?

    I back up with Time Machine and have an extensive elaborate website I created in iWeb '09 over a couple months and publish to a local folder and then upload to my server, but in the last few days I notice certain pages (that I haven't even worked on or touched) somehow become corrupted or "cross-contaminated" with elements and images from other pages.  Once I see they are corrupt I make sure not to publish them (if the current published versions are the correct, non-corrupt versions) or if they did get published I can use Time Machine to retrieve the .html file and page files folder for that specific page and replace it in my published folder/server so it shows correctly on the Web.  However, that does not replace the corrupted page(s) you see and work with when you launch iWeb and try to edit or continue working on that page.
    I am confused as to how I go to the package contents of the domain file and replace just that page with a previous version from time machine.  I don't want to replace the entire domain file because I have new changes I made to other pages even in the past hours.  How can I keep the good pages and just get earlier, non-corrupted versions of the corrupt page(s)? I know it's not as easy as with the published site folder where you can just replace the page's .html file and folder, but I don't want to have to re-create the corrupted page(s) from scratch or have to replace it with the last non-corrupted domain file and then have to redo all my recent changes to new pages I made before discovering the corrupt page(s).  Thanks for your help as now I can't make changes to the page(s) within iWeb itself.

    Thanks for the response, Wyodor.  I don't know what that is, but I'll have a look.  Is it an alternative to iWeb or a way to transfer pre-existing iWeb sites?  When you say merge domain files, is that like so multiple copies of the same site show up then you can pick and choose the non-corrupted pages and group them then delete the corrupted ones?  I am on Snow Leopard with no plans or need to upgrade anytime soon.
    And yes, I will read your links but just wanted to ask those questions.  Maybe they'll answer my questions, maybe not.
    I was able to discern that within the domain file is a domain folder with all the site folders, each with their own page ".gz" files which expand into ".xml" files.  I was trying to figure out if you could simply drag the corrupt pages out that way and replace them with backup copies that are still good.  I am having trouble discerning which pages are which as they all have random names like site-page-30F175E3-AE33-4F10-A490-1A096D9B185B.xml and although I expanded and opened each in Text Wrangler, I still couldn't discern which were which for sure, and trial and error proved cumbersome.  Also, I did notice some of the later corrupted domain files had one or two more pages than the site itself has, so not sure how they got added or duplicated or what.
    Again, I'll look at your links, but do you know about swapping out individual page .xml files this way within the domain file?

  • [CS5.5] Recovering a "corrupted" link

    Hi,
    I recently opened a document, and observed this in my Links panel :
    In my document, I have three picture frames. Two of them are "corrupted" : in the link panel, there is no little preview at the left of the link name (the second and the third in my screenshot). The first one is well-formed and behaves correctly.
    The problem is when I drop a new picture in the frames with corrupted links :
    Here, I have dropped a new picture in the frame associated with the link "109325315.lay". The picture in the frame is left unchanged (is there a problem with low def preview ?), and the old link is preserved. When I click on that frame, the old link and the new link are highlighted in the Links panel.
    I tried, via the SDK, various ideas :
    * delete the link before the drop (ILinkFacade::DeleteLinks)
    * delete the resource before the drop (ILinkFacade::DeleteResources)
    * Relink the link during the drop (ILinkFacade::RelinkLink)
    * Reinit the resource during the drop (ILinkFacade::ReinitResource)
    * Reattach the link during the drop (ILinkFacade->AttachLink)
    * Update the link after reinit the resource or after relink the link (ILinkFacade::UpdateLink)
    It seems the resource is valid, because the contained URI is correct.
    In all these cases, I can't get the situation back to a normal one. It looks like there is someting wrong in the link or in the resource, but I can't see what.
    Has anyone an idea of what I could investigate further to get more informations and help me in my debug ?
    Thanks
    Rémi
    Edit : What is responsible for mapping between source object (here the picture frame) and the link ? I can't see any reference in the lin or in the resource to the source object. Maybe this mapping is broken ?

    Try using a Forum search or a Google search - 'Using Adobe Dynamic Link with After Effects requires Adobe Production Premium' was quite common error. Deactivating and reactivating the Suite resolved the issue in most cases.

  • Itunes, ID3 tags, & hard drive corruption

    My wife is having a strange problem with her iMac, and it’s got me a bit mystified. I’m hoping someone here can shed some light on what might be going on. I apologize in advance for the long post.
    The problem is that when she plays some songs in iTunes, and entirely different (wrong) song plays instead. Most songs play fine, but some just play entirely different songs (or sections of a song or podcast). All of the tracks are MP3 (either 192 kbps or 256 kbps) and almost all of them were encoded using Windows Media Player on an XP machine. Initially, I copied the music over from an NTFS drive to a newly formatted (Mac OS/HFS+) drive on the Mac, then I ran iTunes and created the library. At that point, everything seemed fine. All the meta data (song title, album title, artist, album artist, genre, album art) showed up in iTunes, and everything played correctly.
    Now we’re getting this weird behavior where we play some songs and get the wrong music. At first I thought the iTunes library files (ITL and/or XML) had been corrupted, but it seems on closer inspection that the entire hard drive has been corrupted. When I look at the files on Mac hard drive via the Finder, all seems ok – the directory structure is intact, the file names and sizes are all correct, and a Get Info on any MP3 file shows that the ID3 data is all there and seems accurate. This is true even for the songs that play wrong, but if I play one of those songs using the little mini player in the Get Info dialog, the wrong song plays (the same wrong song as in iTunes). So now I’m getting the behavior straight off the drive, with iTunes closed and the iTunes library completely out of the equation.
    Some other interesting clues/evidence:
    * This has happened before. When her first hard drive got corrupted (in the same way), I was mystified but chalked it up as a bad hard drive and got her a new one. Then we started over with a clean HFS+ formatted drive and clean music files and built a new iTunes library. And now the same thing has happened again. So I don’t think it’s just a bad hard drive.
    * It seems to be progressive. That is, everything was fine in the beginning, but over time more and more files get messed up. We know this because we have a backup that’s about a month old on which we can locate files that are fine (on the backup) but that are messed up on her connected day-to-day drive. So it seems like some activity on the drive is causing problems that are growing over time.
    * There is some weird meta data (ID3) behavior. I copied a few hundred MP3 files from the Mac drive back to the PC (over our home network) and looked at them in the Windows Explorer. The first thing I saw was that the same (wrong) music played for the bad tracks as had on the Mac. And I also saw that a lot of ID3 tags were not showing on the Windows side. Lots of tracks have no ID3 data (album, artist, genre, etc. is missing) when I look at them on the PC. There are many albums where tags show up correctly for some of the tracks but not for others. In fact, the number of files where the ID3 tags aren’t visible on the PC far exceeds the number of songs that play incorrectly on the Mac. When I look back on the Mac at the songs that have no ID3 data on the PC and do a Get Info, I see the ID3 data.
    * Often, though I can’t say always for sure, the wrong music that plays on the Mac is stuff that has been recently added. Either podcasts or music that my wife has added since the initial library was established.
    My best guess (though still full of holes):
    Something is confusing the Mac OS into writing on top of occupied space on the hard drive or into mapping files incorrectly in the drive’s allocation table, and chaos results. The Mac doesn’t think anything is wrong, and it shows everything as being clean in the Finder. So I started thinking about the kind of reads & writes my wife is doing on that drive. She rips new CDs to add to the library, she downloads new Podcasts and deletes old ones, and she changes ID3 tags.
    I’m focusing on the changing ID3 tag activity. My wife doesn’t like the way I tag genre. I like big broad categories, an she likes smaller, more specific categories. So she has gone through the initial library of 42K+ songs and changed the genre on thousands of songs. She’s change some from Pop to Power Pop or from Pop to Indie Pop or from Rock to Indie Rock, etc. Both WMP (where the tags were created) and iTunes support ID3v2.3, and so these two programs ought to be able to change tags in a totally interchangeable and safe way. But what if iTunes writes its new genre tags in a way that’s slightly different from WMP? Could iTunes be writing to memory/disk locations that are outside the boundaries of the file and thus creating some kind of buffer overrun?
    It really doesn’t make a lot of sense, but it does tie back to the evidence that this has something to do with meta data, gets worse over time, happened on more than one disk, and seems to be a file allocation table issue.
    Even if I get to the bottom of this, I think my wife’s HD is toast for sure. Here’s what I think I will do: I’ll reformat the drive, re-copy the music over from the PC, and build a new iTunes library. Then, first thing, I’ll open iTunes, select all the songs in the new library, and run “Convert ID3 Tags” to ID3v2.4. If that works and everything behaves correctly, I’ll try to change some genre tags and test the results. The problem is that the library is so large that problems can go undetected for a long time, so maybe I should do this first with a small subset of the music as a trial run.
    The thing I want to avoid is having to do this (ever) again, so I’d feel more comfortable if I understood the bug/problem before just following this guess (which feels like a roll of the dice). If anyone has seem similar behavior or has heard of any IDS incompatibilities between WMP 11 and iTunes 7, I’d love to hear about it. Any help is appreciated.
    Jim

    Wow, that was a long and detailed post. I haven't the energy to reply in equal fervor, but I will just say that lately these boards have been peppered with posts from people whose MP3s are being eaten alive by iTunes. What I don't get is why you suspect the hard drive is at fault. Unless the rest of the system is caving in, I don't think there's any reason to suspect a failing drive. Check the S.M.A.R.T. status in Disk Utility if you haven't already, and perform whatever maintenance you believe is in order.
    For the most reliable ID3 tag editing, I'd certainly recommend using foobar2000 on a Windows PC (or a Mac with Windows installed) or MP3Tag. I would definitely, at least for the time being, not put your huge music collection at risk by doing any further editing of the tags in iTunes.

  • Error message "iTunes has detected an iPod that appears to be corrupted"

    Everything used to work just fine until recently. On my Windows XP Home SP3 laptop, with iTunes (version 9.0.2.25) already open, I connect my 5th Generation iPod Nano and get the following message in iTunes:
    "iTunes has detected an iPod that appears to be corrupted. You may need to restore this iPod before it can be used with iTunes. You may also try disconnecting and reconnecting the iPod."
    If I plug the iPod into the computer without first starting iTunes, the Windows ‘Auto Play’ message comes up immediately then disappears and then the following message appears:
    "Your iPod needs to be formatted for use with Windows. Would you like to run iTunes to restore your iPod Now?"
    Otherwise, the iPod functions normally when not connected in iTunes. I can play the music, videos, and record videos with no problems.
    The troubleshooting steps I took were:
    I performed a reset of the Nano by first sliding the hold switch on/off a few cycles, leaving switch off (no orange showing), then pressed and held the Menu + Select button until the Apple logo appeared. Then I tried it in iTunes again; no such luck, same error. I then did a reset again, this time with the iPod connected to an AC power source; still no luck. I tried the reset numerous times and it didn’t help.
    Next, I ran the diagnostics by pressing and holding the Menu + Select buttons immediately followed by the Select + Reverse buttons. I stepped through all the diagnostics tests and all tests passed as far as I could tell (there was no errors reported).
    After this, I tried it in iTunes again and still no luck.
    I even tried the iPod on my Windows Vista Home Premium (32 bit) machine and it behaved the same way. The version of iTunes on that machine was at an earlier version when I first tried it there. I then upgraded iTunes to the latest version but that didn’t help either.
    I can sync my iPod Touch and 2nd gen Nano without any problems.
    Sorry about be long winded about this but I am wondering if anyone else may have other suggestions. I want to try and avoid a restore if possible because I have some videos I recorded that I would like to get off the iPod. I’m not concerned about my music files as I have them always backed up but didn’t get the videos off yet.

    I am having this same problem with my brand new Mac Pro. It seems to be tied to the computer awaking from sleep (no I am not leaving the iPod connected while sleep... I am referring to waking the computer from sleep and then connecting iPod as opposed to restarting the computer and then connecting the iPod). In other words, if you are getting this error message, try ejecting the iPod, restart your computer, then connect the iPod and see if the error message goes away. For me it does, but I only get one shot at it, if I eject the iPod and then reconnect it, the error message returns. This happens on both iPods I have. I have rebooted (hold menu-select) and gone to disc mode (hold select-play) and the error message remains. The only way it goes away is to reboot the computer, then I get one shot at hooking up an iPod.
    I NEVER had nor get this error message when I connect to the Windows PC that I started with. Perhaps the iPod does not like moving from PC to Mac?

Maybe you are looking for

  • Possible fix for problems with Location Services!!!!

    Alright, I had just bought a brand new iPod Touch 5th Generation and was having trouble with any app that used Location services (Siri, Weather, Maps, etc) and it was driving me absolutely crazy. Now, I live in a very VERY rural area in Pennsylvania

  • After 2 years Premiere Elements 9 not working

    I bought a Dell desktop in 2012 and it came with Premiere Elements 9 installed.  Apart from some freezing and shutting down problems, the program has worked fine.  Just recently, however, the program stopped working.  I can get to the home screen, bu

  • Mail quit when adding an exchange account

    I can't configure an exchange account on 10.9.4, Mail quit everytime. Same thing when using the internet account system preference. A message appears about a sub-window preference problem. I've added this account on 10.8.4 and on my iPad without any

  • Will ADB work with new equipment?

    I have a 15 year old Appledesign ADB keyboard that I would like to use with my brand new i5 21.5" iMac running OSX 10.7.2 Lion. Will an ADB to USB adaptor work? I see most of the Adaptors work with older version of OSX like 10.2, but no info on Lion.

  • G5 will not see system disc

    After upgrading the g5s in our studio to tiger, they crash weekly leaving just the blue spotlight icon in the top right corner of the screen. We get around this by connecting via firewire/target boot to another machine and emptying the caches, except