Rolv-Apneseth / lib_game_detector

A Rust library for detecting and parsing data about games currently installed on the system
GNU Affero General Public License v3.0
7 stars 0 forks source link

Error parsing a Steam library on Fedora #5

Closed Rolv-Apneseth closed 6 months ago

Rolv-Apneseth commented 6 months ago

Error output provided in this comment thanks to @zDyanTB

ERROR lib_game_detector::linux::launchers::steam: 221: Error with parsing games from a Steam library.
Library: SteamLibrary { path_library: "/run/media/zdyant/HDII/SteamLibrary", path_steam_dir: "/home/zdyant/.local/share/Steam" }
Error:
                        Os { code: 2, kind: NotFound, message: "No such file or directory" }
Rolv-Apneseth commented 6 months ago

@zDyanTB is the reported library path for your Steam library correct?

/run/media/zdyant/HDII/SteamLibrary

zDyanTB commented 6 months ago

@zDyanTB is the reported library path for your Steam library correct?

/run/media/zdyant/HDII/SteamLibrary

yes


zdyant/HDII/SteamLibrary 
❯ ls          
libraryfolder.vdf  steamapps

zdyant/HDII/SteamLibrary 
❯ pwd
/run/media/zdyant/HDII/SteamLibrary
zDyanTB commented 6 months ago

I did something. Idk, I rebooted the PC. Now it's working, but the theme.

zdyant/HDII/SteamLibrary 
❯ rofi -modi games -show games -theme games-default
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rofi-mode-0.3.1/src/api.rs:182:64:
called `Result::unwrap()` on an `Err` value: InvalidSize
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    6592 IOT instruction (core dumped)  rofi -modi games -show games -theme games-default

zdyant/HDII/SteamLibrary took 7s 
❯ 

image

I used my theme, now it's showing the arts. image

But with my theme, sometimes, I can't close the launcher and I have to press CTRL+C, I've got the error.

segmentation fault (core dumped) 
zDyanTB commented 6 months ago

Crash Note

~/.config/rofi 
❯ rofi -modi games -show games -theme games-default
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rofi-mode-0.3.1/src/api.rs:182:64:
called `Result::unwrap()` on an `Err` value: InvalidSize
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    9152 IOT instruction (core dumped)  rofi -modi games -show games -theme games-default

~/.config/rofi took 7s 
Rolv-Apneseth commented 6 months ago

Very weird behaviour, I'll try see if I can figure it out tomorrow. Thanks for reporting.

Rolv-Apneseth commented 6 months ago

Oh - could you also post your theme please, just so I can see if I get the same issues

zDyanTB commented 6 months ago

Oh - could you also post your theme please, just so I can see if I get the same issues

Sure, here it is.

Rolv-Apneseth commented 6 months ago

Could you also give me that theme file at ~/.cache/wal/colors-rofi-dark.rasi

Edit: nevermind, just using random colours and the theme seems fine

Edit2: seems like there is some issue but I don't think it's the theme's fault. Removing the mainbox part avoids the crash. I think it's related to not having the input box defined. Looking into it now.

zDyanTB commented 6 months ago

Could you also give me that theme file at ~/.cache/wal/colors-rofi-dark.rasi

Edit: nevermind, just using random colours and the theme seems fine

Edit2: seems like there is some issue but I don't think it's the theme's fault. Removing the mainbox part avoids the crash. I think it's related to not having the input box defined. Looking into it now.

The same error occur once with your theme as well

edit: Tough I think it was random

Rolv-Apneseth commented 6 months ago

edit: Tough I think it was random

So you don't get it any more?

Anyway I believe I found out why the segmentation fault was occurring with your theme, so I created a PR to fix it in the base library this plugin uses, we'll need to wait to see what the author thinks. They'll probably know better than me.

As for the error with my theme, could you try installing again with the latest changes? I just made a small adjustment to the theme:

sudo just uninstall
git checkout main
git pull
sudo just install
zDyanTB commented 6 months ago

The theme seems ok so far.

rofi-games on  main is 󰏗 v1.6.6 via  v1.76.0 
❯ rofi -modi games -show games -theme games-default
ERROR lib_game_detector::linux::launchers::steam: 221: Error with parsing games from a Steam library.
Library: SteamLibrary { path_library: "/run/media/zdyant/HDII/SteamLibrary", path_steam_dir: "/home/zdyant/.local/share/Steam" }
Error:
                        Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR rofi_games: 110: Unsupported input event: CustomInput { alt: false, selected: None }

rofi-games on  main is 󰏗 v1.6.6 via  v1.76.0 took 3s 
❯ 

The line

ERROR rofi_games: 110: Unsupported input event: CustomInput { alt: false, selected: None }

Is the error I received when I hit enter

edit: Fu**, the first error is when my HDD is not mounted. Sorry for that. But when I mount it, the launcher crashes as before.

https://github.com/Rolv-Apneseth/lib_game_detector/assets/102763838/84ebaf6a-2ec5-479b-a194-1ee8cd521d3d

rofi-games on  main is 󰏗 v1.6.6 via  v1.76.0 
❯ rofi -modi games -show games -theme games-default   
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rofi-mode-0.3.1/src/api.rs:182:64:
called `Result::unwrap()` on an `Err` value: InvalidSize
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    152777 IOT instruction (core dumped)  rofi -modi games -show games -theme games-default

rofi-games on  main is 󰏗 v1.6.6 via  v1.76.0 took 8s 
❯ 
Rolv-Apneseth commented 6 months ago

I thought it might be the theme's icon sizes but I guess not. I'll wait and see if the creator of the library I'm using knows what might cause that issue.

Rolv-Apneseth commented 6 months ago

One last thing cause it might be helpful for them actually, could you run the command with RUST_BACKTRACE=1 at the start and give the full output?

