streamlink / streamlink-twitch-gui

A multi platform Twitch.tv browser for Streamlink
https://streamlink.github.io/streamlink-twitch-gui/
MIT License
2.66k stars 201 forks source link

Unity games not launching while application running #340

Closed hexdsl closed 7 years ago

hexdsl commented 7 years ago

Description

While Livestreamer-Twitch-GUI is running some (older) Unity based games will not launch from Steam. The games simply show status as 'running' and then returned to the closed state.

Reproduction steps

  1. Load steam
  2. Load Livestreamer-Twitch-GUI
  3. attempt to run game.

Games tested and shown not to launch while Livestreamer-Twitch-GUI is running:

However, the Systemshock Pre-Alpha Demo does run while Livestreamer-Twitch-GUI is running but i believe that it uses a far newer version of Unity engine than most other games.

Environment details (operating system, etc.)

Antergos Linux, all updates installed as of time of posting (11/11/2016 18:00 GMT) Nvidia Proprietary driver (version 375.10) Kernel x86_64 Linux 4.8.7-1-ARCH Desktop Environment XFCE 4.12

Comments, logs, screenshots, etc.

This issue was first discovered by a friend who has replicated this behaviour on Antergos (with LTS kernel) and Ubuntu

I also made a youtube video outlining the issue if that is of help https://youtu.be/Q3ejAGGwK0U

sudoshred commented 7 years ago

I've also experienced this issue with band new clean installs of default Ubuntu 16.04 and Ubuntu 16.10. I also did a fresh install of Antergos, Gnome 3.22.2, Linux kernel 4.8.7-1-ARCH, with the latest version of Livestreamer Twitch Gui, MPV, and Chatty. The video shows the issue perfectly.

bastimeyer commented 7 years ago

Thanks for the report. Interesting issue...

Are there any useful log outputs and does this same problem occur when you are running other NWjs or even Electron applications?

The version that's being used here right now is the NWjs legacy version 0.12.3. The work on the long-awaited NWjs upgrade (#275) is not yet completely finished, but you might want to try building the application off of either the nwjs-upgrade or node-notifier branch (the latter one is an extension to the former one that fixes the notification regressions). Instead, you can also try just downloading and running NWjs >=0.13.0.

The NWjs archives can be found here: https://dl.nwjs.io/

Please be aware that running newer NWjs versions will delete localstorage data of the legacy versions when NWjs is transforming data to the new format. Also, running a newer build than the v0.16.0 release will make the settings incompatible if you're trying to go back afterwards and a cache/config wipe will be necessary.

It's a bit worrisome that I don't see any reported issues on the NWjs repo: https://github.com/nwjs/nw.js/issues?utf8=%E2%9C%93&q=is%3Aissue%20unity

I'd be surprised if this issue is related to the code of this project, though. All that's added to NWjs here is the launch script, which fixes an issue with a missing lib on some distros and the WM_CLASS issue in the legacy versions (also included in both AUR packages): https://github.com/bastimeyer/livestreamer-twitch-gui/blob/v0.16.0/build/resources/linux/start.sh

sudoshred commented 7 years ago

I'm not very well versed in building code myself, but I'd be willing to try things out if you'd like. When attempting to run those games there was pretty much nothing in the logs of the games. The only thing that I saw was "player is already running" for Shadowrun Dragonfall. I'm wondering if this could be a mpv issue, but when Livestreamer Twitch Gui starts up, does it start or prep mpv at all?

I'm more than willing to give you any logs though if you let me know what to gather or try or what you need. Do you know of any well known electron apps I can install really quick and see if they have the same issues?

sudoshred commented 7 years ago

I just installed Atom and Rambox from the AUR. With both open, games are running just fine. But maybe they're using a different version than Livestreamer Twitch GUI is?

bastimeyer commented 7 years ago

I just installed Atom and Rambox

These are both Electron apps and thus unrelated. The nwjs-bin and nwjs-sdk packages in the AUR are using one of the latest NWjs versions (0.18.x), so you can try these or applications that require these packages (eg. signal). gitter also uses NWjs, I believe, but integrated into the package, like here.

I'm not very well versed in building code myself, but I'd be willing to try things out if you'd like

See https://github.com/bastimeyer/livestreamer-twitch-gui/blob/v0.16.0/CONTRIBUTING.md

sudo pacman -S git nodejs npm bower grunt-cli

git clone https://github.com/bastimeyer/livestreamer-twitch-gui.git
cd livestreamer-twitch-gui
git checkout origin/node-notifier

npm install
grunt release

./build/releases/livestreamer-twitch-gui/linux64/start.sh

player is already running

This is a Chromium/Unity related issue. https://www.google.com/#q=chromium+player+is+already+running

This google query also returns a link to a reddit thread which is describing this exact issue, no responses, though: (why do people create reddit threads instead of letting the devs know 😞 ) https://www.reddit.com/r/linux_gaming/comments/54x1l4/unity_games_dont_start_player_already_running/?st=ivehirb0&sh=5311c6a6

Please try one of the newer NWjs versions (custom build or other apps). The Chromium version that's included in legacy NWjs is 44.x (latest is 55.x).

hexdsl commented 7 years ago

Thanks for looking at this issue @bastimeyer

On an unrelated note, do you fancy spending a little bit of time talking to me on YouTube about how great Livestreamer-Twitch-GUI is?

bastimeyer commented 7 years ago

Thanks for looking at this issue

I was actually hoping for some cooperation here, as I don't have access to any of those games. If you don't want to go through the trouble of downloading NWjs or building the application on your own, you can also try running the latest chromium (which might not yield the same results as running NWjs).

talking to me on YouTube

I'm sorry, but I don't want to do something like this. 😊 Thanks for making YT videos, though!

sudoshred commented 7 years ago

I ran through your instructions exactly as you had them above, and running that version of livestreamer still produces the same behaviour with the Unity games "Player is already running" issue.

bastimeyer commented 7 years ago

I'm not sure if NWjs/Chromium is the culprit here. This looks like a bug in Unity3D which is somehow interfering with Chromium when it is checking for already running Unity3D processes.

As you can see, this issue is quite old: https://steamcommunity.com/app/234650/discussions/0/558754899774858118/ https://forums.obsidian.net/topic/73867-starting-game-while-chrome-running/ https://www.gog.com/forum/pillars_of_eternity/player_already_running https://knucklecracker.com/forums/index.php?topic=17352.0

You should let the Unity devs know about this: https://issuetracker.unity3d.com/

If it's not a bug in Unity3D and an upstream bug instead, then please open a new thread on the NWjs repo or Chromium issue tracker. All I can do here is upgrading to the latest NWjs version, nothing more.

sudoshred commented 7 years ago

Thanks! I've opened a forum thread about it, since the only way you can post a bug is through the Unity editor, but that's not available on Linux. But I'll follow up with Unity! Keep up the amazing work bastimeyer!

https://forum.unity3d.com/threads/bug-in-unity-when-running-chrome-on-linux.441253/

bastimeyer commented 7 years ago

I guess this can be closed here, since it's a Unity3D bug and the devs have responded to your report/question. It's the responsibility of the game devs to upgrade their games, which they haven't done yet, unfortunately. 😞