-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Range Error
When Building With MSIX
#575
Comments
I have never used MSIX (and don't have any time to start using it) so I can't test the problem/fix. But the error says to me copyResize needs to do a better job range checking/clamping, which I can add. I don't know what parameters MSIX is calling copyResize with, to know why it's getting out of bounds, and I don't know if that's because of a problem on their side or mine. But at least adding improved checking to copyResize should resolve that particular RangeError. |
I've been doing some more digging. When I fed it a
And here is a png:
|
Just to help you out: copyResize Usages in MSIX |
The webp error seems to be a problem decoding the webp file. If you send me the webp image I can see if there was a problem decoding it. I'll add more unit tests for resizeImage, see if I can find the condition that's causing it to range error. (I'm pretty slammed with work but I'll do my best to get to this soon) |
Hello @jlambright thank you for the report, @brendan-duncan for the reply. The Msix package works well with version 4.1.0, but breaks on minor version 4.1.1. As a temporary fix i set the Msix package to work with 4.1.0. Here is a image that reproduce the error: Thank you 👍 |
Thanks, that's really helpful. Guess I broke something when I added the new features to copyResize. I'll get it fixed up, and take a look at that webp. |
I published the fix for the range error in 4.1.3. It was an embarrassing mistake, I mistakenly shadowed a couple variables (x2, y2), and that made the pixel coordinates all wrong. I'll still take a look at the webp issue. |
I wasn't able to reproduce any problem decoding the webp. I downloaded your PNG, used InteliJ to convert it to a WebP (default settings, lossy). I through it in the webp unit tests and it didn't seem to have any problem decoding it. |
Hello @brendan-duncan , 4.1.3 fixed the problem 👍 @jlambright thanks again for the quick bug report 👍
Happens... Keep up the good work with this important package. |
|Unhandled exception: RangeError (index): Index out of range: index should be less than 7744: 7748 #0 Uint8List.[]= (dart:typed_data-patch/typed_data_patch.dart:22[80](https://gitlab.corp.dataspeedinc.com/kinetic/360/dsk360_command/-/jobs/5509#L80):7) #1 ImageDataUint8.setPixelRgba (package:image/src/image/image_data_uint8.dart:111:9) #2 Image.setPixel (package:image/src/image/image.dart:761:11) #3 copyResize (package:image/src/transform/copy_resize.dart:132:15) #4 Assets.createIcons.generateIcon (package:msix/src/assets.dart:66:26) #5 Assets.createIcons.<anonymous closure> (package:msix/src/assets.dart:139:13) #6 _RemoteRunner._run (dart:isolate:1021:47) #7 _RemoteRunner._remoteExecute (dart:isolate:1015:12) #8 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:17) #9 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:1[89](https://gitlab.corp.dataspeedinc.com/kinetic/360/dsk360_command/-/jobs/5509#L89):12)
I can't seem to pinpoint when these two packages stopped working together, but it's semi-recently. I've rolled each package (individually) to the point where they last produced a good build. When both are rolled back, it works. Which means something changed in how they interact with each other.
MSIX
Maintainer: @YehudaKremer
The text was updated successfully, but these errors were encountered: