flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

Unhandled Exception: RangeError: Value not in range: 8

Open JesusJoseph opened this issue 2 years ago • 3 comments

Getting exception when below line of code is executed. List allSubWindowIds = await DesktopMultiWindow.getAllSubWindowIds();

Please note that this error occurs ONLY when there are no sub window opens at that time. If there are one or more sub window then NO issues.

Expected behavior

I expected that this line of code will return null or a list with no items but not Exception

Version (please complete the following information):

  • Flutter Version: Flutter 3.7.3
  • OS: Windows 11
  • plugin: desktop_multi_window: ^0.2.0

Full Exception

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError: Value not in range: 8 #0 _rangeCheck (dart:typed_data-patch/typed_data_patch.dart:5213:5) #1 _ByteBuffer.asInt64List (dart:typed_data-patch/typed_data_patch.dart:1988:5) #2 _UnmodifiableByteBufferView.asInt64List (dart:typed_data-patch/typed_data_patch.dart:5690:43) #3 ReadBuffer.getInt64List serialization.dart:244 #4 StandardMessageCodec.readValueOfType message_codecs.dart:513 #5 StandardMessageCodec.readValue message_codecs.dart:479 #6 StandardMethodCodec.decodeEnvelope message_codecs.dart:646 #7 MethodChannel._invokeMethod platform_channel.dart:315 #8 DesktopMultiWindow.getAllSubWindowIds desktop_multi_window.dart:76 #9 SongController.closeAllSubWindows song_controller.dart:280

JesusJoseph avatar Feb 19 '23 00:02 JesusJoseph

I have the same issue on Windows 10.

MegatronKing avatar Mar 01 '23 02:03 MegatronKing

@MegatronKing @JesusJoseph I am also getting same issue have you any idea regarding this?

yash-t-crest avatar Dec 27 '23 04:12 yash-t-crest

Would love to get an answer to this too. This is happening to me on Windows 10. On MacOS it works fine and returns an empty list.

holotrek avatar Feb 21 '24 07:02 holotrek

the reason is “flutter::EncodableValue ≠ flutter::EncodableList ” i make a pr

wangdenkun avatar May 11 '24 03:05 wangdenkun

this should be closed by #338 , thanks for @wangdenkun

boyan01 avatar May 11 '24 06:05 boyan01