[英]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:我试过这些:
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.