100% CPU usage... does anyone else get this?

Here is my code. I would have simplidied it for you... but I honestly have no idea where it went wrong.
One second it is running fine, the next it starts taking up 100% of my CPU cycles. I can't figure out what I did to it to make it do this... nothing I added creates an infinite loop or infinite threads. It's just... weird.
The code is probably too big for anyone to look at and tell me what's wrong, but can someone else download it and tell me if you also get 100% CPU usage? It needs to be run on Windows... it uses a couple JNI calls that are Windows-specific. Those calls were the first place I looked when trying to find the problem, but I have not changed that part of the code for a long time, and it has never been a problem before.
Don't run the bat file... just navigate to the Watchdog2 directory and do 'java Watchdog'.
Are there any tools that can help me figure out where the program is getting hung up? It's not freezing at any specific spot... just moving super slow and taking up 100% of my CPU. I'm so confused...
Message was edited by:
L4E_WakaMol-King

Nevermind!
Sorry for the trouble. The problem was that last time I compiled the code, it reverted back to and older version of a class I had compiled days ago. Why it did this is totally beyond me... but it did, and it just so happens that the old version of that class combined with the new version of my program were the perfect recipe for an infinite loop.
Seriously, if you are in inveterate debugger, you might get a good laugh out of this. I've spent the last week and a half trying to find a way to set the Windows console into cbreak mode (single character processing rather than line-at-a-time processing), and I finally managed to do it by writing some c code and putting it into a DLL with the JNI. So now my program (which runs from the console) can process each character as it is entered rather than waiting for a line return. The older version of the class that got reverted was one that used System.in rather than the input stream generated by the socket. I had set it to System.in for testing purposes, and apparently that testing version is the one it got reverted back to. So combine the two, and you have a console that is feeding System.in each character as it is pressed and a socket wrapper that is listening infinitely. It was a mess... but an uncannily serindipitous mess...
Ahh... debugging... good time...

