Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

error: failed to fill whole buffer #108

Closed
materialjan opened this issue Feb 27, 2020 · 5 comments
Closed

error: failed to fill whole buffer #108

materialjan opened this issue Feb 27, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@materialjan
Copy link

Hello first of all thank you for 0.8.0 and the CLI documentation with the examples.
This is awesome.
The speed is noticeable.

I have this error when trying to feed a 3k image as an example (3180x 3180) :
error: failed to fill whole buffer

The machine is a 8go mac laptop. Os 10.13.6
So is it normal ? and is there a rule to know the image size limit with an amount of RAM available.

Thank you.

@materialjan materialjan added the bug Something isn't working label Feb 27, 2020
@Jake-Shadle
Copy link
Member

Could you provide the invocation and image you used? It might not be reproducible, but also could be a simple fix, I'm just not where sure to look as there are numerous places that error could occur.

@materialjan
Copy link
Author

Not sure to understand the 'invocation' term, like an error code?
The terminal just outputted that line. Or should I use a debug mode?
The image is hosted here for 30 days :
http://dl.free.fr/otU4oLULO
Thank you.

@Jake-Shadle
Copy link
Member

It looks like there may be something in that image that the jpeg decoder doesn't like, for example, here is the output I get from convert when printing out the size of the image.

texture-synthesis [master●●] % convert ~/Downloads/rock.jpg -print "Size: %wx%h\n" /dev/null
Size: 3180x3180
convert: Premature end of JPEG file `/home/jake/Downloads/rock.jpg' @ warning/jpeg.c/JPEGWarningHandler/389.
convert: Corrupt JPEG data: premature end of data segment `/home/jake/Downloads/rock.jpg' @ warning/jpeg.c/JPEGWarningHandler/389.
convert: Corrupt JPEG data: premature end of data segment `/home/jake/Downloads/rock.jpg' @ warning/jpeg.c/JPEGWarningHandler/389.

And indeed, when I convert the image to PNG it works fine

texture-synthesis [master●●] % cargo run --release -- -o rock.png generate ~/Downloads/rock.png
    Finished release [optimized + debuginfo] target(s) in 0.04s
     Running `target/release/texture-synthesis -o rock.png generate /home/jake/Downloads/rock.png`
[00:00:01] ######################################## 100%
 stage   6 ######################################## 100%
texture-synthesis [master●●] % convert rock.png -print "Size: %wx%h\n" /dev/null
Size: 500x500

@Jake-Shadle
Copy link
Member

Kind of related image-rs/image#761

@materialjan
Copy link
Author

Ok good to know. Thanks for your time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants