[Samsung Galaxy Mega] DeeJayhX:
Phone: Samsung Galaxy Mega 5.8 (i9152 aka crater)

Current ROM: 12.1-20150614-UNOFFICIAL-i9152 (from link below, I've tried every version prior to it)

Link to ROM: [ROM] [5.1.1] [UNOFFICIAL] [GT-I9152] [DUALSIM] CyanogenMod 12.1

Recovery: TWRP 2.8.5.0 F2FS (Using vfat) (as requested by OP from link above)

Baseband: I9152XXUAML4

Kernel: 3.0.101+ | kiborg_man@ubuntu #1 | Sun Jun 14 17:41:34 MSK 2015

SELinux status: Enforcing

I've tried doing an advanced wipe with everything but external storage checked, and then fresh installing the ROM using TWRP v2.8.5.0 AFTER verifying the checksum to be true with the author, followed by the appropriate GAPPS, followed by a Factory Reset just to be sure to wipe cache/dalvik/data. I use the vFAT filesystem. I've tried this several times using different builds, all of which only 1 or 2 others have had the same problem with as me. I even tried the CM12/5.0 builds before this came out, same issue.

The Issues:

1) Screen would randomly go black, displaying only the status bar at the top, switching to the GOLauncher seemed to have fixed this as it used to happen all the time and I can't recall it happening recently.

2) Phone will randomly reset, might happen every 2 minutes, might happen every 4 hours, might happen 2 times a day, or not at all for a couple days. Happens regardless of battery levels, full or empty.

I have gone through everything I can think of trying to figure out why the resets keep happening...

The battery is fine, first and foremost, I checked it both physically, and jarring the phone slightly trying to shake it away from the contacts, no power loss.

I've adb logcat 'd it to a file and reviewed several entries before the crash happens, didn't find anything useful, although I guess I should let someone more qualified review that. I've since lost that logcat, but will take another if someone wants it after redacting of any identifying information.

I've also run a stability test (that the instructions say up to 5 hours for some phones to show instability) for 9 nearly 9 hours straight with the CPU overclocked at 1600mhz with no crash, phone is 1400 mhz stock.

I booted into recovery, umount /system, umount /data, umount /cache, umount /efs.

Then used e2fsck to check MMC (/dev/block/mmcblk*) and there are 0 bad blocks on all checks.

~ # for file in /dev/block/mmc*; do e2fsck -cfv "$file"; done

/dev/block/mmcblk0p17: ***** FILE SYSTEM WAS MODIFIED *****

37 inodes used (2.89%, out of 1280)
0 non-contiguous files (0.0%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 29
1144 blocks used (22.34%, out of 5120)
0 bad blocks
0 large files

17 regular files
11 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
------------
28 files

e2fsck 1.42.9 (28-Dec-2013)
sh: badblocks: not found
/dev/block/mmcblk0p18: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p18: ***** FILE SYSTEM WAS MODIFIED *****

22 inodes used (0.17%, out of 12800)
1 non-contiguous file (4.5%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 14
1887 blocks used (3.69%, out of 51200)
0 bad blocks
0 large files

5 regular files
8 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
------------
13 files

e2fsck 1.42.9 (28-Dec-2013)
sh: badblocks: not found
/dev/block/mmcblk0p19: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p19: ***** FILE SYSTEM WAS MODIFIED *****

2075 inodes used (2.97%, out of 69840)
14 non-contiguous files (0.7%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 1727
193060 blocks used (69.19%, out of 279040)
0 bad blocks
0 large files

1515 regular files
211 directories
0 character device files
0 block device files
0 fifos
0 links
340 symbolic links (340 fast symbolic links)
0 sockets
------------
2066 files

e2fsck 1.42.9 (28-Dec-2013)
sh: badblocks: not found
/dev/block/mmcblk0p20: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p20: ***** FILE SYSTEM WAS MODIFIED *****

16 inodes used (2.50%, out of 640)
0 non-contiguous files (0.0%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 8
1742 blocks used (68.05%, out of 2560)
0 bad blocks
0 large files

1 regular file
6 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
------------
7 files

e2fsck 1.42.9 (28-Dec-2013)
sh: badblocks: not found
/dev/block/mmcblk0p21: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p21: ***** FILE SYSTEM WAS MODIFIED *****

29349 inodes used (8.17%, out of 359040)
1609 non-contiguous files (5.5%)
26 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 29037/178
945039 blocks used (65.83%, out of 1435644)
0 bad blocks
0 large files

27764 regular files
1450 directories
0 character device files
0 block device files
5 fifos
0 links
114 symbolic links (114 fast symbolic links)
7 sockets
------------
29340 files

The storage is fine and not failing.

I don't know what the problem could be...