GithubHelp home page GithubHelp logo

Comments (11)

mrmatteastwood avatar mrmatteastwood commented on August 10, 2024 1

Hey, author of bug #189 here. Thanks for pointing me to this. I read it before reporting #189 and, not understanding all the technical details in the above comments, I opted for reporting 189 since it seemed different.

I ran all the latest updates on my laptop today and now the issue I described in bug #189 occurs on this PC, too. Bug #189 was from my desktop PC. There were a bunch of platform-related flatpak things among the updates.

Note that the issue occurs whether the "Preserve metadata" option is enabled or not.

from curtail.

Huluti avatar Huluti commented on August 10, 2024 1

@mrmatteastwood #189 is fixed in 1.8.0 :)

@magicmyth I updated oxping in 1.8.0. Can you retry and see if it's better now? (when it will be deployed in a few hours to flathub).

from curtail.

Huluti avatar Huluti commented on August 10, 2024

Can you copy what you have in the debug section in the about window please? It should be something like this:

Python: 3.10.6

Gtk: 4.10.3

Jpegoptim: 1.5.3

Oxipng: 8.0.0

pngquant: 2.18.0

Libwebp: 1.3.0

Scour: 0.38.2

from curtail.

Huluti avatar Huluti commented on August 10, 2024

Typo fixed btw thanks for reporting it!

from curtail.

magicmyth avatar magicmyth commented on August 10, 2024

Sorry for the delay. Here is my debug info:

Python: 3.10.6

Gtk: 4.10.3

Jpegoptim: 1.5.3

Oxipng: 8.0.0

pngquant: 2.18.0

Libwebp: 1.3.0

Scour: 0.38.2

from curtail.

Huluti avatar Huluti commented on August 10, 2024

Thanks! And by chance, can you share me an image that does this so I can reproduce please?

from curtail.

magicmyth avatar magicmyth commented on August 10, 2024

It fails with any PNG. I tested one of the Curtail's app screenshots from:

https://github.com/Huluti/Curtail/blob/master/data/screenshots/screen1.png
blob:https://github.com/eaa9eaca-8c87-4716-8a58-022af1088ab4

and I get the same issue.

I though't I'd do a little more debugging. So I popped into the sandbox environment with:

$ flatpak run --command=sh com.github.huluti.Curtail

and ran the command seen on the error output:

[📦 com.github.huluti.Curtail Downloads]$ oxipng -o 7 -i 1 "/PATH/test-file.png" --out "/PATH/test-file-min.png" --strip safe --preserve

Which returned:

error: "7" isn't a valid value for '--opt <level>'
        [possible values: 0, 1, 2, 3, 4, 5, 6, max]

For more information try --help

So tweaking the command with a valid -o value:

oxipng -o max -i 1 "/PATH/test-file.png" --out "/PATH/test-file-min.png" --strip safe --preserve

Resulted in

Processing: /PATH/test-file.png
    324x324 pixels, PNG format
    8 bits/pixel, 256 colors in palette (non-interlaced)
    IDAT size = 31458 bytes
    File size = 46285 bytes
Reducing image to 8 bits/pixel, 183 colors in palette (interlaced)
Trying: 10 filters
    IDAT size = 31458 bytes (0 bytes decrease)
    file size = 32716 bytes (13569 bytes = 29.32% decrease)
failed to set permissions, expected: 100664, found: 100644

So seems like a out of range setting has been stored somewhere causing the error. I went into the Preferences > Compression and the value was "6" but I changed it to 5 and it still failed but this time with exit status 1! My first guess is because I was using the previous version which may have allowed a higher digit supported by OptiPNG. It is still failing but the output suggests a changing permission issue on the file.

Because of the bad stored setting value I thought I'd try with purging my old data by deleting .var/app/com.github.huluti.Curtail, using Flatseal to reset any potential overridden app permissions (pretty sure I never adjusted Curtail but thought best to rule it out) and launching fresh. Unfortunately it is still failing and within the sandbox I still see that same "failed to set permissions".

from curtail.

magicmyth avatar magicmyth commented on August 10, 2024

BTW my flatpak version is: 1.12.7 which comes from the Ubuntu 22.04 repository. Seems there is a PPA now with the latest Flatpak (1.14.4) so I thought I'd try that in case the app relied on newer features but nope. Still failing with that same failed to set permissions, expected: 100664, found: 100644 error.

from curtail.

Huluti avatar Huluti commented on August 10, 2024

Thank you very much for having done this debugging!
I hadn't thought of the compression level change switching from Optipng to Oxipng. Good catch!
The permission error seems to come from oxipng: https://github.com/shssoichiro/oxipng/blob/a7be8751dce82e6d42936718134a1083b875768c/src/lib.rs#LL929C28-L929C28

Can you try to disable "preserver metadata" option to check if it's fix the problem temporary?

from curtail.

magicmyth avatar magicmyth commented on August 10, 2024

Yep it worked without the --preserve flag!

from curtail.

Huluti avatar Huluti commented on August 10, 2024

Ok! So just need to find why it fails with. Thank you very much for your help!

from curtail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.