Viewer example: Exception when scrolling fast using the scroll thumb
Opened this issue · 0 comments
Dunrar commented
When using the scroll thumb to scroll fast through a large document, the viewer sometimes throws an exception. I have also seen the same exception when using the thumbnails/bookmarks or TOC in quick succession, especially when having text selected. Interestingly, there are three distinct exceptions messages being thrown. They happen very inconsistently and sometimes one of them is directly followed by another, in no apparent order.
Exception 1:
Exception has occurred.
RangeError (RangeError (length): Invalid value: Only valid value is 0: 1)`
Stacktrace:
MultiSelectableSelectionContainerDelegate.getSelectionGeometry (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2290)
MultiSelectableSelectionContainerDelegate._updateSelectionGeometry (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2180)
MultiSelectableSelectionContainerDelegate.didChangeSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2168)
_SelectableRegionContainerDelegate.didChangeSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1990)
MultiSelectableSelectionContainerDelegate._updateSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2100)
MultiSelectableSelectionContainerDelegate._scheduleSelectableUpdate.runScheduledTask (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2077)
SchedulerBinding._invokeFrameCallback (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1397)
SchedulerBinding.handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1331)
SchedulerBinding._handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1176)
_invoke (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:312)
PlatformDispatcher._drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:419)
_drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:283)
Exception 2:
Exception has occurred.
RangeError (RangeError (length): Invalid value: Not in inclusive range 0..3: 4)
Stacktrace:
MultiSelectableSelectionContainerDelegate.getSelectionGeometry (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2290)
MultiSelectableSelectionContainerDelegate._updateSelectionGeometry (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2180)
MultiSelectableSelectionContainerDelegate._handleSelectableGeometryChange (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2262)
ChangeNotifier.notifyListeners (/opt/flutter/packages/flutter/lib/src/foundation/change_notifier.dart:437)
ValueNotifier.value= (/opt/flutter/packages/flutter/lib/src/foundation/change_notifier.dart:559)
_PdfTextRenderBox._updateGeometryInternal (/home/donrar/Projects/pdfrx/lib/src/widgets/pdf_page_text_overlay.dart:442)
_PdfTextRenderBox._updateGeometry (/home/donrar/Projects/pdfrx/lib/src/widgets/pdf_page_text_overlay.dart:294)
_PdfTextRenderBox.dispatchSelectionEvent (/home/donrar/Projects/pdfrx/lib/src/widgets/pdf_page_text_overlay.dart:610)
MultiSelectableSelectionContainerDelegate.dispatchSelectionEventToChild (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2735)
_SelectableRegionContainerDelegate.dispatchSelectionEventToChild (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1946)
MultiSelectableSelectionContainerDelegate._adjustSelection (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2850)
MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2667)
_SelectableRegionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1914)
_SelectableRegionContainerDelegate.didChangeSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1981)
MultiSelectableSelectionContainerDelegate._updateSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2100)
MultiSelectableSelectionContainerDelegate._scheduleSelectableUpdate.runScheduledTask (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2077)
SchedulerBinding._invokeFrameCallback (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1397)
SchedulerBinding.handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1331)
SchedulerBinding._handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1176)
_invoke (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:312)
PlatformDispatcher._drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:419)
_drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:283)
Exception 3:
Exception has occurred.
ConcurrentModificationError (Concurrent modification during iteration: Instance(length:2) of '_GrowableList'.)
ListIterator.moveNext (/opt/flutter/bin/cache/pkg/sky_engine/lib/internal/iterable.dart:350)
WhereIterator.moveNext (/opt/flutter/bin/cache/pkg/sky_engine/lib/internal/iterable.dart:452)
Iterable.forEach (/opt/flutter/bin/cache/pkg/sky_engine/lib/core/iterable.dart:347)
MultiSelectableSelectionContainerDelegate._flushInactiveSelections (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2475)
MultiSelectableSelectionContainerDelegate._initSelection (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2788)
MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2667)
_SelectableRegionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1914)
_SelectableRegionContainerDelegate.ensureChildUpdated (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1965)
_SelectableRegionContainerDelegate.dispatchSelectionEventToChild (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1932)
MultiSelectableSelectionContainerDelegate._initSelection (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2756)
MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2665)
_SelectableRegionContainerDelegate.handleSelectionEdgeUpdate (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1914)
_SelectableRegionContainerDelegate.didChangeSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:1974)
MultiSelectableSelectionContainerDelegate._updateSelectables (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2100)
MultiSelectableSelectionContainerDelegate._scheduleSelectableUpdate.runScheduledTask (/opt/flutter/packages/flutter/lib/src/widgets/selectable_region.dart:2077)
SchedulerBinding._invokeFrameCallback (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1397)
SchedulerBinding.handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1331)
SchedulerBinding._handleDrawFrame (/opt/flutter/packages/flutter/lib/src/scheduler/binding.dart:1176)
_invoke (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:312)
PlatformDispatcher._drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:419)
_drawFrame (/opt/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:283)