7

In Android 11 SDK 30 at the start of every activity I get a stack trace as follows:

2020-12-30 10:08:00.175 1417-1436/? D/EventSequenceValidator: IntentStarted during UNKNOWN. Intent { cmp=com.lampreynetworks.ahd.health.at.home/.DebugLogActivity }
java.lang.Throwable: EventSequenceValidator#getStackTrace
    at com.google.android.startop.iorap.EventSequenceValidator.logWarningWithStackTrace(EventSequenceValidator.java:260)
    at com.google.android.startop.iorap.EventSequenceValidator.onIntentStarted(EventSequenceValidator.java:106)
    at com.android.server.wm.LaunchObserverRegistryImpl.handleOnIntentStarted(LaunchObserverRegistryImpl.java:139)
    at com.android.server.wm.LaunchObserverRegistryImpl.lambda$veRn_GhgLZLlOHOJ0ZYT6KcfYqo(Unknown Source:0)
    at com.android.server.wm.-$$Lambda$LaunchObserverRegistryImpl$veRn_GhgLZLlOHOJ0ZYT6KcfYqo.accept(Unknown Source:10)
    at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:292)
    at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
    at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.os.HandlerThread.run(HandlerThread.java:67)
    at com.android.server.ServiceThread.run(ServiceThread.java:44)

The activities all work and if I didn't look at Logcat I would never have known. However, I do not understand it and it must be sign of some issue that will come back (eventually) to bite me. Anyone understand this behavior and know how to fix it?

I have had this code over many versions from way back at 4.0.3 and have never seen this until now. Note this happens on EVERY activity.

Brian Reinhold
  • 2,313
  • 3
  • 27
  • 46
  • Well, this is a DEBUG level log, so it may just be for informational purposes. – David Wasser Dec 30 '20 at 21:58
  • @DavidWasser you might very well be right, but in the absence of that knowledge I am concerned I am doing something wrong. Experience tells me when I see unexpected exceptions and stack traces the problem is usually me! – Brian Reinhold Dec 31 '20 at 22:15
  • @BrianReinhold Have you found any solution? – Nik Jun 23 '21 at 11:34
  • @DavidWasser I have not. Well, I reverted back to the previous version of Android Studio and am ignoring updates. I have submitted an issue to Google. So far all is quiet. – Brian Reinhold Jun 24 '21 at 12:10

2 Answers2

1

I found the same suspicious log EventSequenceValidator: IntentStarted during UNKNOWN from logcat, haven't found a solution yet, but found a reference here, FYI EventSequenceValidator.java.

If any bad transition happened, the state becomse UNKNOWN. The UNKNOWN state could be accumulated, because during the UNKNOWN state more IntentStarted may be triggered. To recover from UNKNOWN to INIT, all the accumualted IntentStarted should termniate.

MadHatter
  • 301
  • 3
  • 12
  • I still am getting the error even though there have been several AS updates. I have come to the point of ignoring it. One of these days I will try and see how a bad transition could happen. At the start its only one! – Brian Reinhold Sep 07 '21 at 13:21
  • Doesn't seem to happen in Android 12 ... – Brian Reinhold Jan 11 '22 at 22:21
  • I did not come across this issue recently. From the reference, even if there is a "KNOWN" state, if there is no new intent during that period, the "EventSequenceValidator: IntentStarted during UNKNOWN" log will not be printed. – MadHatter Jan 12 '22 at 06:14
0

Google is reporting they will not fix the issue and will remove the code throwing this exception.

See google bug report

Chef Pharaoh
  • 2,387
  • 3
  • 27
  • 38