kyechou / leagueoflegends

League of Legends install and launch wrapper for Linux
https://www.leagueoflegends.com
GNU General Public License v3.0
290 stars 22 forks source link

"Unknown Error" Once Client Opens After Install #69

Closed trainzkid closed 2 years ago

trainzkid commented 2 years ago

System information

Describe the issue

League client no longer runs, even after uninstall and reinstall. I'm assuming it's something I did but I don't know where to go from here, just looking for a little direction. I recently had to restore my home dir from a backup, but I've since uninstalled and reinstalled both leagueoflegends-git and wine-lol multiple times hoping to fix the issue(s).

When the issue first occurred, I was able to load into the client (albeit with lots of errors and wine crash windows) and even launch a practice game without issue. Once I closed the game and tried to run it again (via leagueoflegends start), all of the errors described below began.

Steps to reproduce

  1. Manually git clone and install deps and leagueoflegends-git, as Paru and ChaoticAUR both fail to get deps.
  2. Run leagueoflegends install.
  3. Enter 1, since I'm in the NA region.
  4. [+] Downloading installer... [+] Installing League of Legends... wineserver: using server-side synchronization. [+] Waiting for wine processes... wine: Unhandled exception 0x80000003 in thread 30c at address 004955AE (thread 030c), starting debugger... wine: Unhandled exception 0x80000003 in thread 468 at address 004955AE (thread 0468), starting debugger... [+] The game is installed at /home/$USER/.local/share/leagueoflegends/drive_c/Riot Games
  5. Run leagueoflegends start.
  6. Riot launcher thing starts and allows me to download league, but launching league after install gives me the error in the screenshot below, as well as the following errors in the shell output: [+] Starting... wineserver: using server-side synchronization. wine: Unhandled exception 0x80000003 in thread 2b0 at address 004955AE (thread 02b0), starting debugger... wine: Unhandled exception 0x80000003 in thread 408 at address 004955AE (thread 0408), starting debugger... wine: Unhandled exception 0x80000003 in thread 1a0 at address 00414A61 (thread 01a0), starting debugger... wine: Unhandled exception 0x80000003 in thread 89c at address 00414A61 (thread 089c), starting debugger... wine: Unhandled exception 0x80000003 in thread 8f8 at address 00414A61 (thread 08f8), starting debugger... wine: Unhandled exception 0x80000003 in thread b18 at address 004955AE (thread 0b18), starting debugger... wine: Unhandled exception 0x80000003 in thread 470 at address 004955AE (thread 0470), starting debugger... wine: Unhandled exception 0x80000003 in thread 550 at address 00414A61 (thread 0550), starting debugger... wine: Unhandled exception 0x80000003 in thread 5a0 at address 00414A61 (thread 05a0), starting debugger... wine: Unhandled exception 0x80000003 in thread 760 at address 00414A61 (thread 0760), starting debugger... wine: Unhandled exception 0x80000003 in thread 878 at address 00414A61 (thread 0878), starting debugger... wine: Unhandled exception 0x80000003 in thread 940 at address 004955AE (thread 0940), starting debugger... wine: Unhandled exception 0x80000003 in thread 4c4 at address 004955AE (thread 04c4), starting debugger... wine: Unhandled exception 0x80000003 in thread b10 at address 004955AE (thread 0b10), starting debugger...

Screenshots

image

kyechou commented 2 years ago

Yeah those error messages don't seem normal.. May I ask about the reason for recovering from the backup? What was the process of the backup recovery? Are there any changes made to the system, like different hardware, kernel, or the installed packages?

Another thing you might want to try is breaking down the possible root causes, which means:

  1. Run some simple windows applications (like notepad.exe) to see how the wine environment behaves. For instance, leagueoflegends run wine <notepad.exe>. And if there are still weird error messages, try the same thing with the regular wine: wine <notepad.exe>. If the regular wine still has those error messages, then it's probably something else in the system that's causing the problem.
  2. Verify it's not a vulkan issue with https://wiki.archlinux.org/title/Vulkan#Verification. Please share the output of vulkaninfo --summary. I don't think it's a vulkan-related issue, but just to be safe.
  3. If you have another computer that you can test on, see if the same issue can be reproduced.

Finally, if there aren't any new clues or progress after trying out the above, please share:

  1. The output of (re)installing and launching the game with the -v option.
  2. The output of pacman -Qi leagueoflegends-git.
  3. The list of installed packages (including the versions) that you think may be remotely related to the issue.

But for now, I'm not really sure what went wrong. More information would be helpful, especially if someone else can reproduce the issue.

kyechou commented 2 years ago

@trainzkid, so I've been searching for similar issues, but haven't found anything useful, though one thing is to make sure the wine that you're using is actually wine-lol (which is GloriousEggroll's patch). One should be able to tell once you share the verbose log output. Good luck

kyechou commented 2 years ago

Oh shoot.... I missed an important line in your description. Sorry for the confusion!

Manually git clone and install deps and leagueoflegends-git, as Paru and ChaoticAUR both fail to get deps.

That's highly discouraged. @trainzkid Please install the AUR package to make sure all dependencies are met, and remove any conflicting files that were manually installed. Please share the error or the reason why paru wasn't able to get the dependencies. That'd be the most critical problem. Also, how did you build/install wine-lol?

trainzkid commented 2 years ago

Apparently, finding all the odd, abnormal bugs is my specialty.

I recovered from a backup, because I was having space issues with my home dir thanks to systemd-homed, so I manually recreated my user acc, backed up the home dir to another device (via tar czf), then removed my home dir. Then I did it all in reverse, I created my home dir, moved the backup to this device and extracted it (tar xzf), and changed my user acc's UID to match the one found on my backup (originally set automatically via homed). Messy but it fixed my storage issue, and I've been using it for about a week with apps like steam games (native and proton/windows-based), brave browser, teams, and onlyoffice without issue. League was the only app that didn't wanna work right (so far), so I uninstalled and reinstalled to no avail. I did have to uninstall and reinstall steam (and installed games from steam) to get around any storage issues during the backup, and steam does use proton for win apps, but your league implementation uses wine-lol afaik, so I wouldn't think there'd be any crossover there.

  1. I ran leagueoflegends run wine notepad.exe and didn't experience any strange behavior or errors, not sure what other apps might be a good idea to try (I don't use win much anymore lol).

  2. vulkaninfo.log

  3. I have a headless server I installed it to, but I ran into xforwarding errors, so not much I can check there, see below ("On the other machine").

  4. So I ran leagueoflegends install -v and it generated the exact same output as it did without -v, so I'm guessing there's an order or something. I'll give it another try once the sysupgrade is finished.

  5. pacm_lol-git.log

  6. lol-git-deps.log

On the other machine, the headless Arch server I attempted to install this on to verify that this wasn't an issue exclusive to my machine, I received deps errors when trying to install from AUR via paru, but I just had forgotten to enable the multilib repo. After that correction, it installed there just fine (the paru part of install), but as I figured, I get what I imagine are likely xforwarding errors when trying to run leagueoflegends install: Error: couldn't find RGB GLX visual or fbconfig so that's about all I can do there.

This obviously doesn't occur on the desktop I'm trying to successfully run league on, as most of the packages are cached via pacman or paru. I did try to force a reinstall of leagueoflegends-git and wine-lol by removing the cached dirs in ~/.cache/paru/clone, but that didn't make any difference, the errors I receive when trying to install league remain.

Rebooting following sysupgrade as we speak, standby..

trainzkid commented 2 years ago

So every wine: Unhandled exception.. appears to be associated with image, as every time it spits that into the output, those error messages appear.

Also, the sysupgrade and reboot didn't make any difference unfortunately. Here's the verbose output from leagueoflegends --verbose install: lol_inst.log

See anything obvious? I could try another uninstall+reinstall combo if you think it'll help, unless that's what leagueoflegends install does when the app is already installed.

kyechou commented 2 years ago

Thanks @trainzkid! Could you please run the following commands:

$ leagueoflegends run which wine
$ leagueoflegends run sh -c 'echo $PATH'
kyechou commented 2 years ago

I should've probably made the parameter parsing more robust...

kyechou commented 2 years ago
$ leagueoflegends run which wine
$ leagueoflegends run sh -c 'echo $PATH'

Ok, so if the output of those two commands doesn't look right (i.e., not using the correct wine-lol binary), then ignore the following paragraph.

I just pushed a new commit regarding the ordering of verbose output. If you have time, it'd be helpful to first update the leagueoflegends-git package, and then do leagueoflegends -v reinstall and then leagueoflegends -v start.

kyechou commented 2 years ago

I made an error in the previous commit...

trainzkid commented 2 years ago

ryan@Orion ~> leagueoflegends --verbose reinstall [!] Unknown command: --verbose

uh....

That's with leagueoflegends-git 12.16.r12.g1f4def1-1..

kyechou commented 2 years ago

Right, give me one sec.

kyechou commented 2 years ago

Ok, please try again now (with the new commit)

kyechou commented 2 years ago

Reminder: please share the output of those two commands. They should run even without installing the game.

$ leagueoflegends run which wine $ leagueoflegends run sh -c 'echo $PATH'

trainzkid commented 2 years ago

Oops, sorry, I checked before but didn't say anything, they didn't look abnormal from what I can tell: ryan@Orion ~> leagueoflegends run which wine /opt/wine-lol/bin/wine

ryan@Orion ~> leagueoflegends run sh -c 'echo $PATH' /opt/wine-lol/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

lol_reinst_r13.log That doesn't look quite right either..

kyechou commented 2 years ago

lol_reinst_r13.log That doesn't look quite right either..

That argument parsing thing should be fixed now. But I'm still not sure why there are those errors. It'd be great if you could try again with the fixed version.

trainzkid commented 2 years ago

Ah, that worked, though it error'd out. Looks like we found a possible culprit: Executing cabextract -q --directory=/home/ryan/.local/share/leagueoflegends/dosdevices/c:/windows/temp/win32 /home/ryan/.cache/winetricks/ucrtbase2019/vc_redist.x86.exe -F a10 /home/ryan/.cache/winetricks/ucrtbase2019/vc_redist.x86.exe: No such file or directory

lol_reinst_r14.log

How do I go about installing whatever vc_redist.x86.exe is for wine-lol/winetricks/the lol prefix?

kyechou commented 2 years ago

That's great news! Let me look into it..

kyechou commented 2 years ago

This issue seems to be related: https://github.com/Winetricks/winetricks/issues/1770

I'd suggest:

  1. rm -rf ~/.cache/winetricks and then reinstall the game. Hopefully that'll fix the problem.
  2. If that doesn't work, try rm -rf ~/.cache/winetricks, leagueoflegends uninstall, and then modify /usr/bin/leagueoflegends to replace vcrun2019 with vcrun2017. Then install the game again.
kyechou commented 2 years ago

Please let me know if either of those works. I'll see there's a proper solution to the caching issue.

trainzkid commented 2 years ago
  1. No luck, same error as before.
  2. This worked, I replaced one line in /usr/bin/leagueoflegends/ and it installed and started up to the league client window. It's currently downloading an update, so I'll test a match via the practice tool later, but this looks resolved (at least until I update leagueoflegends-git in the future).

Thanks for your help!!

trainzkid commented 2 years ago

Confirmed this solution works, loaded into a practice match without issue.

kyechou commented 2 years ago

Reopening the issue for this shouldn't happen.. and before we can solve the root cause.

According to https://github.com/Winetricks/winetricks/pull/1777, installing vcrun2019 shouldn't extract ucrtbase. @trainzkid, would you mind checking the version of the winetricks that was used when the error occurred? More importantly, if the version of winetricks you were using includes that PR.

Edit: You can get it with leagueoflegends run winetricks --version

trainzkid commented 2 years ago

Looks like I had winetricks-git 20220411.r67.gb666e05a-1 both when the issue was occurring and now (after the sysupgrade performed yesterday). Where would I look to verify that that version includes that PR? I see that b0210c3 was the commit into winetricks' master branch on Jun 15, 2021, but the lines I see they removed during that commit are still present in my winetricks binary: winetricks-ucrtbasedll.log

kyechou commented 2 years ago

I think I understand now... The line that was causing the errors is: https://github.com/Winetricks/winetricks/blob/b666e05a0bf28fd940e5c258ccdfc0a2799d1948/src/winetricks#L13086. It's in winetricks-git but not yet released.

trainzkid commented 2 years ago

Is that line present in the non-git version of winetricks? If not, is using the git version of winetricks necessary instead of the (theoretically more stable) non-git winetricks?

kyechou commented 2 years ago

No, the line is not in the released version yet. And no, using the git version is not necessary.

But also, I just tried winetricks-git and I didn't encounter any issue... ucrtbase2019 was loaded just fine.

