Repository: flutter
Issue: Path Metrics error with HTML renderer Flutter web
Labels: platform-web,e: web_html,has reproducible steps,P2,found in release: 3.10,team-web,triaged-web,found in release: 3.13

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

Path animation in flutter web shows error when using with html renderer but works fine. When using with canvaskit renderer, no errors show. 

Command to produce error: 
flutter run -d chrome --web-render html

### Expected results

Create animated path without showing any error in HTML renderer flutter web

### Actual results

Flutter shows error but animated path works properly. When using canvaskit renderer, no error shows and works properly.

Error output: 

```dart

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during paint():
Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
startT != 0 || stopT != 0
is not true

The relevant error-causing widget was:
  CustomPaint
  CustomPaint:file:///A:/Playground%20Projects/portfolio/yelwinoo/lib/presentation/views/home/widgets/footer_path.dart:14:12

When the exception was thrown, this was the stack:
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3        assertFailed
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/html/path/path_metrics.dart 717:34                             _chopQuadBetweenT
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/html/path/path_metrics.dart 260:9                              [_outputSegmentTo]
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/html/path/path_metrics.dart 228:7                              extractPath
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/html/path/path_metrics.dart 117:34                             extractPath
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/html/path/path_metrics.dart 592:21                             extractPath
packages/yelwinoo/presentation/utils/extensions/path_ex.dart 36:35                                                             PathEx._extractPathUntilLength
packages/yelwinoo/presentation/utils/extensions/path_ex.dart 17:12                                                             PathEx.createAnimatedPath
packages/yelwinoo/presentation/views/home/widgets/footer_path.dart 45:39                                                       paint
packages/flutter/src/rendering/custom_paint.dart 571:12                                                                        [_paintWithPainter]
packages/flutter/src/rendering/custom_paint.dart 613:7                                                                         paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14                                                                          paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/box.dart 2924:14                                                                                defaultPaint
packages/flutter/src/rendering/flex.dart 1089:7                                                                                paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/box.dart 2924:14                                                                                defaultPaint
packages/flutter/src/rendering/flex.dart 1089:7                                                                                paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14                                                                          paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/box.dart 2924:14                                                                                defaultPaint
packages/flutter/src/rendering/flex.dart 1089:7                                                                                paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/box.dart 2924:14                                                                                defaultPaint
packages/flutter/src/rendering/stack.dart 654:5                                                                                paintStack
packages/flutter/src/rendering/stack.dart 670:7                                                                                paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/visibility_detector/src/render_visibility_detector.dart 262:11                                                        paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 169:10                                                                              _repaintCompositedChild
packages/flutter/src/rendering/object.dart 112:5                                                                               repaintCompositedChild
packages/flutter/src/rendering/object.dart 264:7                                                                               [_compositeChild]
packages/flutter/src/rendering/object.dart 245:7                                                                               paintChild
packages/flutter/src/rendering/proxy_box.dart 144:14                                                                           paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/sliver_multi_box_adaptor.dart 660:16                                                            paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/sliver_padding.dart 286:14                                                                      paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 253:12                                                                              paintChild
packages/flutter/src/rendering/viewport.dart 711:16                                                                            [_paintContents]
packages/flutter/src/rendering/object.dart 474:12                                                                              pushLayer
packages/flutter/src/rendering/object.dart 534:7                                                                               pushClipRect
packages/flutter/src/rendering/viewport.dart 686:37                                                                            paint
packages/flutter/src/rendering/object.dart 2853:7                                                                              [_paintWithContext]
packages/flutter/src/rendering/object.dart 169:10                                                                              _repaintCompositedChild
packages/flutter/src/rendering/object.dart 112:5                                                                               repaintCompositedChild
packages/flutter/src/rendering/object.dart 1137:31                                                                             flushPaint
packages/flutter/src/rendering/binding.dart 518:19                                                                             drawFrame
packages/flutter/src/widgets/binding.dart 865:13                                                                               drawFrame
packages/flutter/src/rendering/binding.dart 381:5                                                                              [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1289:15                                                                            [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1218:9                                                                             handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1076:5                                                                             [_handleDrawFrame]
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/platform_dispatcher.dart 1168:13                               invoke
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/platform_dispatcher.dart 218:5                                 invokeOnDrawFrame
C:/b/s/w/ir/cache/builder/src/out/host_debug/lib/_engine/engine/initialization.dart 190:45                                     <fn>
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 367:37  _checkAndCall
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 372:39  dcall

The following RenderObject was being processed when the exception was fired: RenderCustomPaint#899f0:
  creator: CustomPaint ← FooterPath ← SizedBox ← Padding ← Expanded ← Visibility ← Row ← Expanded ←
    Column ← Padding ← ConstrainedBox ← Container ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=1010.0, h=305.4)
  size: Size(1010.0, 305.4)
  painter: AnimatedPathPainter#b2d16(AnimationController#3c67f(⏮ 0.000; paused)➩Cubic(0.18, 1.00,
    0.04, 1.00))
This RenderObject has no descendants.
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: AnimationController.dispose() called more than once.
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10
Another exception was thrown: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/html/path/path_metrics.dart:717:10


```

### Code sample

<details><summary>Code sample</summary>

I created sample gist to produce that error. Just click the following link.


[Animated Path Error Code Github Gist](https://gist.github.com/YeLwinOo-Steve/ece390d4c92277c11fef5e95cac6cceb)

### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.22621.1992], locale en-US)
    • Flutter version 3.7.0 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b06b8b2710 (6 months ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1

[✓] Windows Version (Installed version of Windows is version 10 or higher)

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Asus\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 34.0.0
    • ANDROID_HOME = C:\Users\Asus\AppData\Local\Android\Sdk
    • ANDROID_SDK_ROOT = C:\Users\Asus\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Java\jdk-14.0.2\bin\java
    • Java version Java(TM) SE Runtime Environment (build 14.0.2+12-46)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.22000.0

[!] Android Studio (version 2023.1)
    • Android Studio at C:\Users\Asus\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\231.9161.38.2311.10491752
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.80.1)
    • VS Code at C:\Users\Asus\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.68.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.1992]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 114.0.5735.248
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 114.0.1823.43

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</details>