Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Assertion failed: extended_text-14.0.1/lib/src/extended/text_overflow_mixin.dart:988:45 start <= end is not true #167

Open
arualana opened this issue Aug 15, 2024 · 1 comment

Comments

@arualana
Copy link

arualana commented Aug 15, 2024

Version

14

Platforms

Web

Device Model

HP Laptop

flutter info

[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Android Studio (version 2023.2)
    X Unable to determine bundled Java version.
[√] Android Studio (version 2024.1)
[√] IntelliJ IDEA Ultimate Edition (version 2022.2)
[√] Connected device (3 available)
[√] Network resources

How to reproduce?

Using extended_text library version ^14.0.1

final displayText =
myString.replaceAll(RegExp(r'^https?://'), '');
return ExtendedText(
displayText,
maxLines: 1,
overflowWidget: TextOverflowWidget(
position: TextOverflowPosition.start,
child: Text(
"...",
style: tableCellStyle,
),
),
style: tableCellStyle,
);

Logs

Assertion failed: file:///C:/[redacted]/AppData/Local/Pub/Cache/hosted/pub.dev/extended_text-14.0.1/lib/src/extended/text_overflow_mixin.dart:988:45
start <= end
is not true


The relevant error-causing widget was: 
  ExtendedText ExtendedText:file:///C:/[REDACTED]/lib/views/[REDACTED]/view_widget.dart:170:26
When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 296:3     throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3      assertFailed
packages/extended_text/src/extended/text_overflow_mixin.dart 988:57             new
packages/extended_text/src/extended/text_overflow_mixin.dart 998:50             copyWith
packages/extended_text/src/extended/text_overflow_mixin.dart 273:37             [_findNoOverflow]
packages/extended_text/src/extended/text_overflow_mixin.dart 158:45             layoutOverflow
packages/extended_text/src/extended/rendering/paragraph.dart 156:5              performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/widgets/overlay.dart 2380:11                               performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 1009:71                                [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 234:5                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 291:7                             performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 451:7                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 234:5                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 291:7                             performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/table.dart 1165:20                               performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/custom_paint.dart 569:11                         performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/proxy_box.dart 1448:11                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 985:73                                 [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/widgets/single_child_scroll_view.dart 483:7                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/custom_paint.dart 569:11                         performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/stack.dart 595:43                                [_computeSize]
packages/flutter/src/rendering/stack.dart 622:12                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 291:7                             performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 985:73                                 [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/widgets/layout_builder.dart 371:7                          performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 985:73                                 [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 234:5                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/proxy_box.dart 1448:11                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 291:7                             performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 985:73                                 [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 234:5                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/widgets/single_child_scroll_view.dart 483:7                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/custom_paint.dart 569:11                         performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/stack.dart 595:43                                [_computeSize]
packages/flutter/src/rendering/stack.dart 622:12                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/shifted_box.dart 234:5                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 291:7                             performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/stack.dart 595:43                                [_computeSize]
packages/flutter/src/rendering/stack.dart 622:12                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/custom_layout.dart 173:10                        layoutChild
packages/flutter/src/material/scaffold.dart 1092:7                              performLayout
packages/flutter/src/rendering/custom_layout.dart 237:7                         [_callPerformLayout]
packages/flutter/src/rendering/custom_layout.dart 404:5                         performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/proxy_box.dart 111:21                            <fn>
packages/flutter/src/rendering/proxy_box.dart 1448:11                           performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 1009:71                                [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2608:7                               layout
packages/flutter/src/rendering/layout_helper.dart 61:10                         layoutChild
packages/flutter/src/rendering/flex.dart 1009:71                                [_computeSizes]
packages/flutter/src/rendering/flex.dart 1051:32                                performLayout
packages/flutter/src/rendering/object.dart 2446:7                               [_layoutWithoutResize]
packages/flutter/src/rendering/object.dart 1052:17                              flushLayout
packages/flutter/src/rendering/object.dart 1065:14                              flushLayout
packages/flutter/src/rendering/binding.dart 602:5                               drawFrame
packages/flutter/src/widgets/binding.dart 1164:13                               drawFrame
packages/flutter/src/rendering/binding.dart 468:5                               [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1397:7                              [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1318:9                              handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1176:5                              [_handleDrawFrame]
dart-sdk/lib/async/zone.dart 1399:13                                            _rootRun
dart-sdk/lib/async/zone.dart 1301:19                                            run
dart-sdk/lib/async/zone.dart 1209:7                                             runGuarded
lib/_engine/engine/platform_dispatcher.dart 1410:9                              invoke
lib/_engine/engine/platform_dispatcher.dart 310:5                               invokeOnDrawFrame
lib/_engine/engine/initialization.dart 187:36                                   <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart 188:27  _callDartFunctionFast1
The following RenderObject was being processed when the exception was fired: ExtendedRenderParagraph#472d3 relayoutBoundary=up12
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=298.7, 0.0<=h<=77.0)
...  size: Size(298.7, 18.0)
...  textAlign: start
...  textDirection: ltr
...  softWrap: wrapping at box width
...  overflow: clip
...  locale: en_US
...  maxLines: 1
  text: TextSpan
    debugLabel: (((englishLike bodyMedium 2014).merge((blackRedmond bodyMedium).apply)).copyWith).merge(unknown)
    inherit: false
    color: Color(0xff020303)
    family: Nunito
    size: 16.0
    weight: 700
    baseline: alphabetic
    height: 1.1x
    decoration: TextDecoration.none
    "localhost:3000/test.html"
RenderObject: ExtendedRenderParagraph#472d3 relayoutBoundary=up12
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=298.7, 0.0<=h<=77.0)
  size: Size(298.7, 18.0)
  textAlign: start
  textDirection: ltr
  softWrap: wrapping at box width
  overflow: clip
  locale: en_US
  maxLines: 1
  text: TextSpan
    debugLabel: (((englishLike bodyMedium 2014).merge((blackRedmond bodyMedium).apply)).copyWith).merge(unknown)
    inherit: false
    color: Color(0xff020303)
    family: Nunito
    size: 16.0
    weight: 700
    baseline: alphabetic
    height: 1.1x
    decoration: TextDecoration.none
    "localhost:3000/test.html"
====================================================================================================

Example code (optional)

No response

Contact

No response

@zmtzawqlp
Copy link
Member

please provide a runnable simple demo to reproduce this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants