Repository navigation
_CastError in SemanticsOwner.performAction #100358
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
This is an automated anonymous crash report.
According to breadcrumbs, it happened right after navigating to a page.
Expected results:
No exception is thrown.
Actual results:
_CastError: Null check operator used on a null value
File "semantics.dart", line 3092, in SemanticsOwner.performAction
File "binding.dart", line 347, in RendererBinding._handleSemanticsAction
File "hooks.dart", line 210, in _invoke3.<fn>
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 209, in _invoke3
File "platform_dispatcher.dart", line 919, in PlatformDispatcher._dispatchSemanticsAction
File "hooks.dart", line 98, in _dispatchSemanticsAction
Code sample
No app code is involved. Check `SemanticsOwner` 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
It looks like there is an issue with code here: https://github.com/flutter/flutter/blob/flutter-2.8-candidate.20/packages/flutter/lib/src/semantics/semantics.dart#L3092
if (action == SemanticsAction.showOnScreen && _nodes[id]!._showOnScreen != null)
_nodes[id]!._showOnScreen!();
}
_nodes[id] turned out to be bull, the same code is still there on master, only line numbers are slightly changed.
The trivial fix is to add a nullcheck for _nodes[id]. However, there might be a deeper error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Activity
darshankawar commentedon Mar 18, 2022
The implementation seems to be same on latest master:
flutter/packages/flutter/lib/src/semantics/semantics.dart
Line 3083 in de4eb16
Keeping it open and labeling for further investigation from the team.
/cc @chunhtai
chunhtai commentedon Mar 18, 2022
Do you know the OS of the device when the crashes happened?
koral-- commentedon Mar 18, 2022
iPad Air (4th generation)
Model:J307AP
iOS 15.3.1
goderbauer commentedon Feb 27, 2023
Also observed at b/270962612. cc @apwilson
goderbauer commentedon Feb 27, 2023
Pretty sure it should be
I'll send a PR.
github-actions commentedon Mar 14, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.