zDyanTB commented 6 months ago
~ 
❯ RUST_BACKTRACE=1 rofi -modi games -show games -theme games-default
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rofi-mode-0.3.1/src/api.rs:182:64:
called `Result::unwrap()` on an `Err` value: InvalidSize
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[1]    179322 IOT instruction (core dumped)  RUST_BACKTRACE=1 rofi -modi games -show games -theme games-default

~ took 4s 
❯ RUST_BACKTRACE=full rofi -modi games -show games -theme games-default
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rofi-mode-0.3.1/src/api.rs:182:64:
called `Result::unwrap()` on an `Err` value: InvalidSize
stack backtrace:
   0:     0x7f6a0cf4f994 - <unknown>
   1:     0x7f6a0ceb2cc0 - <unknown>
   2:     0x7f6a0cf229dc - <unknown>
   3:     0x7f6a0cf50c98 - <unknown>
   4:     0x7f6a0cf50aeb - <unknown>
   5:     0x7f6a0cf51230 - <unknown>
   6:     0x7f6a0cf50e30 - <unknown>
   7:     0x7f6a0cf50d86 - <unknown>
   8:     0x7f6a0cf50d7f - <unknown>
   9:     0x7f6a0cea03b4 - <unknown>
  10:     0x7f6a0cea0922 - <unknown>
  11:     0x7f6a0ceaeedb - <unknown>
  12:     0x56366e2ddfc1 - mode_get_icon
  13:     0x56366e2e747a - <unknown>
  14:     0x56366e314cd5 - <unknown>
  15:     0x56366e2f3ea9 - <unknown>
  16:     0x56366e2f2183 - <unknown>
  17:     0x56366e2e097a - <unknown>
  18:     0x56366e2f2183 - <unknown>
  19:     0x56366e2e097a - <unknown>
  20:     0x56366e2f2183 - <unknown>
  21:     0x56366e30eeda - <unknown>
  22:     0x56366e2e80f1 - <unknown>
  23:     0x56366e314339 - <unknown>
  24:     0x56366e314421 - <unknown>
  25:     0x7f6a1b867799 - <unknown>
  26:     0x7f6a1b866e5c - <unknown>
  27:     0x7f6a1b8c1f18 - <unknown>
  28:     0x7f6a1b868447 - g_main_loop_run
  29:     0x56366e2d555c - main
  30:     0x7f6a1b04e14a - __libc_start_call_main
  31:     0x7f6a1b04e20b - __libc_start_main_impl
  32:     0x56366e2d56f5 - _start
  33:                0x0 - <unknown>
[1]    179545 IOT instruction (core dumped)  RUST_BACKTRACE=full rofi -modi games -show games -theme games-default

~ took 4s 
❯ 
zDyanTB commented 6 months ago

I thought it might be the theme's icon sizes but I guess not. I'll wait and see if the creator of the library I'm using knows what might cause that issue.

Using this theme don't cause crashes

https://github.com/Rolv-Apneseth/lib_game_detector/assets/102763838/5a897bed-b3f0-49ee-a0a0-46a9344bf1dd

Rolv-Apneseth commented 6 months ago

Hmm. Maybe it's the percentage based element icon size on the other theme. Very confusing.

zDyanTB commented 6 months ago

Setting the element icon size to 30% makes the game art appear and makes no crashes.

But the launcher becomes laggy after the arts show up

https://github.com/Rolv-Apneseth/lib_game_detector/assets/102763838/f237c8c6-9720-47fb-b9fe-ef2842c5bd06

Rolv-Apneseth commented 6 months ago

How did you install rofi? Maybe it has some newer changes than the base 1.7.5 because I vaguely remember some of these issues like this when we were trying to get this to work with the newer version.

zDyanTB commented 6 months ago

I've used a script

I can try to reinstall, see if that works

Rolv-Apneseth commented 6 months ago

I see, it's installing rofi-wayland, which is the lbonn fork (fedora package found here) but it was last updated 7 months ago. Seems to be at an awkward stage where it's not on the newer changes so we can't build it for the next version, but the previous version won't build correctly for it either. Not sure there's much that can be done unfortunately.

Could you try install that rofi fork directly from source, or try the plain rofi not built specifically for Wayland? Make sure to uninstall first, and do a fresh install of rofi-games too.

Rolv-Apneseth commented 6 months ago

@zDyanTB could you try with the latest changes to rofi-games? I imagine the images won't work but maybe there won't be any errors. A different rofi install should do it though, or if the fedora package is updated.

zDyanTB commented 6 months ago

Sure, I'll do it.

Question: My videos are inverted to you?

zDyanTB commented 6 months ago

Everything looks fine. No crashes, no lag, nothing.

But with my theme it gets laggy over time, Don't know why. Maybe the icon size matters?

I'm using the same rofi version as before

Rolv-Apneseth commented 6 months ago

Question: My videos are inverted to you?

Your videos look fine to me, thanks for taking the time to include them

But with my theme it gets laggy over time

What do you mean by that? Ideally the theme shouldn't make a difference but maybe there's something I'm missing. Is it this theme you're talking about?

Again though might just be some weird interactions with that version of rofi you're using. Once it's updated it should work with rofi-games (I hope).

zDyanTB commented 6 months ago

I mean, when I switch to another game, using the arrows. It becomes slow to execute the command.

I'm talking this theme

I'll look for a way to update Rofi anyway

Rolv-Apneseth commented 6 months ago

Not ideal. If it still happens when rofi is updated (or you use the rofi package instead of the rofi-wayland one) would you mind opening another issue over on rofi-games? I'll be closing this one for now.

Thanks a lot for reporting and giving feedback on the issue(s), I appreciate it.