Code causing exceptions at its own sweet time and place

import java.lang.*;
class newthread implements Runnable
     Thread t;
     int click=0;
     public volatile boolean running=true;
     newthread(int p)
          t=new Thread(this);
          t.setPriority(p);
     void start()
          t.start();
     public void run()
          while(running)
               click++;
     void start1()
          running=true;
     void stop()
          running=false;     
class threadpriority2
     public static void main(String argv[])
          newthread ob1=new newthread(Thread.NORM_PRIORITY+2);
          newthread ob2=new newthread(Thread.NORM_PRIORITY-2);
          ob1.start();
          ob2.start();
          try
               Thread.sleep(5000);
          catch(Exception e)
               System.out.println("error detected:"+e);
          System.out.println("first one:"+ob1.click);
          System.out.println("first one:"+ob2.click);
          System.out.println("the priority of ob1 is:"+ob1.t.getPriority());
          System.out.println("the priority of ob2 is:"+ob2.t.getPriority());
          ob1.stop();
          ob2.stop();
          ob2.t.setPriority(Thread.NORM_PRIORITY+3);      
          ob1.t.setPriority(Thread.NORM_PRIORITY-3);
          ob1.start1();
          ob2.start1();
          ob1.start();
          ob2.start();
          System.out.println("the priority of ob1 is:"+ob1.t.getPriority());
          System.out.println("the priority of ob2 is:"+ob2.t.getPriority());
          try
               Thread.sleep(5000);
          catch(Exception e)
               System.out.println("error detected:"+e);
          ob1.stop();
          ob2.stop();
          System.out.println("first one:"+ob1.click);
          System.out.println("first one:"+ob2.click);
errors during runtime:
Exception in thread "main" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Unknown Source)
at newthread.start(threadpriority2.java:17)
at threadpriority2.main(threadpriority2.java:77)
when i run this code it causes exceptions at its own sweet locations when i run it separately.if once it displays some valid input it would then be followed by the exception
next time if i run it it will throw exception as soon as i run it at the very start without displaying even an iota of valid data like the previous case
is ti because the os is placing restrictions on the threads growth or something else.incase there is an error in my code it should atleast pop up the exceptions at one particular loaction in the output and not give different outputs

1) When you post code, please use and tags as described in Formatting tips on the message entry page. It makes it much easier to read.
wasnt aware of it.will keep it in mind i post nexttime.sorry for the inconvenience[\b]
3) You have multiple threads, right? The scheduling of which thread gets how much CPU time when is not subject to your control or prediction, so of course you'll see different timings in subsequent runnings of the same code.[b]actually the problem is not with multiple threads showing different times.whats happening is that exceptions are being thrown randomly at runtime.once when i ran it the exception was displayed at the very beginning of the output and the program snapped.next when i ran it first some output which was slated to be displayed got displayed and then the exceptions appeared in the output.now if the exceptions are thrown at the very beginning its obvious theres some problem at the background coz in the second case that never happened[\b]
i guess the formatting tips have taken effect[:D]

