nabil6391 / graphview

Flutter GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
MIT License
415 stars 115 forks source link

Index out of range error when changing the graph object #116

Open emmby opened 5 months ago

emmby commented 5 months ago
The following IndexError was thrown building _GraphViewAnimated(dirty, dependencies: [MediaQuery],
state: _GraphViewAnimatedState#68d80):
RangeError (index): Index out of range: index should be less than 8: 8

The relevant error-causing widget was:
  GraphView$ GraphView:file:///Users/mike/Documents/GitHub/kgng/lib/src/home/node_view.dart:219:20

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 600:7                 _get]
packages/graphview/GraphView.dart 299:34                                          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 572:46                generate
packages/graphview/GraphView.dart 296:12                                          <fn>
packages/graphview/GraphView.dart 306:48                                          build
packages/flutter/src/widgets/framework.dart 5583:27                               build
packages/flutter/src/widgets/framework.dart 5471:15                               performRebuild
packages/flutter/src/widgets/framework.dart 5634:11                               performRebuild
packages/flutter/src/widgets/framework.dart 5187:7                                rebuild
packages/flutter/src/widgets/framework.dart 2895:18                               buildScope
packages/flutter/src/widgets/binding.dart 984:9                                   drawFrame
packages/flutter/src/rendering/binding.dart 457:5                                 [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1325:7                                [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1255:9                                handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1113:5                                [_handleDrawFrame]
lib/_engine/engine/platform_dispatcher.dart 1274:5                                invoke
lib/_engine/engine/platform_dispatcher.dart 248:5                                 invokeOnDrawFrame
lib/_engine/engine/initialization.dart 186:36                                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall

════════════════════════════════════════════════════════════════════════════════════════════════════ 410 Another exception was thrown: RangeError (index): Index out of range: index should be less than 8: 8

emmby commented 5 months ago

Fix: https://github.com/nabil6391/graphview/pull/115