Skip to content
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

Crash on selecting 'Images' #203

Closed
ak-42 opened this issue Aug 12, 2022 · 24 comments
Closed

Crash on selecting 'Images' #203

ak-42 opened this issue Aug 12, 2022 · 24 comments
Labels
bug Something isn't working

Comments

@ak-42
Copy link

ak-42 commented Aug 12, 2022

I am running BoilR on Steam Deck, with latest system software and up to date BoilR from Flathub.

The program starts fine, but when 'Images' is selected on the left side of the main Window, it crashes. Here's the output from the terminal:

(deck@steamdeck ~)$ flatpak run io.github.philipk.boilr
Setting for platform EGS are invalid, reason: Manifests not found
Setting for platform Legendary are invalid, reason: No such file or directory (os error 2)
Setting for platform Itch are invalid, reason: Path not found: Some("/home/deck/.config/itch/db/butler.db-wal")
Setting for platform Origin are invalid, reason: Default path not found
Setting for platform Gog are invalid, reason: Could not find path: "/home/deck/Games/gog-galaxy/drive_c/ProgramData/GOG.com/Galaxy"
Found 2 game(s) for platform Heroic
Setting for platform Flatpak are invalid, reason: No such file or directory (os error 2)
thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /run/build/boilr/cargo/vendor/image-0.24.3/./src/codecs/webp/extended.rs:462:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I've tried to run Rust backtrace as suggested in the error, by running flatpak run io.github.philipk.boilr --env='RUST_BACKTRACE=1' but it does not seem to work. I am uncertain if I'm not doing something right, or the error message is wrong/outdated.

Please let me know if there's anything further I can do to provide diagnostic info.

@PhilipK
Copy link
Owner

PhilipK commented Aug 12, 2022

This seems to be a problem with one of the thumbnails for the images being corrupt or something. I will try to fix it by just letting boilr ignore it if it can't parse the image.

@PhilipK PhilipK added the bug Something isn't working label Aug 12, 2022
@PhilipK
Copy link
Owner

PhilipK commented Aug 15, 2022

This should be solved in version https://github.com/PhilipK/BoilR/releases/tag/v.1.4.4 now. Let me know if it does not work for you.

@PhilipK PhilipK closed this as completed Aug 15, 2022
@ak-42
Copy link
Author

ak-42 commented Aug 18, 2022

@PhilipK This issue is not resolved for me in 1.4.4. I get same symptoms, crashing when I select 'Image', the terminal output is thus:

(deck@steamdeck ~)$ flatpak info io.github.philipk.boilr

BoilR - Add non-steam games to your steam library

          ID: io.github.philipk.boilr
         Ref: app/io.github.philipk.boilr/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.4.4
     License: MIT-0 OR Apache-2.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 12.8?MB
     Runtime: org.freedesktop.Platform/x86_64/21.08
         Sdk: org.freedesktop.Sdk/x86_64/21.08

      Commit: 8f6627e354200e64674e97c3e3f4ba1fc1172f8abf1f0ba2888573cdf1060540
      Parent: fee4c03e62cc08fa9a5ccf0b4b0ba453c6df760342c34788bac4995a1bd90872
     Subject: Update version to v.1.4.4 (008554d9)
        Date: 2022-08-15 13:22:46 +0000
(deck@steamdeck ~)$ flatpak run io.github.philipk.boilr
Setting for platform EGS are invalid, reason: Manifests not found
Setting for platform Legendary are invalid, reason: No such file or directory (os error 2)
Setting for platform Itch are invalid, reason: Path not found: Some("/home/deck/.config/itch/db/butler.db-wal")
Setting for platform Origin are invalid, reason: Default path not found
Setting for platform Gog are invalid, reason: Could not find path: "/home/deck/Games/gog-galaxy/drive_c/ProgramData/GOG.com/Galaxy"
Found 2 game(s) for platform Heroic
Setting for platform Flatpak are invalid, reason: No such file or directory (os error 2)
thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /run/build/boilr/cargo/vendor/image-0.24.3/./src/codecs/webp/extended.rs:462:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@PhilipK
Copy link
Owner

PhilipK commented Aug 18, 2022

I am going to reopen this, it turns out to be a bug in the library that decodes the images, if the images are webp format.
image-rs/image#1740

I will see if I can make a pull request for the image library or maybe just ignore all webp images or something in boilr.

@PhilipK PhilipK reopened this Aug 18, 2022
@PhilipK
Copy link
Owner

PhilipK commented Aug 21, 2022

@ak-42 can you (or anyone that experiences this bug) try to run this beta version?

https://github.com/PhilipK/BoilR/releases/tag/v.1.4.4-beta
I have tried to wrap the library that throw the panic/crashes in a thread of its own, which should let the main thread continue.
Would like to know that this is actually solved before I make a new official release.

@ak-42
Copy link
Author

ak-42 commented Aug 21, 2022

@PhilipK I'm having trouble installing the file directly. The documentation says it should be just flatpak install linux_BoilR but that results in response error: No remote refs found similar to linux_BoilR. If I add the extension .flatpak which seems to be expected, the response is error: Invalid checksum of length 0 expected 32.
Am I doing something wrong?

@PhilipK
Copy link
Owner

PhilipK commented Aug 21, 2022

Oh, that is not a flatpak release.
Simply just double click it.
It's a standalone native version (like an exe on windows)

@ak-42
Copy link
Author

ak-42 commented Aug 21, 2022

Oh, sorry, didn't even occur to me that it'd be a binary on its own.

Well, it still crashes. Here's the terminal output:

(deck@steamdeck Downloads)$ ./linux_BoilR
Setting for platform EGS are invalid, reason: Manifests not found
Setting for platform Legendary are invalid, reason: No such file or directory (os error 2)
Setting for platform Itch are invalid, reason: Path not found: Some("/home/deck/.config/itch/db/butler.db-wal")
Setting for platform Origin are invalid, reason: Default path not found
Setting for platform Gog are invalid, reason: Could not find path: "/home/deck/Games/gog-galaxy/drive_c/ProgramData/GOG.com/Galaxy"
Found 2 game(s) for platform Heroic
Found 22 game(s) for platform Flatpak
thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /home/runner/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/image-0.24.3/./src/codecs/webp/extended.rs:462:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The last two lines only occur when the 'Images' is clicked, rest upon launch.

@PhilipK
Copy link
Owner

PhilipK commented Aug 22, 2022

I simply can not figure out that kind of input (image) that would cause this. @ak-42 Would it be possible for you to zip your steam grid folder (the one containing all your custom images) and upload it? It could just be the webp images, as it seem from the log that it is an .webp image that is causing the crash.

@ak-42
Copy link
Author

ak-42 commented Aug 22, 2022

@PhilipK You can download all the .webp files from /home/deck/.local/share/Steam/userdata/<ID>/config/grid/via the below link:

https://send.vis.ee/download/0d90a4c137b45ede/#WZoQWJ9npqGy4rXLgJ81SA

Please note that this link will expire after 1 successful download or within 7 days, whichever comes first.

I cannot open 2315333747p.webp, 2673742363p.webp or 3837888713p.webp using a standard image viewer with webp support either, so the culprit is likely one of those.
Also, I have never attempted to manage or modify these files on my own, so if they're corrupted, they were likely corrupted by BoileR's download process. Maybe consider adding a post-download integrity check?

@PhilipK
Copy link
Owner

PhilipK commented Aug 22, 2022

That helps a lot! I will look at doing some validation later today (after work)

@PhilipK
Copy link
Owner

PhilipK commented Aug 22, 2022

I got the files, you can delete all those webp images, that should get you around the crash.
I will try to fix the problem later.

@PhilipK
Copy link
Owner

PhilipK commented Aug 22, 2022

I found the cause of the problem, they are animated webp images, the image library used panics when it tries to load them.

@PhilipK
Copy link
Owner

PhilipK commented Aug 23, 2022

Alright, https://github.com/PhilipK/BoilR/releases/tag/v.1.4.4-beta2 can you try the newest beta.
It should work now, it uses my forked version of the image library, that has the bugfix for the panic/crash.

@ak-42
Copy link
Author

ak-42 commented Aug 24, 2022

can you try the newest beta.

@PhilipK If this is for me, I can no longer replicate the crash as I've deleted the webps and the crash no longer occurs even on the current stable unfixed version.

@PhilipK
Copy link
Owner

PhilipK commented Aug 27, 2022

This should be fixed in the newest version, if it comes up again, I will reopen this issue.

@PhilipK PhilipK closed this as completed Aug 27, 2022
@mysteriousHerb
Copy link

Still crash on newest version (both the flatpack or linux executable) on steam deck when choosing "images" tab

thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /home/runner/.cargo/git/checkouts/image-ed333a7345ddf6ae/cb66840/./src/codecs/webp/extended.rs:474:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Found 0 game(s) for platform Lutris
Found 2 game(s) for platform Heroic
Found 14 game(s) for platform Flatpak