Similar Messages

  • I have safari 7.0.2 and OS 10.9.4, everytime I try to install a safari extension such as, Pocket, I get an error message that says, Cannot install extension, I get this with every one of them. Does anyone else have this problem?

    I have Safari 7.0.6 and OS 10.9.4. I cannot install any extensions. Everytime I select install I get an error message, "Cannot instal extension" Does anyone else have this problem?
    Thanks Steve

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • I have a problem using Pages. Whenever I type fl I get a symbol instead. Does anyone else have this problem?

    I have a problem using Pages. Whenever I type fl I get a symbol instead. Does anyone else have this problem?

    Hi Tom
    On my machine it seems that the fi ligature doesn't exist with Times New Roman (installed version is 5.01.3x)
    It's available in Warnock Pro but the st one which is designed in Warnock doesn't apply.
    This last screenshot was made from Linotype Explore, the old free version.
    Typography isn't really easy, even with modern tools
    Yvan KOENIG (VALLAURIS, France) lundi 6 juin 2011 14:53:01
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • HT201210 I continue to get an error 37 message when trying to restore my iphone 3GS which crashed after trying to upload the last update. Does anyone else have this problem?

    I continue to get an error 37 message when trying to restore my iphone 3GS which crashed after trying to upload the last update. Does anyone else have this problem?

    Did you manage to fix the issue?
    I have exactly the same issue as described above : I installed the update 5.1.1 on my iphone 3GS and since then, I can not turn it on anymore. In Itunes, I get an error 37 when I am doing a restauration and it stops.
    This error has nothing to do with firewall : I tried to restore the phone on several computers, including in an Apple reseller and it did not work anywhere.
    I spent several hours on phone with the hotline from Apple which arrived to the conclusion that it is a hardware issue, but the phone was working perfectly fine until I installed this update!

  • I purchase songs from Itunes and as soon as I sync my phone, the song gets deleted. Does anyone else have this problem or know how to fix it?

    I purchase songs from Itunes and as soon as I sync my phone, the song gets deleted. Does anyone else have this problem or know how to fix it?

    I have random songs that a have paid for but they just disappear, or cannot be downloaded and so on. Sometimes they are indexed wrongly, and can't be found because of that, no work around because also the search function of itunes has gotten totally unusable. Not much fun to be an apple user anymore. I once used to be a very loyal user. My first apple was a Macintosh SE and an image writer II.

  • Kernal_task keeps taking 100% of one of my CPUs. Does anyone else have this problem?

    This seems to relate to when the computer is hot. However, it is not that hot at all. Seems to be aggressive way of cooling? Does anyone else notice this?
    I am on macbook air 2013 and mavericks

    My guess would be you don't have enough memory available to run the games that you are trying to play. This is not supposed to happen in iOS - but I have seen too many instances to believe that the iOS can handle it properly all of the time. My suggestion would be to close all apps in the recents tray, reboot and start over again and see if that helps.
    Go to the home screen first by tapping the home button. Double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar.
    Reboot 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 if it appears on the screen - let go of the buttons. Let the iPad start up.
    The problem could be something else software related and restoring the device might help, but I would start with this and see how it goes.

  • TS1398 My new IPad mini has poor wifi reception. Goes in and out.  My IPod, IPhone, Ipad1 and Ipad2 work finer. I think it has wifi antenna issues.  Does anyone else have this problem?

    My new IPad mini has poor wifi reception. It goes in and out.  My IPod, Iphone4, Ipad1 and Ipad2 work fine. What can I do?  Does anyone else have this problem?

    The quickest way (and really the only way) to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • After updating to IOS 8, my cellular enabled iPad will show "no service" unless turned off and completely rebooted.  Does anyone else have this issue?

    After updating to IOS8, my iPad 2,  which has both AT&T cellular and wifi, needs to be completely turned off and rebooted to get cellular service. Does anyone else have this issue ?

    Hi Hi Steve Giusto,
    If you are having issues with Xxx_state issue here_xxX, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    iOS: Force an app to close
    HT5137
    Next, I would try restarting the iPhone -
    HT1430
    If the issue is still present, you may want to restore the iPhone as a new device -
    HT4137
    Thanks for using Apple Support Communities.
    Best,
    Brett L ,
    If you are having issues with your iPad not staying connected to cellular service, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    iOS: Force an app to close
    Next, I would try restarting the iPad -
    Turn your iOS device off and on (restart) and reset
    If the issue is still present, you may want to restore the iPad as a new device -
    iOS: How to back up your data and set up your device as a new device
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • HT1923 ITunes new release does not print a playlist to my printer correctly.  It will print the header, but all the songs are printed on top of each other.  I didn't have this problem until I downloaded new version of ITunes.  Does anyone else have this p

    ITunes New Release - Printing a playlist to my printer the header prints, but the song list all print in the same place.  I am able to print from any other source.  Does anyone else have this problem?  Not sure if I should completely uninstall my ITunes and reload from scratch.  Sure would appreciate any help you could provide as I really need to get some playlists printed now.  Thanks - Scott

    There is another discussion of this problem under "can't print cd jewel case inserts"--about 20 people on that page have the same problem.--I have a "band-aid" fix for anyone is in a hurry.  When you go to print, choose the option "large playlist" (I think it is the last option).  You can then print at least the songs that are on the playlist.  Then, you can print a mosaic copy to get the album art work.  Then you get out the scotch tape & tape them together!  This is UNACCEPTABLE but it will do in a pinch. Someone on the other page suggests we all write in "itunes" feedback & complain.

  • Anyone else getting this case?

    Hey all!
    Anyone else getting this case from Verizon Wireless? http://www.verizonwireless.com/apple-iphone-4-belkin-standard-silicone-black.shtml. It is the Incipio Double Cover case...I got mine in black. I also got a pack of the screen protectors Verizon was selling, just to be safe! I will have Verizon put it on for me tomorrow!

    xtremex wrote:
    I ordered that same one too...You can have Verizon put your screen protector on for you? They never did that for me ...haha
    Yea I like the case - I actually went into a Verizon store to look at it physically and it is really nice. And yep! I have them put my screen protectors on for me lol - they are nice about doing that for me

  • My ipad2 doesnt connect to wifi as well as my original ipad, does anyone else have this issue?, my ipad2 doesnt connect to wifi as well as my original ipad, does anyone else have this issue?

    my ipad2 doesnt connect to wifi as well as my original ipad, does anyone else have this issue?, my ipad2 doesnt connect to wifi as well as my original ipad, does anyone else have this issue?

    If this does not help, please post the make and model of your Wi-Fi router. Maybe there is a way to monitor the connections from the router side.
    Even if the iPad2 has a bad Wi-Fi radio or antenna , the chance of you getting another one should be small. Also if you go to an Apple Store, I am sure you will be able to test it before you leave the store.
    Actually, my bet is riding on sibling rivalry.

  • My RDIO app no longer works on my iPad. Does anyone else have this issue?

    My RDIO app is not working on my iPad since they did an update. Does anyone else have this issue?

    Hi klucas54, 
    Thanks for visiting Apple Support Communities. 
    If the RDIO app is not working after the app was updated, start with the helpful troubleshooting tips in this article:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    Best Regards,
    Jeremy

  • My macbook pro (August 2010) keeps freezing when apple mail starts up. This happens every 2nd time I turn on my Macbook Pro. This forces me to hold down the power button to restart my Macbook Pro. Does anyone else experience this, and is there a fix? Thx

    My macbook pro (August 2010) keeps freezing when apple mail starts up. This happens every 2nd time I turn on my Macbook Pro. This forces me to hold down the power button to restart my Macbook Pro. Does anyone else experience this, and is there a fix? Thx.
    since upgrading to OS lion, my mac book pro (2010 August) keeps freezing (non responsive, requires restart) when i turn on my mac and the system is trying to open apple mail. while apple mail is attempting to collect new mail, the macbook pro freezes. this happens every 2nd time i try to start up my computer. this only started happening after i upgraded to OS lion. please let me know what I need to do to fix this. being forced to restart every 2nd time i turn on my macbook pro has been very frustrating. not sure if apple mail is also the cause of my macbook pro for being very slow during start-up (on the occasion the computer doesn't freeze).

    I am having similar 'freezing' problems with many programs (Mail, Safari, iTunes, etc.). I have done a clean install of Lion instead of an upgrade when it came out. Perhaps something went wrong with my install? I'm thinking about wiping and reinstalling.

  • Does anyone else get a Netfix window popping up unexpectedly? I have an iMac with OSX 10.6.8 and Safari browser version 5.1.10.

    Does anyone else get a Netfix window popping up unexpectedly? I have an iMac with OSX 10.6.8 and Safari browser version 5.1.10. It only happens when I go to a specific local news site, and it is only a Netflix window that opens up. I do have a Netflix account.

    Do you have Block Popup Windows checked in Safari/Preferences/Security?
    What web site?

  • Does anyone else have this video problem?!?!?

    So, This is ATV #2. The first one got sent back because during play, after 30 mins, TV would go black. ATV light would still be on, but no audio, video......Also when in standby, no audio/video would work when We brought it out of standby.
    ATV #2 didn't have any problems...... Till now. Now it plays, but like the last one, when in standby, doesn't want to come out....No audio/video..... At first thinking it was the ATV, but could it be the tv?
    I have a 46" Sony Bravia...Everything else works fine on the TV. Does anyone else have this problem of it not waking up from standby????
    It's driving me crazy!!! Any help or advice will be much appreciated!!!!!!

    Next time it happens switch to a different input on the TV, then switch back and see if you have video, or turn the TV off and then turn it back on again. It's possible it could be the TV, for example, if it ignores the input after a certain period of inactivity and fails to detect when the ATV comes out of standby. It could be an HDMI issue between the ATV and your TV. A number of people have experienced HDMI anomalies with specific make and model TVs.

Maybe you are looking for

  • Duplex Printing in Crystal Reports

    Post Author: Razzle00 CA Forum: General Where can I get some information or sample code on how to duplex print with crystal reports?  Thanks, Razzle

  • CLEAN_REQREQ_UP not running online

    Hi experts Why the report CLEAN_REQREQ_UP nopt can be executed online only in background? Thanks Nilson

  • How reman backup the blocks being written from memory to disk

    Hi All, I am thinking about one case when backuping the datafiles with RMAN. That is the rman is about to backup block A when this block is being written by DBWR from memory to disk. Let's assume the writing is just partially done. What will RMAN do

  • I wish to download Acrobat 10

    I wish to download Acrobat 10 on a new laptop that does not have a DVD drive.  I purchased it in 2011 but cannot find a record in my order history.  I do have the serial number and the email to me confirming purchase. Where do I go to download the pr

  • TENGO UN PROBLEMA CON ITUNES

    tengo un imac y cuando enchufo mi iphone solo me deja meter musica no aplicaciones ya q tengo otro itunes en pc y hay me deja las app querria unificarlo en el imac