Something really crazy

here are two codes. They're basically the same except for one line,
System.out.printf("(%d,%d)\n",c,d);which has little to do with what the whole code is supposed to do, which is to randomly erase pixels of an image.
The problem is that when you execute them, they don't run in the same way. Of course, they're different in that one of them does not print, but at least in theory, they should be able to do what they are programmed to do since they're the same code and the minor difference(the print line) does not affect the paint function anyway.
But if you try running them they don't run in the same way. Code 1, randomly erases the image once you press the button. Code 2, however does not, and immediately erases the whole thing.
A friend of mine says it has something to do with memory leak. I don't believe him unless I can get a second opinion. Watcha guys think?
You can use any picture for the ImageIcon if you're curious to see what I mean. Thanks.
CODE 1:
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import java.util.Date;
import java.util.Random;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.awt.Graphics;
import java.awt.Color;
public class eraseImage2 extends JPanel implements Runnable
     private static boolean goErase;
     private boolean eraseAll;
     private ImageIcon pic;
     private Date time;
     private Random rand;
     int[] x;
     int[] y;
     int pixelCount;
     int picX;
     int picY;
     public eraseImage2()
               eraseAll = false;
               pic=new ImageIcon("ballack.jpg");
               setSize(500,500);
               picX = (getWidth()-pic.getIconWidth())/2;
               picY = (getHeight()-100-pic.getIconHeight())/2;
               x = new int[pic.getIconWidth()];
               y = new int[pic.getIconHeight()];
               for (int c=0;c<x.length;c++)
                    x[c]=0;
               for (int c=0;c<y.length;c++)
                    y[c]=0;
               goErase=false;
               time = new Date();
               rand = new Random(time.getTime());
     public void paintComponent(Graphics g)
          super.paintComponent(g);
          if (!eraseAll)
                    pic.paintIcon(this,g,picX,picY);
                    g.setColor(getBackground());
               for (int c=0;c<x.length;c++)
               if (x[c]==1)
                    for (int d=0;d<y.length;d++)
                         if (y[d]==1)     
                              g.drawLine(picX+c,picY+d,picX+c,picY+d);
                         //System.out.printf("(%d,%d)\n",c,d);
     public static void setGoErase(boolean status)
          goErase=status;
     public void run()
          int a,b;
          while (true)
               if (goErase)
                    a=rand.nextInt(x.length);
                    b=rand.nextInt(y.length);
                    x[a]=1;
                    y=1;
     //LOOK HERE: LOOK HERE! LOOK HERE:
//CODE ONE RUNS NORMALLY
                    System.out.printf("(%d,%d)\n",picX+a,picY+b);
                    // SCROLL TO SEE CODE 2 DIFFERENCE
                    repaint();
     public static void main(String args[])
          JFrame cage = new JFrame();
          eraseImage2 app = new eraseImage2();
          cage.setLayout(new BorderLayout());
          JPanel buttonPanel = new JPanel();
          JButton start = new JButton("Start");
          buttonPanel.add(start);
          start.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent e)
                         if (eraseImage2.goErase==false)
                              eraseImage2.setGoErase(true);
                         else
                              eraseImage2.setGoErase(false);
          ExecutorService threadExecutor = Executors.newFixedThreadPool( 1 );
          threadExecutor.execute( app );
          cage.add(buttonPanel,BorderLayout.SOUTH);
          cage.add(app,BorderLayout.CENTER);
          cage.setSize(app.getSize());
          cage.setVisible(true);