@PhilipK PhilipK reopened this Sep 5, 2022
@PhilipK
Copy link
Owner

PhilipK commented Sep 5, 2022

Sorry to be that guy, but:
@herbzhao are you 100% sure that it is the newest version? 1.4.7?
Did you run flatpak update ?
I cannot reproduce it with anythig I have thrown at it.

If you have the native version, could you try to run RUST_BACKTRACE=1, so I can see the stacktrace?

@mysteriousHerb
Copy link

mysteriousHerb commented Sep 5, 2022

Hi , no worries, I am running the native 1.4.7 (only got my deck 2 days ago)

here are the output

thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /home/runner/.cargo/git/checkouts/image-ed333a7345ddf6ae/cb66840/./src/codecs/webp/extended.rs:474:21
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'source slice length (1620000) does not match destination slice length (2160000)', /home/runner/.cargo/git/checkouts/image-ed333a7345ddf6ae/cb66840/./src/codecs/webp/extended.rs:474:21
stack backtrace:
   0:     0x7f4c01626d5d - <unknown>
   1:     0x7f4c0164f96c - <unknown>
   2:     0x7f4c0161fb11 - <unknown>
   3:     0x7f4c016286a5 - <unknown>
   4:     0x7f4c016283c6 - <unknown>
   5:     0x7f4c01628c36 - <unknown>
   6:     0x7f4c01628b27 - <unknown>
   7:     0x7f4c01627214 - <unknown>
   8:     0x7f4c01628859 - <unknown>
   9:     0x7f4c00e37bb3 - <unknown>
  10:     0x7f4c00e37df2 - <unknown>
  11:     0x7f4c01002aed - <unknown>
  12:     0x7f4c00faaaad - <unknown>
  13:     0x7f4c00fbdbc2 - <unknown>
  14:     0x7f4c00f72f01 - <unknown>
  15:     0x7f4c00fa6443 - <unknown>
  16:     0x7f4c00ee5534 - <unknown>
  17:     0x7f4c00fc5ddf - <unknown>
  18:     0x7f4c00e9c911 - <unknown>
  19:     0x7f4c00ef37df - <unknown>
  20:     0x7f4c00ef62cd - <unknown>
  21:     0x7f4c00ef667d - <unknown>
  22:     0x7f4c00ea0c86 - <unknown>
  23:     0x7f4c010deadd - <unknown>
  24:     0x7f4c0111d18d - <unknown>
  25:     0x7f4c0111c357 - <unknown>
  26:     0x7f4c010e6339 - <unknown>
  27:     0x7f4c010e6cf2 - <unknown>
  28:     0x7f4c0112972b - <unknown>
  29:     0x7f4c01109531 - <unknown>
  30:     0x7f4c0111d959 - <unknown>
  31:     0x7f4c010f4b45 - <unknown>
  32:     0x7f4c00ea15d8 - <unknown>
  33:     0x7f4c00f49723 - <unknown>
  34:     0x7f4c00f7d889 - <unknown>
  35:     0x7f4c01618c6e - <unknown>
  36:     0x7f4c00ea4ad2 - <unknown>
  37:     0x7f4c0049bb25 - __libc_start_main
  38:     0x7f4c00e37eae - <unknown>
  39:                0x0 - <unknown>

@PhilipK
Copy link
Owner

PhilipK commented Sep 7, 2022

Again, this is some kind of panic in the image-rs package, and again it is related to webp.
I know it is a big ask, but could you look in your grid folder and send me the webp images from it?
Also, you should be able to "solve" your problem by just removing the webp from your grid folder.

@PhilipK PhilipK added the need more info This issue needs more information label Sep 7, 2022
@mysteriousHerb
Copy link

Hi, could you tell me where would I find the folder? I have narrowed down to which game causes the crach, it is the Tunic

@mysteriousHerb
Copy link

Nvm, i have narrowed down to these two webp.
grid_1.zip

@PhilipK PhilipK removed the need more info This issue needs more information label Sep 8, 2022
@PhilipK
Copy link
Owner

PhilipK commented Sep 8, 2022

Thanks, I can reproduce the error with those images

@PhilipK
Copy link
Owner

PhilipK commented Sep 8, 2022

This is solved in the newest version:
https://github.com/PhilipK/BoilR/releases/tag/v.1.4.9

Thanks for helping out

@PhilipK PhilipK closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants