MarcelGarus / MarcelGarus/marquee

null reference error when widget height is unconstrained

Open
#70 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
363
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Hey. I have no idea why is this happening, but when I put Marquee directly in my widget tree instead of `Text` widget it gives a null reference with a long call stack:
```
═════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was
CustomScrollView
lib\pages\subtitle_details.dart:182
════════════════════════════════════════════════════════════════════════════════
E/flutter (31099): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter (31099): #0 ScrollPosition.minScrollExtent
package:flutter/…/widgets/scroll_position.dart:136
E/flutter (31099): #1 ScrollPosition._updateSemanticActions
package:flutter/…/widgets/scroll_position.dart:634
E/flutter (31099): #2 ScrollPosition.notifyListeners
package:flutter/…/widgets/scroll_position.dart:929
E/flutter (31099): #3 ScrollPosition.forcePixels
package:flutter/…/widgets/scroll_position.dart:377
E/flutter (31099): #4 ScrollPositionWithSingleContext.jumpTo
package:flutter/…/widgets/scroll_position_with_single_context.dart:198
E/flutter (31099): #5 ScrollController.jumpTo
package:flutter/…/widgets/scroll_controller.dart:173
...
E/flutter (31099): #8 SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1144
E/flutter (31099): #9 SchedulerBinding.handleDrawFrame
package:flutter/…/scheduler/binding.dart:1090
E/flutter (31099): #10 SchedulerBinding._handleDrawFrame
package:flutter/…/scheduler/binding.dart:998
E/flutter (31099): #11 _rootRun (dart:async/zone.dart:1354:13)
E/flutter (31099): #12 _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (31099): #13 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)

═════ Exception caught by scheduler library ═════════════════════════════════
Null check operator used on a null value
════════════════════════════════════════════════════════════════════════════════
E/flutter (31099): #14 _invoke (dart:ui/hooks.dart:163:10)
E/flutter (31099): #15 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
E/flutter (31099): #16 _drawFrame (dart:ui/hooks.dart:126:31)
E/flutter (31099):
E/flutter (31099): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter (31099): #0 RenderViewportBase.hitTestChildren
package:flutter/…/rendering/viewport.dart:703
E/flutter (31099): #1 RenderBox.hitTest
package:flutter/…/rendering/box.dart:2414
E/flutter (31099): #2 RenderProxyBoxMixin.hitTestChildren
package:flutter/…/rendering/proxy_box.dart:131
....
E/flutter (31099): #84 GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:279
E/flutter (31099): #85 _rootRunUnary (dart:async/zone.dart:1370:13)
E/flutter (31099): #86 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (31099): #87 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (31099): #88 _invoke1 (dart:ui/hooks.dart:182:10)
E/flutter (31099): #89 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
E/flutter (31099): #90 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
```
But when I put my widget in a SizedBox with a fixed height, it works, but I need to know exact height of font to make it work in this way. scrolling axis is horizontal so it should not care about vertical bounds, so I guess it's a bug in marquee.

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the failure by placing Marquee directly in an unconstrained widget tree, using the fixed-height SizedBox comparison and the setup at lib/pages/subtitle_details.dart:182 as reference. Inspect the reported CustomScrollView and ScrollPosition stack; done means horizontal scrolling works without a null-reference exception when no fixed height is supplied.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.