[b]CODE 2:import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import java.util.Date;
import java.util.Random;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.awt.Graphics;
import java.awt.Color;
public class eraseImage2 extends JPanel implements Runnable
     private static boolean goErase;
     private boolean eraseAll;
     private ImageIcon pic;
     private Date time;
     private Random rand;
     int[] x;
     int[] y;
     int pixelCount;
     int picX;
     int picY;
     public eraseImage2()
               eraseAll = false;
               pic=new ImageIcon("ballack.jpg");
               setSize(500,500);
               picX = (getWidth()-pic.getIconWidth())/2;
               picY = (getHeight()-100-pic.getIconHeight())/2;
               x = new int[pic.getIconWidth()];
               y = new int[pic.getIconHeight()];
               for (int c=0;c<x.length;c++)
                    x[c]=0;
               for (int c=0;c<y.length;c++)
                    y[c]=0;
               goErase=false;
               time = new Date();
               rand = new Random(time.getTime());
     public void paintComponent(Graphics g)
          super.paintComponent(g);
          if (!eraseAll)
                    pic.paintIcon(this,g,picX,picY);
                    g.setColor(getBackground());
               for (int c=0;c<x.length;c++)
               if (x[c]==1)
                    for (int d=0;d<y.length;d++)
                         if (y[d]==1)     
                              g.drawLine(picX+c,picY+d,picX+c,picY+d);
                         //System.out.printf("(%d,%d)\n",c,d);
     public static void setGoErase(boolean status)
          goErase=status;
     public void run()
          int a,b;
          while (true)
               if (goErase)
                    a=rand.nextInt(x.length);
                    b=rand.nextInt(y.length);
                    x[a]=1;
                    y=1;
                    [b]
     //LOOK HERE, PRINT LINE CODE IS PRELUDED BY //COMMENTS
                    //System.out.printf("(%d,%d)\n",picX+a,picY+b);
                    repaint();
     public static void main(String args[])
          JFrame cage = new JFrame();
          eraseImage2 app = new eraseImage2();
          cage.setLayout(new BorderLayout());
          JPanel buttonPanel = new JPanel();
          JButton start = new JButton("Start");
          buttonPanel.add(start);
          start.addActionListener(
               new ActionListener()
                    public void actionPerformed(ActionEvent e)
                         if (eraseImage2.goErase==false)
                              eraseImage2.setGoErase(true);
                         else
                              eraseImage2.setGoErase(false);
          ExecutorService threadExecutor = Executors.newFixedThreadPool( 1 );
          threadExecutor.execute( app );
          cage.add(buttonPanel,BorderLayout.SOUTH);
          cage.add(app,BorderLayout.CENTER);
          cage.setSize(app.getSize());
          cage.setVisible(true);
They're the same code, but they won't run in the same way. At least on my pc.

Calling repaint() doesn't immediately repaint the screen, and multiple calls to repaint can well be combined to one. This happens especially in a tight loop like yours. This improves efficiency because painting is fairly slow; it lets the program do more calculations. To get the effect you want you can try using the paintImmediately method or adding a small delay to the inner loop.
See also the section on repaint managers in this article:
http://java.sun.com/products/jfc/tsc/articles/painting/index.html

Similar Messages

  • Something really crazy just happened...

    Well, just like any normal time on my iBook, I have Photoshop open, everything is going fine. All of the sudden it freezes, which actually is the first time that this has ever happened, so I click the power button off, and on, as a manual restart. Then what happens is that it makes the little noise everytime you start the computer, but then the grey screen with the apple and the loading icon is flickering, from there it goes to a red screen, green, blue, and back to grey. Finally it turns black, and I really have no idea what just happened. Anybody know what I can do?

    Hi Richard.
    Sorry to tell you, but it sounds like you have a logic board failure. I found this at http://www.the-set.com/ibook-dilemma/first-post :
    I bought an iBook G4 in January. Since then there have been three logic board failures, each roughly 3 months after the previous one. The last failure was in early September. Last night the computer showed signs of yet another failure:
    – Screen locks ups; – After forced restart computer runs for a few minutes, and then screen goes blank and starts to flash colors (green, red, blue, grey) and then goes blank in a pattern.
    I've never really had any experience with logic board failures, so I'm not sure exactly what to do next... but if it is a logic board failure, you'll have to get it repaired, and if you're still under warranty it should be repaired at no cost.
    - Zeb
    12 In. iBook G4 (1.2 ghz)   Mac OS X (10.4.3)   512MB RAM

  • I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    Hi there. I also bought an iWires mini Display port to HDMI cable and have an LG LED/LCD TV. I plugged it in to my MB Pro and followed the very small writing that came in the package and got both audio and video going. You need to change the audio settings from within System Preferences on your Mac to select your TV as the audio output.
    My concern is the data latency - do you experience a delay between moving your mouse on the MBPro and the TV displaying the movement? It is only a fraction of a second, but certainly enough to be annoying, especially in a cable as expensive as the iWire.

  • Can somebody help me install IOS 6.1.3 back to my iPhone 4. IOS 7 is not smooth enough as perfect as IOS 6.1.3. I am stuck with this OS, every app gives a break for 4-5 seconds to open up. And playing games in this OS using iPhone 4 is really crazy

    Can somebody help me install IOS 6.1.3 back to my iPhone 4. IOS 7 or 7.0.4 is not smooth enough as perfect as IOS 6.1.3. I am stuck with this OS, every app gives a break for 4-5 seconds to open up. And playing games in this OS using iPhone 4 is really crazy. Very much disappointed that I am not able to use IOS 7 and cant go back to what I need.

    Mani Dinesh wrote:
    Can somebody help me install IOS 6.1.3 back to my iPhone 4.
    Downgrading is not supported by Apple.
    Mani Dinesh wrote:
    ...every app gives a break for 4-5 seconds to open up. ...
    See this discussion...
    https://discussions.apple.com/message/23731048#23731048

  • Hi, I hope you can help. I'm sure this is something really basic that I should be able to fix myself, but................. I was working on a photo calendar on my macbook off the battery and the battery suddenly ran out. So it wasn't shut down properly. N

    Hi, I hope you can help. I'm sure this is something really basic that I should be able to fix myself, but.................
    I was working on a photo calendar on my macbook off the battery and the battery suddenly ran out. So it wasn't shut down properly. Now when I open i photo the coloured wheel just keeps spinning and I can't get into it. Everything else on the computer seems to work. I've done forced quit and restarted it a few times and also left it running.
    Jane
    Here is the error report:
    Date/Time:      2011-11-19 11:29:02 +0000
    OS Version:     10.5.8 (Build 9L31a)
    Architecture:   i386
    Report Version: 4
    Command:        iPhoto
    Path:           /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Version:        8.1.2 (8.1.2)
    Build Version:  8
    Project Name:   iPhotoProject
    Source Version: 4240000
    Parent:         launchd [97]
    PID:            158
    Event:          hang
    Time:           7.46s
    Steps:          49
    Process:        iPhoto [158]
    Path:           /Applications/iPhoto.app/Contents/MacOS/iPhoto
    ADDRESS         BINARY
    00001000        /Applications/iPhoto.app/Contents/MacOS/iPhoto
    00b31000        /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
    00c65000        /System/Library/Frameworks/DiscRecordingUI.framework/Versions/A/DiscRecordingUI
    00cae000        /System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHand ling
    00cb7000        /Applications/iPhoto.app/Contents/MacOS/../Frameworks/UpgradeChecker.framework/ Versions/A/UpgradeChecker
    00ccb000        /Applications/iPhoto.app/Contents/MacOS/../Frameworks/MobileMe.framework/Versio ns/A/MobileMe
    00dc9000        /System/Library/Frameworks/Message.framework/Versions/B/Message
    01179000        /Applications/iPhoto.app/Contents/MacOS/eOkaoCom.dylib
    0117d000        /Applications/iPhoto.app/Contents/MacOS/eOkaoDt.dylib
    011b6000        /Applications/iPhoto.app/Contents/MacOS/eOkaoFr.dylib
    01320000        /Applications/iPhoto.app/Contents/MacOS/eOkaoPt.dylib
    0134b000        /Applications/iPhoto.app/Contents/MacOS/../Frameworks/ProXTCore.framework/Versi ons/A/ProXTCore
    013d6000        /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/iLifeSlid eshow
    013da000        /Applications/iPhoto.app/Contents/MacOS/../NetServices/Frameworks/NetServices.f ramework/Versions/A/NetServices
    014bc000        /System/Library/PrivateFrameworks/AppleAppSupport.framework/Versions/A/AppleApp Support
    014c0000        /System/Library/Frameworks/LatentSemanticMapping.framework/Versions/A/LatentSem anticMapping
    014f9000        /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowCore.framework/Versions/A/iLifeSlideshowCore
    0153b000        /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowProducer.framework/Versions/A/iLifeSlideshowProducer
    016be000        /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowRenderer.framework/Versions/A/iLifeSlideshowRenderer
    0183b000        /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/Framework s/iLifeSlideshowExporter.framework/Versions/A/iLifeSlideshowExporter
    0184f000        /System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit
    01880000        /Applications/iPhoto.app/Contents/MacOS/../NetServices/Frameworks/BDControl.fra mework/Versions/A/BDControl
    01894000        /Applications/iPhoto.app/Contents/MacOS/../NetServices/Frameworks/BDRuleEngine. framework/Versions/A/BDRuleEngine
    01fe1000        /Applications/iPhoto.app/Contents/PlugIns/FlickrPublisher.publisher/Contents/Ma cOS/FlickrPublisher
    1676f000        /Applications/iPhoto.app/Contents/PlugIns/FacebookPublisher.publisher/Contents/ MacOS/FacebookPublisher
    16791000        /Applications/iPhoto.app/Contents/PlugIns/MobileMePublisher.publisher/Contents/ MacOS/MobileMePublisher
    167da000        /Applications/iPhoto.app/Contents/PlugIns/RSSPublisher.publisher/Contents/MacOS /RSSPublisher
    16a19000        /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
    17161000        /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/ATSHI.dylib
    17183000        /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGXCoreImage.A.dylib
    19dd8000        /Applications/iPhoto.app/Contents/NetServices/Bundles/BookService.NetService/Co ntents/MacOS/BookService
    19df2000        /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings
    19df9000        /Applications/iPhoto.app/Contents/NetServices/Bundles/CalendarsService.NetServi ce/Contents/MacOS/CalendarsService
    19e0d000        /Applications/iPhoto.app/Contents/NetServices/Bundles/CardsService.NetService/C ontents/MacOS/CardsService
    19e21000        /Applications/iPhoto.app/Contents/NetServices/Bundles/PrintsService.NetService/ Contents/MacOS/PrintsService
    19e52000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBAppDefPlugin.ilmbplugin/Contents/MacOS/i LMBAppDefPlugin
    19e59000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBFolderPlugin.ilmbplugin/Contents/MacOS/i LMBFolderPlugin
    19ea4000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBAperturePlugin.ilmbplugin/Contents/MacOS /iLMBAperturePlugin
    19ef0000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBGarageBandPlugin.ilmbplugin/Contents/Mac OS/iLMBGarageBandPlugin
    1a35e000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBiMoviePlugin.ilmbplugin/Contents/MacOS/i LMBiMoviePlugin
    1a392000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBiPhoto8Plugin.ilmbplugin/Contents/MacOS/ iLMBiPhoto8Plugin
    1a3ad000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBiPhotoPlugin.ilmbplugin/Contents/MacOS/i LMBiPhotoPlugin
    1a3bd000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBiTunesPlugin.ilmbplugin/Contents/MacOS/i LMBiTunesPlugin
    1a3cd000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBMoviesFolderPlugin.ilmbplugin/Contents/M acOS/iLMBMoviesFolderPlugin
    1a3d6000        /Library/Application Support/iLifeMediaBrowser/Plug-Ins/iLMBPhotoBoothPlugin.ilmbplugin/Contents/Mac OS/iLMBPhotoBoothPlugin
    1a901000        /System/Library/PrivateFrameworks/iTunesAccess.framework/iTunesAccess
    ba900000        /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
    Thread id:      753b8b8
    User stack:
       49 ??? [0x3172]
         49 ??? [0x124b80]
           49 _NSApplicationMain + 574 (in AppKit) [0x9225d1d8]
             49 -[NSApplication run] + 867 (in AppKit) [0x9228ffe7]
               49 ??? [0x229973]
                 49 -[NSApplication sendEvent:] + 2939 (in AppKit) [0x923326a5]
                   49 -[NSWindow sendEvent:] + 5381 (in AppKit) [0x92365af7]
                     49 ??? [0x3ec62]
                       49 -[NSOutlineView mouseDown:] + 611 (in AppKit) [0x923beff1]
                         49 -[NSTableView mouseDown:] + 6867 (in AppKit) [0x923aebf8]
                           49 -[NSTableView _enableSelectionPostingAndPost] + 561 (in AppKit) [0x9237575d]
                             49 -[NSNotificationCenter postNotificationName:object:] + 56 (in Foundation) [0x95427ed8]
                               49 -[NSNotificationCenter postNotificationName:object:userInfo:] + 128 (in Foundation) [0x9541e680]
                                 49 __CFXNotificationPostNotification + 179 (in CoreFoundation) [0x93ad5753]
                                   49 ___CFXNotificationPost + 362 (in CoreFoundation) [0x93ad547a]
                                     49 __nsnote_callback + 106 (in Foundation) [0x9542142a]
                                       49 ??? [0x4e741]
                                         49 ??? [0xa8f49]
                                           49 ??? [0xa8f7d]
                                             49 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 184 (in Foundation) [0x954758e8]
                                               49 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 1115 (in Foundation) [0x9542232b]
                                                 49 -[NSNotificationCenter postNotification:] + 124 (in Foundation) [0x9544e9bc]
                                                   49 __CFXNotificationPostNotification + 179 (in CoreFoundation) [0x93ad5753]
                                                     49 ___CFXNotificationPost + 362 (in CoreFoundation) [0x93ad547a]
                                                       49 __nsnote_callback + 106 (in Foundation) [0x9542142a]
                                                         49 ??? [0x7ce32]
                                                           49 ??? [0x6f504]
                                                             49 ??? [0x13a800]
                                                               49 ??? [0x57b4d]
                                                                 49 ??? [0x596e9]
                                                                   35 ??? [0x59905]
                                                                     14 ??? [0x5dc926]
                                                                       6 _sqlite3Step + 17 (in libsqlite3.0.dylib) [0x91e2ed31]
                                                                       3 _sqlite3Step + 221 (in libsqlite3.0.dylib) [0x91e2edfd]
                                                                       2 _sqlite3Step + 208 (in libsqlite3.0.dylib) [0x91e2edf0]
                                                                       1 _sqlite3Step + 41 (in libsqlite3.0.dylib) [0x91e2ed49]
                                                                       1 _sqlite3Step + 9 (in libsqlite3.0.dylib) [0x91e2ed29]
                                                                       1 _sqlite3Step + 25 (in libsqlite3.0.dylib) [0x91e2ed39]
                                                                     7 _sqlite3Step + 0 (in libsqlite3.0.dylib) [0x91e2ed20]
                                                                     4 _sqlite3_step + 11 (in libsqlite3.0.dylib) [0x91e2f54b]
                                                                     3 _sqlite3_step + 134 (in libsqlite3.0.dylib) [0x91e2f5c6]
                                                                     2 _sqlite3_step + 128 (in libsqlite3.0.dylib) [0x91e2f5c0]
                                                                     2 _sqlite3Step + 225 (in libsqlite3.0.dylib) [0x91e2ee01]
                                                                     1 _sqlite3_step + 20 (in libsqlite3.0.dylib) [0x91e2f554]
                                                                     1 _sqlite3_step + 22 (in libsqlite3.0.dylib) [0x91e2f556]
                                                                     1 _sqlite3_step + 4 (in libsqlite3.0.dylib) [0x91e2f544]
                                                                   5 ??? [0x5dc91b]
                                                                   3 ??? [0xae911e]
                                                                   2 ??? [0x5dc940]
                                                                   2 ??? [0x5dc94c]
                                                                   2 _sqlite3_step + 0 (in libsqlite3.0.dylib) [0x91e2f540]
    Kernel stack:
       49 _PE_incoming_interrupt + 131 [0x44e416]
         49 _lapic_interrupt + 121 [0x1b16c0]
           49 _sync_iss_to_iks + 114 [0x1aa3ae]
    Thread id:      9645208
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 -[XTThread run:] + 387 (in ProXTCore) [0x1352363]
                 49 -[XTMsgQueue waitForMessage] + 49 (in ProXTCore) [0x1364201]
                   49 -[NSConditionLock lockWhenCondition:] + 69 (in Foundation) [0x95467b35]
                     49 -[NSConditionLock lockWhenCondition:beforeDate:] + 144 (in Foundation) [0x95467bd0]
                       49 -[NSCondition waitUntilDate:] + 236 (in Foundation) [0x95467dbc]
                         49 _semaphore_timedwait_signal_trap + 10 (in libSystem.B.dylib) [0x96a6d1c6]
    Thread id:      7b12f20
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 -[XTThread run:] + 387 (in ProXTCore) [0x1352363]
                 49 -[XTMsgQueue waitForMessage] + 49 (in ProXTCore) [0x1364201]
                   49 -[NSConditionLock lockWhenCondition:] + 69 (in Foundation) [0x95467b35]
                     49 -[NSConditionLock lockWhenCondition:beforeDate:] + 144 (in Foundation) [0x95467bd0]
                       49 -[NSCondition waitUntilDate:] + 236 (in Foundation) [0x95467dbc]
                         49 _semaphore_timedwait_signal_trap + 10 (in libSystem.B.dylib) [0x96a6d1c6]
    Thread id:      75b2d60
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 -[XTRunLoopThread run:] + 421 (in ProXTCore) [0x13538a5]
                 49 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213 (in Foundation) [0x954563d5]
                   49 _CFRunLoopRunInMode + 88 (in CoreFoundation) [0x93af4aa8]
                     49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      9646128
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 ??? [0x506841]
                 49 ___semwait_signal + 10 (in libSystem.B.dylib) [0x96a7434e]
    Thread id:      96468b8
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 320 (in Foundation) [0x95485520]
                 49 _CFRunLoopRunInMode + 88 (in CoreFoundation) [0x93af4aa8]
                   49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      9645998
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 ___select + 10 (in libSystem.B.dylib) [0x96abc60a]
    Thread id:      96477d8
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __ZN3***17TCMalloc_PageHeap15scavengerThreadEv + 824 (in JavaScriptCore) [0x92c0cd58]
           49 ___semwait_signal + 10 (in libSystem.B.dylib) [0x96a7434e]
    Thread id:      96455d0
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 __Z22CFURLCacheWorkerThreadPv + 388 (in CFNetwork) [0x919a018c]
             49 _CFRunLoopRunInMode + 88 (in CoreFoundation) [0x93af4aa8]
               49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      9412a78
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 __ZN3***15ThreadCondition9timedWaitERNS_5MutexEd + 81 (in JavaScriptCore) [0x92a616b1]
             49 ___semwait_signal + 10 (in libSystem.B.dylib) [0x96a7434e]
    Thread id:      96464f0
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ___NSThread__main__ + 308 (in Foundation) [0x954219a4]
             49 -[NSThread main] + 45 (in Foundation) [0x95421dfd]
               49 -[ILMediaBrowserPathWatcher(FSEvents) iLMBPathWatcherRunLoop] + 862 (in iLifeMediaBrowser) [0x956ced0e]
                 49 _CFRunLoopRun + 84 (in CoreFoundation) [0x93af4b04]
                   49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      94148b8
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 _fe_fragment_thread + 54 (in QuartzCore) [0x97e65a09]
             49 ___semwait_signal + 10 (in libSystem.B.dylib) [0x96a7434e]
    Thread id:      7538000
    User stack:
       49 ??? [0x0]
    Thread id:      9643b58
    User stack:
       49 ??? [0x0]
    Process:        ATSServer [113]
    Path:           /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framewo rk/Support/ATSServer
    ADDRESS         BINARY
    00001000        /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framewo rk/Support/ATSServer
    Thread id:      7d00ba0
    User stack:
       49 ??? [0x4b46]
         49 ??? [0xdd21f]
           49 _CFRunLoopRun + 84 (in CoreFoundation) [0x93af4b04]
             49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      7cff4f0
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Process:        AirPort Base Station Agent [104]
    Path:           /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent
    ADDRESS         BINARY
    00001000        /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent
    Thread id:      7b12790
    User stack:
       49 ??? [0x25ad]
         49 ??? [0x2680]
           49 _NSApplicationMain + 574 (in AppKit) [0x9225d1d8]
             49 -[NSApplication run] + 795 (in AppKit) [0x9228ff9f]
               49 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 (in AppKit) [0x92296f88]
                 49 __DPSNextEvent + 657 (in AppKit) [0x922976d5]
                   49 _BlockUntilNextEventMatchingListInMode + 106 (in HIToolbox) [0x9513df39]
                     49 _ReceiveNextEventCommon + 374 (in HIToolbox) [0x9513e0c5]
                       49 _RunCurrentEventLoopInMode + 283 (in HIToolbox) [0x9513e2ac]
                         49 _CFRunLoopRunInMode + 88 (in CoreFoundation) [0x93af4aa8]
                           49 _mach_msg_trap + 10 (in libSystem.B.dylib) [0x96a6d166]
    Thread id:      7cfcb58
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 ___select + 10 (in libSystem.B.dylib) [0x96abc60a]
    Thread id:      7cfd2e8
    User stack:
       49 _thread_start + 34 (in libSystem.B.dylib) [0x96a9df12]
         49 __pthread_start + 321 (in libSystem.B.dylib) [0x96a9e055]
           49 ??? [0x1e458]
             49 ??? [0x1a1cb]
               49 ??? [0x1e759]

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Spotlight and dashboard in Panther or something really strange??

    Well my school uses Apple Computers (iBooks,iBook G4's,PowerBook G4's,iMacs,eMacs,Airport Extreme, and iPods plus Ive seen some PowerMac G4's here and there) which makes me really happy since I love Apple and Mac!! But I noticed something really weird My school does NOT upgrade to the latest version of Mac OS (they still had OS 9.2.2 in late 2004 on ALL the computers) and I see the Dashboard and the little spotlight icon right next to the clock. Are these avalible in OS X Panther?
    Thanks

    If you see Dashboard and the Spotlight icon on a Mac, it is running Tiger.
    Spotlight is a Tiger search feature and Spotlight and Dashboard are only available for and can be used with Tiger.

  • MY MAC JUST DID SOMETHING REALLY WEIRD, AND IM A LITTLE WORRIED...

    Hi, i left my computer on, its set to sort of, shut the display screen down when im away from it for more than 10 minutes, but not to put itself to sleep or shut down.
    However, when i got back from downstairs, about an hour or two later, i looked at my screen and my login window was there with my name and picture, just like i had restarted my mac. But i hadn't. it was as though my mac had restarted itself. I'm a little worried my mac is spazzing out, or am i just being paranoid?

    Thank you to all who are trying to help me. I'm sorry that in my aggitated state that I did not explain my situation in more detail. Don't feel that you might insult me.......I am a novice.
    I was working on my PowerBook G4, MAC OS X version 10.4.6 1.67 GHz Power PC G4 1 GB DDR SDRAM when I accidently pulled out the power cord from the laptop itself. Immediately the screen flickered to black and then the power went completely off. I was not able to get the laptop to turn on again. When I pushed the battery button all the lights went on showing that the battery was fully charged. I tried starting with the power cord in and then with it removed but nothing.........aboslutely nothing........no sound, no nothing. I could not get the laptop to start up by doing ctrl, apple, power button....or with any other combination of keystrokes. I was trying to insert the DVD to use the disk utility.
    I then found info telling me to unplug the power cord, remove the battery, push and hold the start button for 5+ seconds, re-insert the battery and then push the start button. The laptop now springs to life but any time I close the lid or retart it, it again goes dead and won't start again unless I do the things mentioned in this paragraph. I was smart enough this time to burn copies of my projects so I'm not in as much of a panic now. However I do need to fix the laptop from going dead on me everytime I close the lid or restart the machine.
    Someone recommended on another forum that I reset the power manager but there is a major warning saying to only do that as a last resort and that I would lose my RAM card or something like that. I'll look up the warning info again and post it here. What are your thoughts on resetting the power manager.
    Thanks so much for all your help. It really is so very nice of you.

  • Something really wrong.

    Here is my problem... I just got a new replacement iPod (my old one had battery problems). And it worked perfectly fine when I first connected it to my iMac. But the second time, when I went to update, the computer was only charging it, no "Do Not Disconnect" on the iPod or anything, and it didn't even show up as a disk on the desktop. After a while, it came up with the Do Not Disconnect, and about half hour later it began updating, the next couple times I connected to the computer it was fine, until now... it got stuck when it was updating on a certain song, so I attempted to stop the update, so I could delete the song (I was losing my patience). But it wouldn't disconnect, and eventually iTunes froze up, so I restarted my computer, but when it was restarted it came up with a message something like "You have inserted a disk with volumes Mac OS X cannot recognize, do you want to continue with it?" I clicked ignore (to continue, because the other option was eject). But after that, the iPod didn't show up on iTunes or the desktop, but it still has the "Do Not Disconnect" on the iPod screen. I have no idea what is wrong with it, and I have tried restarting my computer and restarting the iPod, but nothing is working. So if anyone has any idea what happened, or what I can try to fix it, it would be really appreciated.

    Ok... I fixed the problem (sort of). I worked out that it came up on Disk Utility, so I went there, and repaired it, and erased, then disconnected it. Then it came up on iTunes and is now updating the songs. BUT there is one minor thing, on the desktop, it comes up as a normal disk, not as an iPod (it usually has the little blue iPod icon). I don't know why it does this, if it doesn't change anything, then I am fine with it, but if it is going to change something or cause problems in the future, it would be good to know how to fix it.

  • My G5 2.0 acting really crazy. What should I test to see what's wrong?

    A year or more ago I had a problem with my 2.0 G5 not starting and fans going into TURBO mode. After MUCH research I thought my board failed and after going back and forth with Apple about them covering the repair even though it was out of warranty they agreed. I took it to a local shop (which Apple paid for) and it turned out to be nothing but my video card needing to be re-seated. Maybe 6 months later the same problem happened so I opened the computer up and removed and replace anything and everything I could see and it worked.
    Now to my current issue, for starters...I'm not sure when but at some point semi-recently I stopped hearing the chime sound when I start the computer. No big deal as the computer seemed to work perfectly fine in every other way. And then two weeks ago I was watching a movie on Quicktime and the movie sputtered, the audio got crackly and metallic sounding and the computer FROZE. I had to force a shut down with the power button on the front of the computer. I restarted and everything seemed fine. I went back to the movie and in no time, same thing. When I tried to restart I got the black screen and fans in turbo mode again. I opened up the machine, did the same re-seating thing to everything and tried to start again, no go. I resigned to the fact I would need to take it in to have it checked out but I got busy in the last week or so, so it sat in the kitchen. Today I decided to try again. I hooked it up, turned it on and it seems like everything is working fine.
    So no my question, what should I do know? Is there some sort of test I can run on the computer to see if anything is running funky? What would you suggest I do?
    Thanks so much for your help!
    D

    OK, since my last post video has been fine. I still a problem starting the machine when it's turned off (black screen, fans go into TURBO mode). At one point it wouldn't start so I unplugged everything and was determiend to take it to The Apple Store and have them look at it. The computer sat in my kitchen for a week or two because I was busy but the day I decided to finally take it in I thought 'Let me just give it another try'. It fired right up so I decided to just not turn it off. It worked fine.
    Two night ago, I plugged something in to the front usb jack and it wouldn't recognize it. Never showed up so I unplugged and external jack from the rear USB and the new device worked. When I was through using it I went to plug the previous device in and it wouldn't recognize it (at least not in the time frame I gave it which should have been long enough). I tried a restart and I got the Turbo fans so I took it into the Apple store two night ago. They called me today to say they think it's either the logic board or the processor. Apple told me a year ago they thought it was the logic board but another place saw it and said all they needed to do was reseat the video card. The computer worked flawlessly for months after. When it acted up I would open the computer and reseat everything I could see.. usually this worked.
    Can someone please tell me what they think is wrong with this thing? Advice? A processor is $375 and a board is $500+. I've been thinking of getting a laptop but I don't want to just dump this if I can save it. Is it worth putting that much money into? Can I get the stuff cheaper and do it myself? What is the resale value of this thing with either a bad processor or a bad board?
    Thanks!!

  • Something really strange with iMac G5 screen

    My friend has an iMac G5, and he has a strange problem. He was trying to find a shortcut for something in Quark, he was hitting the command key and something else (he can't remember what) and suddenly, his 20" iMac screen doesn't fit the contents of the screen anymore. It's like the dock on the bottom is off the screen, ditto for the menu bar at the top and side to side. When you move the mouse, it shifts the whole screen left, right, up or down. Again, it's as though the contents of the screen are bigger than the 20" screen itself. I've checked resolution, and it's set to native; we've rebooted the computer, but the problem persists. I have no idea what's going on; can anyone please help?
    Thank you.

    He might have turned on Zoom. If you look in System Preferences->Universal Access, you'll see the controls there. You can turn it on or off without having that Preference window open, though. Use ⌘-⎇-8 (Command-Option-8).

  • Something really worng with ipad, please help!

    so ive had my ipad since decmber and already theres something wrong with it. i was just scrolling through my apps when all of a sudden my ipad flashed onto a blue screen and then just stayed onto a dark blue/black screen. i tryed turning it off and when it did the apple logo appeared and then it just went dead. my ipad now wont turn on at all and i dont know what to do with it ? ive tryed the trick where you press the home and lock button but nothing happened. someone please please please help as ive only had this ipad for a few months and woud hate to get rid of it

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iOS: Device unexpectedly restarts, displays Apple logo, or powers off
    http://support.apple.com/kb/TS5356
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    You iPad is still under warranty. Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Something REALLY ***** with .mac email

    It seems that every time I write a LONG, extended email on my .mac account email, and I get the "# of misspelled words" window, in checking the words I bump the wrong key and lose the email. This has happened several times over the years, and it is very annoying. It always happens with LONG emails, and I have never been able to retrieve the unsent email. I always end up going to a yahoo account and retyping the whole thing, and it always seems like the email was more inclusive and "better" the first time - the one I lost.
    Has this happened to anyone else? Is there something I should know about preventing this and/or fixing it before I lost the long email I have just typed? I love using this .mac email more than yahoo or hotmail, but..... it's sooooo aggravating when this happens.
    Thanks for any advice and/or help and/or just to let me know that I'm not the only one to whom this has happened.
    Dennis

    It is unclear... are you using Mail to compose this message or are you using the web interface to .Mac mail?

  • I am really crazy for lion frozen. it happened any time

    My mbp is 2010 mid 15''. Now, I use lion 10.7.2. The main problem is THE SYSTEM FROZEN. It happened any time. Sometime I use safari, it happened. I use Mail, it happened. I use Finder, it happened. I realy want to crazy. I reinstall the lion, but it not better. oh, I also have the experience for fronzen on the login screen. Every time the system frozen, what I can do is press the turnoff button to shut down the computer. WHO CAN HLEP ME!!!! One more thing, I turn on the function "Restart automatically if the computer freezes", but it also doesn't work.

    I didn't add memory, and I also try to reinstall the OS 10.7.2 in a new partition, but it doesn't make sence. The system was frozen again on yesterday night. At that time, I just opened Safari(there are one or two tabs open). When I used Quicktime to open a .MOV video which made by iphone 4, the system was frozen. I could move the mouse pointer, but I cant use it to click any thing. The clock also stop. After I used power button to force turn off the computer and turn on, the system was frozen on the login screen. I used power button turn off it again and turn on again. This time everything seem like ok. However, when I wanted to type the password, I just click the mouse one more time, the system was fronzen. After that, I found that if I force turn off computer due to the system frozen, I have to type the password as soon as possible and shouldn't click the mouse. If not, the system will be frozen on the login screen. One more thing I notified, after restore system from the frozen, the spotlight will be reindexing. 

  • Am I doing something really stupid?

    I can't understand why this won't compile, I must be doing something wrong, but I can't for the life of me figure out what:
    import java.applet.Applet;
    import java.awt.*;
    public class myApplet extends Applet{
         Isosceles triangle=new Isosceles(2,2,5);
         int perim=triangle.getPerimeter();
         System.out.println(perim);
    Errors:
    myApplet.java:8: <identifier> expected
    System.out.println(perim);
    ^
    myApplet.java:8: cannot resolve symbol
    symbol : class out
    location: class java.lang.System
    System.out.println(perim);
    ^
    2 errors
    Can anyone help?

    You can't have code within a class body like that, a class body can only have declarations. You need to write a method (or constructor, or initializer block) where to put those lines.
    Here's a popular way of doing it:
    public class myApplet {
    public static void main(String[] args) {
    Isosceles triangle=new Isosceles(2,2,5);
    int perim=triangle.getPerimeter();
    System.out.println(perim);
    (btw if you thought you are writing an applet where do you think the output from System.out.println will go?)

  • Theres something really wrong with Clean Up Diagram

    There appears to be some significant problems with the Clean Up Diagram algorithm. It seems that far too much space is padded next to cluster unbundle by name and structure objects. It is really frustrating that some things appear miles apart and others are far too close. I have done a very good job of factoring this application into VIs but the inconsistency around certain objects makes it look terrible.
    Help! I can't read it!
    PS: Prior to now I have been careful not to perform a Clean Up Diagram on the vi containing a case with a large number of sub cases.

    DEppAtNGC wrote:
    As for the feature being "new", it's NOT new.
    Diagram Cleanup was introduced with LabVIEW 8.6 last August. Since this is the latest major version it is a new feature by any reasonable definition.
    I agree that it is not great to be used on excellent code. So far it seems to bring the diagram quality somewhere in the neighborhood of the 70 percentile on my scale (wild guess!). It does a great job on horrible diagrams (it lifts them from very low score), but makes any of my own diagrams worse (they go from the 99 percentile down to 70). Don't expect miracles. I never use it on my own code, but it helped me to make some sense out of nightmare code posted here in the forum..
    DEppAtNGC wrote:
    GET THIS FIXED!!!
    Well, NI is always eager for product feedback, so if you have detailed and constructive ideas about how to improve the cleanup tool, please let them know via the product suggestion center. If possible, include some typical diagrams and describe what's wrong with the current outcome and how you want the results to look like instead. Good luck!
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • IPhoto movie wont open

    I recently synced my Sony Cyber-Shot digital camera to my iPhoto library. The 231 photos included one video that I wanted to send to iMovie to edit. When I try exporting the movie I leave the original format and iMovie can't recognize it when I try t

  • Runinstaller for 10.2.0.4 patch set while upgrading from 10.2.0.1 fails

    All I have pretty peculiar situation. I have installed (silent) oracle database server EE 10.2.0.1 on my RHEL 5 machine. Before configuring the database, I wanted to patch it to 10.2.0.4. I am trying to patch the oracle home in silent mode it self as

  • Tool for building LDAP queries

    are there any visual or non visual tools for building LDAP queries ?? thanks and regards Renjith.

  • ITunes cannot connect to my iPad because pairing record is missing.

    This is a one month old iPad that I just upgraded to ios 5 before I used it.  I don't know if the problem is in the upgrade.  When I did the upgrade, the message "iTunes cannot connect to the iPad because the pairing record is missing" came up. I fig

  • How can we change the default inlist operator in condition pane to equalto

    When a user creates a condition in a WebIntelligence report, the                                             default operator is "In List". Can this default be changed to "Equal                                                       To" for all users?