Skip to content

_CastError: Null check operator used on a null value after resuming an app from the background #100777

@koral--

Description

@koral--

Steps to Reproduce

This is an automated anonymous crash report.
According to breadcrumbs, it happened a dozen seconds after resuming an app from the background.
1 second before the exception there are 2 entries like that (sentry breadcrumbs):
Another exception was thrown: Instance of 'DiagnosticsProperty<void>'

Expected results:
No exception is thrown.

Actual results:

_CastError: Null check operator used on a null value
  File "framework.dart", line 3087, in Element.widget
  File "framework.dart", line 4929, in ProxyElement.widget
  File "framework.dart", line 5036, in InheritedElement.widget
  File "inherited_notifier.dart", line 99, in _InheritedNotifierElement.widget
  File "framework.dart", line 4014, in Element.dependOnInheritedElement
  File "framework.dart", line 4886, in StatefulElement.dependOnInheritedElement
  File "framework.dart", line 4022, in Element.dependOnInheritedWidgetOfExactType
  File "focus_scope.dart", line 391, in Focus.maybeOf
  File "focus_manager.dart", line 214, in FocusAttachment.reparent
  File "focus_scope.dart", line 550, in _FocusState.deactivate
  File "framework.dart", line 4811, in StatefulElement.deactivate
  File "framework.dart", line 1901, in _InactiveElements._deactivateRecursively
  File "framework.dart", line 4642, in ComponentElement.visitChildren
  File "framework.dart", line 1903, in _InactiveElements._deactivateRecursively
  File "framework.dart", line 4642, in ComponentElement.visitChildren
  File "framework.dart", line 1903, in _InactiveElements._deactivateRecursively
  File "framework.dart", line 4642, in ComponentElement.visitChildren
  File "framework.dart", line 1903, in _InactiveElements._deactivateRecursively
  File "framework.dart", line 1915, in _InactiveElements.add
  File "framework.dart", line 3667, in Element.deactivateChild
  File "framework.dart", line 3378, in Element.updateChild
  File "framework.dart", line 4613, in ComponentElement.performRebuild
  File "framework.dart", line 4763, in StatefulElement.performRebuild
  File "framework.dart", line 4311, in Element.rebuild
  File "framework.dart", line 2578, in BuildOwner.buildScope
  File "binding.dart", line 882, in WidgetsBinding.drawFrame
  File "binding.dart", line 363, in RendererBinding._handlePersistentFrameCallback
  File "binding.dart", line 1145, in SchedulerBinding._invokeFrameCallback
  File "binding.dart", line 1082, in SchedulerBinding.handleDrawFrame
  File "binding.dart", line 996, in SchedulerBinding._handleDrawFrame
  File "zone.dart", line 1428, in _rootRun
  File "zone.dart", line 1328, in _CustomZone.run
  File "zone.dart", line 1236, in _CustomZone.runGuarded
  File "hooks.dart", line 150, in _invoke
  File "platform_dispatcher.dart", line 270, in PlatformDispatcher._drawFrame
  File "hooks.dart", line 114, in _drawFrame
Code sample No app code is involved. Check `Element` in this repo.
Logs

N/A

No issues found!

App was built on CI, some time ago, so I could not execute shell commands. However, here is the relevant part of the log which is available:

Flutter 2.8.1 • channel unknown • unknown source
Framework • revision 77d935af4d (3 months ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

Device: Huawei VOG-L29
Android 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: null-safetySupport for Dart's null safety featurea: productionIssues experienced in live production appsc: crashStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.needs repro infoAutomated crash report whose cause isn't yet knownr: duplicateIssue is closed as a duplicate of an existing issueteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions