actually its really simple to solve this problem...
1 - download and install the samsung drivers from here (
http://get.maclaw.pl/?id=61)
2 - download odin
here and install it.
3 - reboot your pc (this is the easy way to kill all kies processes and unwanted things) and make shure that kies dont start with windows.(if you have it installed)
4 - download this
http://get.maclaw.pl/?id=301 (its the maclaw cm 4.4.2 for odin with the recovery twrp)
5 - flash the phone with odin(FOR THIS YOU NEED TO BOOT THE PHONE IN DOWNLOAD MODE, just boot the phone pressing POWER+VOLUME DOWN AND THE HOME BUTTON until a triangle and a warning appears follow maclaws guide ->
http://maclaw.pl/installation-guide-golden/)... as soon as the flash finishes you'll be trapped in a boot loop (missing GAPPS)
just try to boot it the system should crash dont worry you're on the good way.
5.2 - remove the battery and put it back in (now you phone should be off)
6 - reboot on the new recovery that comes with the maclaw Rom you've just flashed for that you need to press POWER + VOLUME UP AND HOME BUTTON and mount you SD CARD.(you phone sould appear on you pc as a storage device or something like that)
7 - download this GAPPS here(
http://get.maclaw.pl/?id=164)
8 - copy the downloaded GAPPS to you phone.
9 - go back to the 1st menu of the TWRP (a.k.a recovery) and you should see a thing saying install zip or flash zip (something like that)
9.2 - select the Gapps you've downloaded and flash it.
9.3 - after the flash finish select reboot system
9.4 - phone should start installing updates after the reboot
10 - wait until it finishes and the problem should be solved. now you can go back to the stock rom or stay with this rom.
the problem here is there's an app causing that problem. i had the same problem a few months ago.
the phone whould just crash or not function at all, rebooting all the time or from time to time...(it was one of the games i've installed from market)
after the phone is working dont install apps from unknow developers. even if it is from the market (believe wen i say you can get apps from the market that makes you're phone to malfunction).