简体   繁体   English

Flutter Windows 从本地磁盘加载多个图像时,应用程序无错误地崩溃

[英]Flutter Windows app crashes without error while loading multiple images from local disk

I created a multi image selector form field widget to use within a form with validation and so on, and it works fine;我创建了一个多图像选择器表单字段小部件,以在带有验证等的表单中使用,并且工作正常; however, when I select 8 or more images from a file picker at once and add them to the selected images list, which would be displayed in an image widget within a GridView, the app crashes without any errors.但是,当我 select 一次从文件选择器中选择 8 张或更多图像并将它们添加到所选图像列表时,该列表将显示在 GridView 内的图像小部件中,应用程序崩溃而没有任何错误。

I even tried the app on Android to see if it happened there, but everything was OK even when I added 10+ images at a time.我什至在 Android 上尝试了该应用程序,看看它是否发生在那里,但即使我一次添加 10 多张图片,一切都很好。

I'm wondering if there's any way to debug this because I'm at a loss for what to do right now with no errors.我想知道是否有任何方法可以调试它,因为我不知道现在该做什么而没有错误。

i've tried these:我试过这些:

  • Using a 50x50 pixel size cache for the selected image list to avoid loading a large amount of data at once为所选图像列表使用 50x50 像素大小的缓存,以避免一次加载大量数据

It turned out to be file_picker v4.0.0 causing the issue Apparently, when you select files using this package, it will interact with the file, either loading it or whatnot.原来是file_picker v4.0.0引起了这个问题 显然,当你使用这个 package 的 select 文件时,它会与文件交互,加载它或诸如此类的东西。 I'm not sure, but I discovered it by removing image widgets and only displaying the selected image paths using a text widget and it still crashed, so I was certain it was the file picker's fault and chose to use file picker cross even though it depends on file picker it was working differently and it didn't crash the app even with 20 images selected.我不确定,但我发现它是通过删除图像小部件并仅使用文本小部件显示选定的图像路径但它仍然崩溃,所以我确定这是文件选择器的错误并选择使用文件选择器交叉即使它取决于文件选择器,它的工作方式不同,即使选择了 20 张图像也不会使应用程序崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter Windows 应用程序在启动后崩溃,geolocator 9.0.1 - Flutter windows app crashes after start up, geolocator 9.0.1 为 Windows 编译 Flutter 应用程序时出错 - Error while compiling a Flutter application for Windows 加载Java VM时出现Windows错误2 - Windows error 2 occured while loading the Java VM 在 Python 中加载 dll 时出现 Windows 错误 1114 - Windows Error 1114 while loading dll in Python 从多个远程Windows服务器获取磁盘空间信息 - Get disk space information from multiple remote windows servers 通用Windows应用(UWP)无法在Webview中加载本地html文件 - Universal Windows App (UWP) Not Loading local html file in Webview Tensorflow导入在Windows上没有任何错误导致Python崩溃 - Tensorflow importing crashes Python without any error on Windows 在没有加载库的情况下加载opengl函数时出错 - Error while loading opengl functions without a loading library Windows 8(商店)APP中的设置有时会崩溃,并出现文件权限错误 - Settings crashes *sometimes* in Windows 8 (store) APP with file permission error 在 Windows 7 上从 Java 启动 CYGWIN 构建的可执行文件失败,并显示“加载共享库时出错:?:没有这样的文件或目录” - Launching CYGWIN-built executable from Java on Windows 7 fails with "error while loading shared libraries: ?: No such file or directory"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM