[Nexus 5 General] 616Nickel:
All right. I believe I've identified the triggering app on my phone: Transparent Clock & Weather

This was the app I removed from the homescreen and froze via TiBkp. Result: Between about 14:00 yesterday and 07:00 this morning (~17 hrs), no SIM errors.

I thawed the app at about 06:15, no errors. Reapplied the homescreen widget at about 07:00, turned on wakelock so I could keep an eye on things, and the error popped up at 07:12. See the attached 2014-03-09-07-13-58.txt logcat.

I'm not familiar with Android/Linux operations, so please forgive me if I butcher the following. This is what seems to happen:

This is the first indication that anything's up:

03-09 07:12:43.343 E/LocSvc_eng(781): W/AgpsReleasedState: unrecognized event 3

All at once, there's a cascade of messages suggesting the radio has been turned off (it hasn't):

03-09 07:12:43.793 D/MobileDataStateTracker(781): fota: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=fota

03-09 07:12:43.793 D/MobileDataStateTracker(781): fota: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.803 D/MobileDataStateTracker(781): dun: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=dun

03-09 07:12:43.803 D/MobileDataStateTracker(781): dun: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.813 D/MobileDataStateTracker(781): ia: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=ia

03-09 07:12:43.823 D/MobileDataStateTracker(781): ia: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.823 D/MobileDataStateTracker(781): supl: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=supl

03-09 07:12:43.823 D/MobileDataStateTracker(781): supl: Received state=DISCONNECTED, old=DISCONNECTED, reason=dataDisabled

03-09 07:12:43.823 D/MobileDataStateTracker(781): hipri: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=hipri

03-09 07:12:43.833 D/MobileDataStateTracker(781): hipri: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.843 D/MobileDataStateTracker(781): ims: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=ims

03-09 07:12:43.843 D/MobileDataStateTracker(781): ims: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.853 D/MobileDataStateTracker(781): default: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=default

03-09 07:12:43.853 D/MobileDataStateTracker(781): default: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.863 D/MobileDataStateTracker(781): mms: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=mms

03-09 07:12:43.863 D/MobileDataStateTracker(781): mms: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

03-09 07:12:43.863 D/MobileDataStateTracker(781): cbs: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=cbs

03-09 07:12:43.873 D/MobileDataStateTracker(781): cbs: Received state=DISCONNECTED, old=DISCONNECTED, reason=radioTurnedOff

About 0.8s later, the phone seems to think a new SIM has been loaded:

03-09 07:12:45.623 D/MobileDataStateTracker(781): fota: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=fota

03-09 07:12:45.623 D/MobileDataStateTracker(781): fota: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.643 D/MobileDataStateTracker(781): dun: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=dun

03-09 07:12:45.643 D/MobileDataStateTracker(781): dun: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.643 D/MobileDataStateTracker(781): ia: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=ia

03-09 07:12:45.643 D/MobileDataStateTracker(781): ia: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.653 D/MobileDataStateTracker(781): supl: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=supl

03-09 07:12:45.653 D/MobileDataStateTracker(781): supl: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.663 D/MobileDataStateTracker(781): hipri: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=hipri

03-09 07:12:45.663 D/MobileDataStateTracker(781): hipri: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.673 D/MobileDataStateTracker(781): ims: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=ims

03-09 07:12:45.673 D/MobileDataStateTracker(781): ims: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.673 D/MobileDataStateTracker(781): default: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=default

03-09 07:12:45.673 D/MobileDataStateTracker(781): default: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.683 D/MobileDataStateTracker(781): mms: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=mms

03-09 07:12:45.693 D/MobileDataStateTracker(781): mms: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

03-09 07:12:45.693 D/MobileDataStateTracker(781): cbs: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=cbs

03-09 07:12:45.703 D/MobileDataStateTracker(781): cbs: Received state=DISCONNECTED, old=DISCONNECTED, reason=simLoaded

I'm sure there's plenty of other smoking guns in the file, but I'm not qualified to say.

Sometimes the error kills the cell signal, most times not. This time, I dismissed the message and the phone continued without error for about an hour.

Then I got impatient and decided to try to trigger the error by messing with the advanced location settings on the Transparent Clock & Weather app (see screenshots):

Changed Location Refresh Time from 30 (or 60) min to 1 min.

Changed Location Refresh Distance from 5 km to 0 km.

BOOM. Almost instantaneous SIM errors, so fast in sequence that my CatLog buffer only captured the last two. My logcat file is too big to upload (1.1 MB), but it's filled with repeated iterations of the same error sequence. I can provide it on request.

So. This is encouraging. What can we conclude?

On my phone at least, the error is triggered by this app using the GPS to determine location for weather updates.

For some reason, this app's GPS requests distress the Nexus 5, and cause it to think the SIM has been replaced.

The error can be triggered by increasing the frequency with which the app acquires location information.

The solution seems to be pretty simple: tell the app not to use GPS for weather location. No great loss, Wifi or mobile networks should give the app enough location information for weather purposes.

The question now: Is it only this app? Do other homescreen weather widgets (Beautiful Widgets, HD Widgets, DashClock, etc.) cause the same error? Do third-party GPS apps cause it? What about Yelp, Facebook, and other apps that transmit user location?

In other words, is this a discrete error from this particular developer, or does Kit Kat have an inherent vulnerability to third-party GPS requests?