leagueoflegends -v install ``` Executing w_do_call ucrtbase2019 Executing mkdir -p /home/kyc/.league Executing load_ucrtbase2019 Using native,builtin override for following DLLs: ucrtbase Executing wine C:\windows\regedit.exe /S C:\windows\Temp\override-dll.reg grep: warning: stray \ before / Executing mkdir -p /home/kyc/.cache/winetricks/ucrtbase2019 Executing cd /home/kyc/.cache/winetricks/ucrtbase2019 Downloading https://web.archive.org/web/20210415064013/https://download.visualstudio.microsoft.com/download/pr/85d47aa9-69ae-4162-8300-e6b7e4bf3cf3/14563755AC24A874241935EF2C22C5FCE973ACB001F99E524145113B2DC638C1/VC_redist.x86.exe to /home/kyc/.cache/winetricks/ucrtbase2019 --2022-11-21 11:32:34-- https://web.archive.org/web/20210415064013/https://download.visualstudio.microsoft.com/download/pr/85d47aa9-69ae-4162-8300-e6b7e4bf3cf3/14563755AC24A874241935EF2C22C5FCE973ACB001F99E524145113B2DC638C1/VC_redist.x86.exe Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt' Resolving web.archive.org (web.archive.org)... 207.241.237.3 Connecting to web.archive.org (web.archive.org)|207.241.237.3|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 14327344 (14M) [application/octet-stream] Saving to: ‘VC_redist.x86.exe’ VC_redist.x86.exe 31%[===================================> VC_redist.x86.exe 100%[================================================================>] 13.66M 3.65MB/s in 3.7s 2022-11-21 11:32:40 (3.65 MB/s) - ‘VC_redist.x86.exe’ saved [14327344/14327344] Executing cd /home/kyc/.cache/winetricks/vcrun2019 Executing cabextract -q --directory=/home/kyc/.league/leagueoflegends/dosdevices/c:/windows/temp/win32 /home/kyc/.cache/winetricks/ucrtbase2019/VC_redist.x86.exe -F a10 Executing cabextract -q --directory=/home/kyc/.league/leagueoflegends/dosdevices/c:/windows/system32 /home/kyc/.league/leagueoflegends/dosdevices/c:/windows/temp/win32/a10 -F ucrtbase.dll /home/kyc/.league/leagueoflegends/dosdevices/c:/windows/temp/win32/a10: WARNING; possible 9136 extra bytes at end of file. Executing wine winecfg -v win7 wineserver: using server-side synchronization. ```
kyechou commented 2 years ago

This is the commit that added the new verb: https://github.com/Winetricks/winetricks/commit/cb1e6611df1b3e4e8a025409f87b7fa5bd6b2d9e

kyechou commented 2 years ago

So to actually debug the issue (if you want of course), you'd need to check and see why this function wasn't working for you. For example, can you access those links?

kyechou commented 2 years ago

But either way, I'd suggest using the release version instead of the git version if not necessary.

trainzkid commented 2 years ago

I'm able to access both links in that function, but I wonder if they give up if network connectivity is spotty. I occasionally have dodgy internet. I would think it would be something else though if it was failing multiple times, rather than just once, unless that function is only attempted once or something, or maybe an assumption was made during one of the updates.. very strange.

As for using the release version, the AUR record for leagueoflegends-git requires winetricks-git if I'm not mistaken, so I think that's where the git version came from. If I install the release version, it'll just reinstall the git version once I try to update leagueoflegends-git methinks, correct me if I'm wildly inaccurate.

Edit: I am mistaken.

kyechou commented 2 years ago

I would think it would be something else though if it was failing multiple times, rather than just once, unless that function is only attempted once or something, or maybe an assumption was made during one of the updates..

Yeah, but we'll need to see the verbose log output to know for sure. But for now it looks like there isn't anything in this repo that needs fix. The winetricks upstream looks fine too. And yes, I think we changed the dependency back to winetricks about 7 months ago.

trainzkid commented 2 years ago

Ah, found it, required by protontricks. Looks like I've got orphaned packages chilling around. Thanks for the help! Let me know if there's anything else you'd like me to try now that we've got a bit of an idea what went wrong and how to prevent it.

kyechou commented 2 years ago

Thanks @trainzkid! Documenting the issue below and closing.

For anyone who happen to have the same issue

This is the log output showing the problem: lol_reinst_r14.log

For some reason winetricks didn't try to download ucrtbase2019 as shown at https://github.com/Winetricks/winetricks/blob/b666e05a0bf28fd940e5c258ccdfc0a2799d1948/src/winetricks#L13107, maybe because of caching or spotty Internet connection.

Temporary workaround (not ideal, will be overwritten on the next update):

However, if you can reproduce the issue deterministically multiple times. Please create a new issue and link this one as a reference, provide the verbose log output and the list of packages required by or relevant to leagueoflegends-git (as well as other information according to the issue template).