imaNNeo / imaNNeo/fl_chart

Null check operator used on a null value

Open
#1,101 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Fundamental Lack of Information Needs Reproducible Code
Dominant language
Dart
Stars
7.6k
Forks
2k
Avg merge
9d 1h
Merged PRs (30d)
2

Description

**Describe the bug**
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Instance of 'ErrorDescription'.
at State.setState(framework.dart:1129)
at _LineChartState._handleBuiltInTouch(line_chart.dart:108)
at RenderBaseChart._notifyTouchEvent(render_base_chart.dart:140)
at RenderBaseChart.initGestureRecognizers.(render_base_chart.dart:76)
at LongPressGestureRecognizer._checkLongPressMoveUpdate.(long_press.dart:756)
at GestureRecognizer.invokeCallback(recognizer.dart:198)
at LongPressGestureRecognizer._checkLongPressMoveUpdate(long_press.dart:756)
at LongPressGestureRecognizer.handlePrimaryPointer(long_press.dart:652)
at PrimaryPointerGestureRecognizer.handleEvent(recognizer.dart:563)
at PointerRouter._dispatch(pointer_router.dart:94)
at PointerRouter._dispatchEventToRoutes.(pointer_router.dart:139)
at _LinkedHashMapMixin.forEach(_LinkedHashMapMixin.java)
at PointerRouter._dispatchEventToRoutes(pointer_router.dart:137)
at PointerRouter.route(pointer_router.dart:123)
at GestureBinding.handleEvent(binding.dart:445)
at GestureBinding.dispatchEvent(binding.dart:425)
at RendererBinding.dispatchEvent(binding.dart:329)
at GestureBinding._handlePointerEventImmediately(binding.dart:380)
at GestureBinding.handlePointerEvent(binding.dart:344)
at GestureBinding._flushPointerEventQueue(binding.dart:302)
at GestureBinding._handlePointerDataPacket(binding.dart:285)

**To Reproduce**
I do not know how to reproduce this issue. It happens in the field in production.

**Versions**
Flutter 3.0.5
fl_chart 0.55.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting _LineChartState._handleBuiltInTouch in line_chart.dart and the touch-event flow through render_base_chart.dart. Trace which value can be null during the production long-press path, then verify the fix against the existing project checks; done means the reported null-check exception no longer occurs during line-chart touch handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.