Open pankaj-nikam opened 1 month ago
Windows 10 version: Version 22H2 19045.3030
Interesting, it looks like the issue is here:
[ +55 ms] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error 0x00000000: The operation completed successfully.
[ +1 ms] #0 DeviceInfoPlusWindowsPlugin.getSystemMemoryInMegabytes (package:device_info_plus/src/device_info_plus_windows.dart:128:9)
It is throwing an exception with the message "The operation completed successfully."
Looking at SO, I saw this response: https://stackoverflow.com/a/6428680
Windows has a hard limit of 10000 handles per process. The rather unhelpful exception "The operation completed successfully" might indicate that this limit was reached.
I am not a Windows dev expert so no idea how to move this forward, I wonder if this is an internal issue with Flutter/Dart.
Hi @miquelbeltran , it runs fine on Windows 11. I am not sure why, did it work on your machine? Yes, it is happening 100% of the time. I didnt get a chance to downgrade Flutter and check.
I only have a Win 11 computer, so I never saw this issue when I did my own testing.
Can confirm that this works fine with Windows 11. Created a VM just to reproduce this. I just installed Visual Studio 2022 with C++ desktop and then installed the Flutter SDK to reproduce this.
I also faced this issue with some clients running Windows RDS.
Platform
Windows 10
Plugin
device_info_plus
Version
10.1.0
Flutter SDK
3.22.1
Steps to reproduce
void main() async { DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); print(await deviceInfo.windowsInfo); }
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean