[HTC Sensation] Yankovic:
For a long time I had the stock ROM running on my HTC Sensation. But last week I've been wondering how nice the world would look like with an unlocked and rooted phone. After reading some guides I've succeeded and now have an unlocked HTC sensation with S-off and root. Then I flashed Cyanogenmod 10.1 from this thread: http://xdaforums.com/showthread.php?t=1930403.

On the first look my phone is running fine and I have no issues with it, everything works as expected.

However, the phone seems to be rebooting after a while. This can happen at any moment (in use, or just idle) mostly after a couple of hours. Sometimes it reboots pretty quickly after the previous reboot.. It wasn't telling me what was happening or that something went wrong..

So I've started a logcat with adb to see what was happening at the time of the crash and then saw the following stacktrace:

W/dalvikvm(22628): threadid=36: thread exiting with uncaught exception (group=0x40b16930)

E/AndroidRuntime(22628): *** FATAL EXCEPTION IN SYSTEM PROCESS: NetworkStats

E/AndroidRuntime(22628): java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.server.action.NETWORK_STATS_POLL flg=0x14 (has extras) } in com.android.server.net.NetworkStatsService$4@410d4d18

E/AndroidRuntime(22628):	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:768)

E/AndroidRuntime(22628):	at android.os.Handler.handleCallback(Handler.java:725)

E/AndroidRuntime(22628):	at android.os.Handler.dispatchMessage(Handler.java:92)

E/AndroidRuntime(22628):	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime(22628):	at android.os.HandlerThread.run(HandlerThread.java:60)

E/AndroidRuntime(22628): Caused by: java.lang.IllegalArgumentException: tried recording negative data

E/AndroidRuntime(22628):	at android.net.NetworkStatsHistory.recordData(NetworkStatsHistory.java:302)

E/AndroidRuntime(22628):	at android.net.NetworkStatsHistory.recordHistory(NetworkStatsHistory.java:375)

E/AndroidRuntime(22628):	at android.net.NetworkStatsHistory.recordEntireHistory(NetworkStatsHistory.java:351)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsCollection.recordHistory(NetworkStatsCollection.java:220)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsCollection.read(NetworkStatsCollection.java:282)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsCollection.read(NetworkStatsCollection.java:256)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsRecorder$CombiningRewriter.read(NetworkStatsRecorder.java:280)

E/AndroidRuntime(22628):	at com.android.internal.util.FileRotator.readFile(FileRotator.java:367)

E/AndroidRuntime(22628):	at com.android.internal.util.FileRotator.rewriteSingle(FileRotator.java:242)

E/AndroidRuntime(22628):	at com.android.internal.util.FileRotator.rewriteActive(FileRotator.java:184)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsRecorder.forcePersistLocked(NetworkStatsRecorder.java:223)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsRecorder.maybePersistLocked(NetworkStatsRecorder.java:210)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:1009)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:952)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsService.access$700(NetworkStatsService.java:139)

E/AndroidRuntime(22628):	at com.android.server.net.NetworkStatsService$4.onReceive(NetworkStatsService.java:741)

E/AndroidRuntime(22628):	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:758)

E/AndroidRuntime(22628):	... 4 more

On google I could not find any crash related to NetworkStats or any similar problems. So I was wondering if you guys would know what is going wrong here and what the solution is to this issue.