Similar Messages

  • WRT610N Resets to Defaults on its own 3 Times now.

    Hello All,
     I currently have a WRT610N V1.0 that has now randomly RESET to factory Defaults all on its own 3 times now. on this last time it has gotten to the point where Port fowarding no longer functions at all. I like the router overall (not Tickled pink, but ti has been good otherwise) and do not want to go back to my older WRT 350N if I do not have to. Any one else seee this happen, and I am one of the people also having a problem trying to update the firmware that is currently on the support page as well. I am currently running Firmware 1.00.03 B15. Thanks.

    If you are unable to upgrade the firmware on your Router, then you can try to upgrade the firmware on your Router using TFTP Utility.
    Click Here to download the TFTP Utility. 
    Once you download the Utility you can follow the steps to upgrade the firmware on your Router. 
    Double click the TFTP.exe file and click run.
    For Server- Enter the IP Address of the router that you assigned.  By default, the router is 192.168.1.1...
    For Password- Enter the password you assigned the router. By default, the router’s password is “admin”.
    For File- Click the triple “…” button and browse for the .bin firmware file...
    Click Upgrade button to start upgrading.  A progress bar should show up to show the progress.
    Once the Upgrade is done press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • How do I correct problems with my trackpad were it is either unresponsive to my finger as a mouse or the cursor appears to move on its own at times?

    How do I correct problems with my trackpad where it is either unresponsive to my finger as a mouse or the cursor appears to move on its own at times?

    http://support.apple.com/kb/TS1248
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    If these steps do not help, contact Apple.

  • HT204350 Trying to activate my one to one and getting a message that the activation code is invalid.  Have tried 3 times and verified the number 3 times

    Trying to activate my one to one and getting a message that the activation code is invalid.  Have tried 3 times and verified the number 3 times

    Apple itself does not respond to questions on the Apple Support Communities forums.  Responses come from other Apple product users like yourself.
    iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html > Get iTunes support via Express Lane > iTunes > iTunes Store

  • My CC update keeps failing on error code 205. I have retried several times and it keeps going to error. I have tried to uninstall CC but I get error that previous update is still running.

    My CC update keeps failing on error code 205. I have retried several times and it keeps going to error. I have tried to uninstall CC but I get error that previous update is still running.:

    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Adobe CC 2014 Direct Download Links: Creative Cloud 2014 Release | ProDesignTools

  • Can I limit the number of appointments made by everyone at a specific time and place?

    I want to limit the number of people who make an appointment at a specific time and place.  Can I do this?

    Which Adobe software are you using?

  • My newer IPhone gets a weaker cell signal at the same time and place as my wife's older one. Help

    My newer IPhone gets a weaker cell phone signal at the same time and place as my wife's older IPhone. Help!

    What is the signal the difference?
    Follow this guide and record the numbers you see...
    http://lifehacker.com/5929546/see-the-actual-signal-strength-on-your-iphone-with -this-quick-tweak
    If the difference is within ~10db there's not much to worry about.
    Now if you see -130 and -80 that is an issue. (talk to your carrier)
    But if you see -60 and -75, both phones are operating normally.
    What are the iPhones in question?
    Are you both on the same network? (what network(s) are you on?)
    What data connection is available on each phone? (3G/4G/LTE)
    Are the iOS and Carrier settings up-to-date?

  • Mac Book Pro i7 - Logging off on its own, night time, power down sleep

    Hi Everyone,
    I have had my Macbook pro for around 4 months now.
    And I have had this problem from the beginning.
    At night, often when I leave my machine, with software open and things active.
    I come back in the morning to find my mac logged off and at the login screen.
    Can anyone suggest what would be causing this?
    I have  MAC OSX 10.6.7
    8GB of DDR3 RAM
    2.8 GHZ Core i7 Processor
    I have tried SMC resets and it doesnt seem to work.
    Any ideas of why my mac book pro might be logging off on its own would be great!
    Thank you.

    Try trashing these 3 .plist preferences and reboot. Reset your Energy Saver preferences.
    HD > Library > Preferences > SystemConfiguration > com.apple.AutoWake.plist & com.apple.PowerManagement.plist  
    User > Library > Preferences > com.apple.systemuiserver.plist
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G + 120G OCZ Vertex 3 SSD Boot HD 

  • BIG TROUBLE - iMac rebooting on its own each time I try to shut it down

    I just installed Snow Leopard, everything went smooth but when I want to shut down my iMac now, it shuts down but after 5 sec reboots automatically. And I can try as long as I want, still the same, have to physically unplug it to shut it down.
    Please help!

    This problem now has been around for a long time, and I have not seen a solution, except for going back to Leo (not really a solution). If you want to do so, then let me know. As a last resort, I would suggest installing Sno over Sno using an upgrade install. Another with your problem just tried this procedure, but it did not help. So, you are not likely to benefit from the install; it's just that computers are somewhat unpredictable, so what doesn't work for one might work for another. As with any install, be sure you are prepared for the worst and, thus, are well backed up.

  • Can a OIM User enter its own Security Qns and provide Answers to the same?

    Hello there,
    Is there anyway we can allow a user in OIM to provide its own security questions at the time of self registration? If so how we can achieve that?
    Please throw in ur ideas?
    TIA,
    - oidm.

    As Kevin suggested it is totally Customization.
    In OIM first time while setting QA it brings the question from Lookup but after that it reads from the PCQ table only.
    So as you want that User should be able to set his own Questions then no need of any Lookup *(APMK)*. You can build your custom JSP to enter Questions as well as Answers and send these data to PCQ table. It should be in Encrypted Format.
    Next time when User Logs in it wil fetch the questions from PCQ table and validate the answers from that. So no need of Question Lookup.
    Question Lookup we use because we want to show same questions to everyone and it is configurable and we can change the questions as per client requirement.
    In your case your user are entering there own questions.

  • The Firefox menu opens on its own when idle and know one is using the computer. Why?

    I have three windows 7 x64 computers with Firefox 5 as the default browser. Firefox is always open, and usually the active window. I've noticed with 5 that the Firefox menu will pop open on its own. My computer will have the screen dimmed or blacked-out from the idle timer, then from the corner of my eye I see it activate and and the Firefox menu is open. Since then I've actually seen it open on it's own when I wasn't using the system. Keeps making me think someone has logged into my computer and was doing stuff. And before anyone asks, all AV is up to date and scanned daily, and no has remote access to any of these computers. Thanks.

    Seems like your Computer is Haunted :-P just kidding..
    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • Remove AM/PM in time and place a leading zero using T-sql

    Hi All,
    I have a table with time column, lets say my source data looks like this..
    Time
    8:00AM
    10:00AM
    1:00PM
    12:30PM
    9:00AM
    My output should look below..basically I need  a t-sql to remove AM /PM and place a leading 0 infront of time if it there is a single digit before colon( : )
    Time
    08:00
    10:00
    01:00
    12:30
    09:00
    Create statement:
    Create table TimeTest(
    ID int null,
    Time char(7) null,
    Insert Statement:
    Insert into Timetest(ID,Time) Values (1,'8:00AM')
    Insert into Timetest(ID,Time) Values (2,'10:00AM')
    Insert into Timetest(ID,Time) Values (3,'1:00PM')
    Insert into Timetest(ID,Time) Values (4,'12:30PM')
    Insert into Timetest(ID,Time) Values (5,'9:00AM')
    Thanks,
    RH
    sql

     I guess it depends on what you really want.  If you really truly want the expected results you have listed above, which changes 1pm into 0100, instead of 1300, then you can do this:
    SELECT ID
    ,[Time]
    ,RIGHT(CAST(CAST(REPLACE(REPLACE(REPLACE([Time], 'AM', ''), 'PM', ''), ':', '') AS int) + 10000 AS varchar(5)), 4) AS [HHMM]
    FROM TimeTest
    However, if you do want to differentiate between 1:00PM and 1:00AM, making them 1300 and 0100 respectively, then just use the solution from
    Jingyang Li

  • My macbook pro mid 2012 non retna has shut down on its own severla time. I do not know what is causing the problem. Here is a copy of the error report. Please Advise.

    Anonymous UUID:  
    9C671066-2BC8-E27B-D3A4-D412BE7EE736
    Tue Jun 17 18:27:35 2014
    panic(cpu 4 caller 0xffffff80252dbf5e): Kernel trap at 0xffffff821104b6e0, type 14=page fault, registers:
    CR0: 0x000000008001003b, CR2: 0xffffff821104b6e0, CR3: 0x0000000027d4b000, CR4: 0x00000000001606e0
    RAX: 0x00000000da95f170, RBX: 0xffffff8025236e50, RCX: 0x00000000256a0e90, RDX: 0x0000000000000000
    RSP: 0xffffff8025236e50, RBP: 0xffffff821104bf80, RSI: 0x0000000000000000, RDI: 0xffffff8047aa3780
    R8:  0xffffff8205de5078, R9:  0xffffff8205e60068, R10: 0xffffff821104bd90, R11: 0xffffffffffffffff
    R12: 0xffffff80476ae280, R13: 0xffffff8047b45140, R14: 0xffffff8205de5000, R15: 0xffffff8047b45168
    RFL: 0x0000000000010296, RIP: 0xffffff821104b6e0, CS:  0x0000000000000008, SS:  0x0000000000006e50
    Fault CR2: 0xffffff821104b6e0, Error code: 0x0000000000000011, Fault CPU: 0x4 Kernel NX fault
    Backtrace (CPU 4), Frame : Return Address
    0xffffff821104bc60 : 0xffffff8025222fa9
    0xffffff821104bce0 : 0xffffff80252dbf5e
    0xffffff821104beb0 : 0xffffff80252f3456
    0xffffff821104bed0 : 0xffffff821104b6e0
    0xffffff821104bf80 : 0xda950000
    No mapping exists for frame pointer
    Backtrace terminated-invalid frame pointer 0xda95f170
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    13D65
    Kernel version:
    Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64
    Kernel UUID: ADD73AE6-88B0-32FB-A8BB-4F7C8BE4092E
    Kernel slide:
    0x0000000025000000
    Kernel text base: 0xffffff8025200000
    System model name: MacBookPro9,1 (Mac-4B7AC7E43945597E)
    System uptime in nanoseconds: 48504897868
    last loaded kext at 42431951223: com.apple.driver.AudioAUUC
    1.60 (addr 0xffffff7fa6d5d000, size 32768)
    loaded kexts:
    com.apple.driver.AudioAUUC
    1.60
    com.apple.driver.AppleGraphicsDevicePolicy
    3.5.26
    com.apple.driver.AppleHWSensor
    1.9.5d0
    com.apple.filesystems.ntfs
    3.11
    com.apple.driver.AGPM
    100.14.15
    com.apple.driver.ApplePlatformEnabler
    2.0.9d1
    com.apple.driver.X86PlatformShim
    1.0.0
    com.apple.filesystems.autofs
    3.0
    com.apple.iokit.IOBluetoothSerialManager
    4.2.4f1
    com.apple.driver.AppleMikeyHIDDriver
    124
    com.apple.driver.AppleMikeyDriver
    2.6.1f2
    com.apple.driver.AppleHDAHardwareConfigDriver
    2.6.1f2
    com.apple.driver.AppleHDA
    2.6.1f2
    com.apple.driver.AppleUpstreamUserClient
    3.5.13
    com.apple.GeForce
    8.2.6
    com.apple.iokit.IOUserEthernet
    1.0.0d1
    com.apple.driver.AppleIntelHD4000Graphics
    8.2.6
    com.apple.driver.AppleBacklight
    170.3.5
    com.apple.iokit.IOBluetoothUSBDFU
    4.2.4f1
    com.apple.Dont_Steal_Mac_OS_X
    7.0.0
    com.apple.driver.AppleHWAccess
    1
    com.apple.driver.ACPI_SMC_PlatformPlugin
    1.0.0
    com.apple.driver.AppleMCCSControl
    1.1.12
    com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
    4.2.4f1
    com.apple.driver.AppleThunderboltIP
    1.1.2
    com.apple.driver.AppleSMCLMU
    2.0.4d1
    com.apple.nvidia.NVDAStartup
    8.2.6
    com.apple.driver.AppleIntelFramebufferCapri
    8.2.6
    com.apple.driver.AppleMuxControl
    3.5.26
    com.apple.driver.SMCMotionSensor
    3.0.4d1
    com.apple.driver.AppleIntelMCEReporter
    104
    com.apple.driver.AppleSMCPDRC
    1.0.0
    com.apple.driver.AppleLPC
    1.7.0
    com.apple.driver.AppleUSBTCButtons
    240.2
    com.apple.driver.AppleIRController
    325.7
    com.apple.driver.AppleUSBTCKeyEventDriver
    240.2
    com.apple.driver.AppleUSBTCKeyboard
    240.2
    com.apple.driver.AppleFileSystemDriver
    3.0.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless
    1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib
    1.0.0d1
    com.apple.BootCache
    35
    com.apple.iokit.SCSITaskUserClient
    3.6.6
    com.apple.driver.XsanFilter
    404
    com.apple.iokit.IOAHCIBlockStorage
    2.5.1
    com.apple.driver.AppleSDXC
    1.5.2
    com.apple.iokit.AppleBCM5701Ethernet
    3.8.1b2
    com.apple.driver.AppleUSBHub
    666.4.0
    com.apple.driver.AppleFWOHCI
    5.0.2
    com.apple.driver.AirPort.Brcm4331
    700.20.22
    com.apple.driver.AppleAHCIPort
    3.0.0
    com.apple.driver.AppleUSBEHCI
    660.4.0
    com.apple.driver.AppleUSBXHCI
    677.4.0
    com.apple.driver.AppleSmartBatteryManager
    161.0.0
    com.apple.driver.AppleRTC
    2.0
    com.apple.driver.AppleACPIButtons
    2.0
    com.apple.driver.AppleHPET
    1.8
    com.apple.driver.AppleSMBIOS
    2.1
    com.apple.driver.AppleACPIEC
    2.0
    com.apple.driver.AppleAPIC
    1.7
    com.apple.driver.AppleIntelCPUPowerManagementClient
    217.92.1
    com.apple.nke.applicationfirewall
    153
    com.apple.security.quarantine
    3
    com.apple.driver.AppleIntelCPUPowerManagement
    217.92.1
    com.apple.kext.triggers
    1.0
    com.apple.iokit.IOSerialFamily
    10.0.7
    com.apple.driver.DspFuncLib
    2.6.1f2
    com.apple.vecLib.kext
    1.0.0
    com.apple.iokit.IOAudioFamily
    1.9.7fc2
    com.apple.kext.OSvKernDSPLib
    1.14
    com.apple.iokit.IOAcceleratorFamily
    98.20
    com.apple.nvidia.driver.NVDAGK100Hal
    8.2.6
    com.apple.nvidia.driver.NVDAResman
    8.2.6
    com.apple.iokit.IOSurface
    91.1
    com.apple.iokit.IOFireWireIP
    2.2.6
    com.apple.iokit.IOBluetoothFamily
    4.2.4f1
    com.apple.driver.IOPlatformPluginLegacy
    1.0.0
    com.apple.driver.AppleHDAController
    2.6.1f2
    com.apple.iokit.IOHDAFamily
    2.6.1f2
    com.apple.driver.AppleSMBusController
    1.0.11d1
    com.apple.iokit.IOBluetoothHostControllerUSBTransport
    4.2.4f1
    com.apple.iokit.IOAcceleratorFamily2
    98.20
    com.apple.AppleGraphicsDeviceControl
    3.5.26
    com.apple.driver.AppleBacklightExpert
    1.0.4
    com.apple.iokit.IONDRVSupport
    2.4.1
    com.apple.driver.AppleGraphicsControl
    3.5.26
    com.apple.iokit.IOGraphicsFamily
    2.4.1
    com.apple.driver.X86PlatformPlugin
    1.0.0
    com.apple.driver.AppleSMC
    3.1.8
    com.apple.driver.AppleSMBusPCI
    1.0.12d1
    com.apple.driver.IOPlatformPluginFamily
    5.7.0d11
    com.apple.driver.AppleThunderboltEDMSink
    2.1.3
    com.apple.driver.AppleThunderboltDPOutAdapter
    3.1.7
    com.apple.iokit.IOSCSIBlockCommandsDevice
    3.6.6
    com.apple.iokit.IOUSBMassStorageClass
    3.6.0
    com.apple.driver.AppleThunderboltDPInAdapter
    3.1.7
    com.apple.driver.AppleThunderboltDPAdapterFamily
    3.1.7
    com.apple.driver.AppleThunderboltPCIDownAdapter
    1.4.5
    com.apple.driver.AppleUSBMultitouch
    240.9
    com.apple.iokit.IOUSBHIDDriver
    660.4.0
    com.apple.driver.AppleUSBMergeNub
    650.4.0
    com.apple.driver.AppleUSBComposite
    656.4.1
    com.apple.iokit.IOSCSIMultimediaCommandsDevice
    3.6.6
    com.apple.iokit.IOBDStorageFamily
    1.7
    com.apple.iokit.IODVDStorageFamily
    1.7.1
    com.apple.iokit.IOCDStorageFamily
    1.7.1
    com.apple.iokit.IOAHCISerialATAPI
    2.6.1
    com.apple.iokit.IOSCSIArchitectureModelFamily
    3.6.6
    com.apple.driver.AppleThunderboltNHI
    2.0.1
    com.apple.iokit.IOThunderboltFamily
    3.2.7
    com.apple.iokit.IOEthernetAVBController
    1.0.3b4
    com.apple.driver.mDNSOffloadUserClient
    1.0.1b5
    com.apple.iokit.IOFireWireFamily
    4.5.5
    com.apple.iokit.IO80211Family
    630.35
    com.apple.iokit.IONetworkingFamily
    3.2
    com.apple.iokit.IOUSBUserClient
    660.4.2
    com.apple.iokit.IOAHCIFamily
    2.6.5
    com.apple.iokit.IOUSBFamily
    677.4.0
    com.apple.driver.AppleEFINVRAM
    2.0
    com.apple.driver.AppleEFIRuntime
    2.0
    com.apple.iokit.IOHIDFamily
    2.0.0
    com.apple.iokit.IOSMBusFamily
    1.1
    com.apple.security.sandbox
    278.11
    com.apple.kext.AppleMatch
    1.0.0d1
    com.apple.security.TMSafetyNet
    7
    com.apple.driver.AppleKeyStore
    2
    com.apple.driver.DiskImages
    371.1
    com.apple.iokit.IOStorageFamily
    1.9
    com.apple.iokit.IOReportFamily
    23
    com.apple.driver.AppleFDEKeyStore
    28.30
    com.apple.driver.AppleACPIPlatform
    2.0
    com.apple.iokit.IOPCIFamily
    2.9
    com.apple.iokit.IOACPIFamily
    1.4
    com.apple.kec.corecrypto
    1.0
    com.apple.kec.pthread
    1
    Model: MacBookPro9,1, BootROM MBP91.00D3.B08, 4 processors, Intel Core i7, 2.3 GHz, 16 GB, SMC 2.1f175
    Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
    Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 512 MB
    Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B545331473634485A2D314736453120
    Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B545331473634485A2D314736453120
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF5), Broadcom BCM43xx 1.0 (5.106.98.100.22)
    Bluetooth: Version 4.2.4f1 13674, 3 services, 15 devices, 1 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: HGST HTS541010A9E680, 1 TB
    Serial ATA Device: MATSHITADVD-R   UJ-8A8
    USB Device: Hub
    USB Device: USB2.0 Hub
    USB Device: USB to ATA/ATAPI bridge
    USB Device: FaceTime HD Camera (Built-in)
    USB Device: Hub
    USB Device: Hub
    USB Device: Apple Internal Keyboard / Trackpad
    USB Device: BRCM20702 Hub
    USB Device: Bluetooth USB Host Controller
    USB Device: IR Receiver
    USB Device: USB Receiver
    Thunderbolt Bus: MacBook Pro, Apple Inc., 25.1

    What happens when you install the original RAM?
    What brand of RAM did you install?
    Ciao.

  • Printer re-starts on its own from time to time.

    My Photosmart C4680 all-in-one seems to have a connectivity problem.  Without any visible cause, it simply restarts from time to time.  Some times the PC is in use, other times it is not.  The PC generates the usual "device disconnected" and "device activated" sounds when this happens.  I have changed the cable from the printer to the pc and also re-checked the current connections to make sure they are firmly seated.  Any suggestions?

    Better news my charger I was using appears to maybe be part of the thing. I wouldn't work so I got my brothers and it charges so is it possible the old charger was shorting it thus the safety bit killed the power? Maybe the angle is just happen stance.

  • My Macbook 13inch (2008) shuts down and restarts on its own randomly. why and what needs to be done to fix it?

    For the last three days my macbook has been shutting itself off - and then on again. And I don't know why or what to do.
    I have a new power adapter, but my battery may be bad, which is why I keep the macbook plugged for the time of use. I have worked with my mac with that battery in, I also took it out- it doesn't appear to make a difference. Also: it doesn't matter if I have the mac on a desk or if I move it. It randomly shuts off.
    Also, I have been monitoring the temp and the fan... I believe it operates in ok-range. Why is this happening? And what to do?
    Cheers!

    Hi, though it all points to Graphic card or drivers, Soundflower has been a problem for many, in fact the first 4 non apple kexts may be the problem.
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts (Users & Groups in later OSX versions)>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

Maybe you are looking for