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

openra: 20180307 -> 20180923 #47545

Merged
merged 4 commits into from Oct 10, 2018
Merged

openra: 20180307 -> 20180923 #47545

merged 4 commits into from Oct 10, 2018

Conversation

nek0
Copy link
Contributor

@nek0 nek0 commented Sep 30, 2018

Motivation for this change

version bump to latest version.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@tomberek
Copy link
Contributor

Builds on NixOS.
Unable to run on Ubuntu, could be a local problem.

@dtzWill
Copy link
Member

dtzWill commented Sep 30, 2018

Unable to run on Ubuntu, could be a local problem.

Did it run before the change? Still useful feedback if you don't know but finding out helps determine if there's a problem in general or in this PR/update :).

@nek0
Copy link
Contributor Author

nek0 commented Sep 30, 2018

Builds on NixOS.
Unable to run on Ubuntu, could be a local problem.

There is a known bug about the game crashing at startup. The temporary workaround is to invoke it like this:

TERM=xterm openra

executable runs under these conditions on my system.

@fusion809
Copy link
Contributor

fusion809 commented Sep 30, 2018

I also tried a simple OpenRA bump (as simple as this pull request, except I bumped the checksums too) on openSUSE Tumbleweed and it crashed on startup, when I selected the RA mod it crashed:

$ result/bin/openra   

(process:3596): Gtk-WARNING **: 00:56:11.910: Locale not supported by C library.
        Using the fallback 'C' locale.
Gtk-Message: 00:56:11.911: Failed to load module "unity-gtk-module"
Gtk-Message: 00:56:11.911: Failed to load module "canberra-gtk-module"
Gtk-Message: 00:56:11.982: GtkDialog mapped without a transient parent. This is discouraged.
exception inside UnhandledException handler: The type initializer for 'System.Console' threw an exception.

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <044e611d6bd84e32a8798850006421d9>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Console..cctor () [0x0008e] in <044e611d6bd84e32a8798850006421d9>:0 
   --- End of inner exception stack trace ---
  at OpenRA.ExceptionHandler.HandleFatalError (System.Exception ex) [0x00197] in <7923173887f64372a7e3f69359ddd855>:0 
  at OpenRA.Program.<Main>m__0 (System.Object _, System.UnhandledExceptionEventArgs e) [0x00006] in <7923173887f64372a7e3f69359ddd855>:0 

. OpenRA installed via my own packages (stable package, bleeding-edge, built from latest git commit) and the official AppImages runs fine, however. Thank you for your efforts to bump this fine game.

@nek0
Copy link
Contributor Author

nek0 commented Sep 30, 2018

@fusion809 this is exactly the error you encounter, when not running with the TERM variable set to xterm. This is a known bug in the mono runtime. See more at mono/mono#6752.

@fusion809
Copy link
Contributor

fusion809 commented Sep 30, 2018

You are so right, setting TERM to xterm gets rid of that error, unfortunately, it is just to allow another one surface:

$ result/bin/openra

(process:1012): Gtk-WARNING **: 02:01:17.342: Locale not supported by C library.
        Using the fallback 'C' locale.
Gtk-Message: 02:01:17.344: Failed to load module "unity-gtk-module"
Gtk-Message: 02:01:17.344: Failed to load module "canberra-gtk-module"
Gtk-Message: 02:01:17.413: GtkDialog mapped without a transient parent. This is discouraged.
Platform is Linux
Engine version is release-20180923
Using SDL 2 with OpenGL renderer
Desktop resolution: 1920x1080
No custom resolution provided, using desktop resolution
Using resolution: 1920x1080
Using window scale 1.00
Exception of type `System.InvalidOperationException`: Can not create OpenGL context. (Error: Invalid window)
  at OpenRA.Platforms.Default.Sdl2GraphicsContext.InitializeOpenGL () [0x00065] in <7b44588b0f7e4dfd9f5e652014f9eff0>:0 
  at OpenRA.Platforms.Default.ThreadedGraphicsContext.RenderThread (System.Object contextObject) [0x0002a] in <7b44588b0f7e4dfd9f5e652014f9eff0>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <044e611d6bd84e32a8798850006421d9>:0 

[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Can not create OpenGL context. (Error: Invalid window)
  at OpenRA.Platforms.Default.Sdl2GraphicsContext.InitializeOpenGL () [0x00065] in <7b44588b0f7e4dfd9f5e652014f9eff0>:0 
  at OpenRA.Platforms.Default.ThreadedGraphicsContext.RenderThread (System.Object contextObject) [0x0002a] in <7b44588b0f7e4dfd9f5e652014f9eff0>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <044e611d6bd84e32a8798850006421d9>:0 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <044e611d6bd84e32a8798850006421d9>:0 

@nek0
Copy link
Contributor Author

nek0 commented Sep 30, 2018

This gets off topic from the scope of this pull request, but it seems that there is no hardware graphics acceleration available on the system you are trying to run the executable with. But this is only a wild guess. You might want to check out the OpenRA issue tracker.

@fusion809
Copy link
Contributor

How would that be an upstream issue if running it via other means (e.g. via ./launch-game.sh after compiling manually, via my aforementioned package and via the official AppImages) goes without an issue?

@nek0
Copy link
Contributor Author

nek0 commented Sep 30, 2018

Well, the scope of this pull request is to bump the version of OpenRA inside the package repository of NixOS, not to fix either the mono runtime or some graphical bug in OpenRA itself. I am neither the maintainer of either of these software solutions nor do I have the required expertise to fix these issues.

Before posting any further bug reports in this pull request, I would recommend using some good old search engine. There are plenty of these at your disposal.

P.S.: After searching for a little while I found a possible fix for your OpenGL Context problem at OpenRA/OpenRA#10597.

@etu
Copy link
Contributor

etu commented Oct 1, 2018

@nek0 I assume that you would need to bump the hash in the src block?

@nek0
Copy link
Contributor Author

nek0 commented Oct 1, 2018

@etu Thanks for pointing that out

@Mic92
Copy link
Member

Mic92 commented Oct 6, 2018

Would it help to add --set TERM "" to wrapProgram $out/lib/openra/launch-game.sh?

@@ -65,6 +65,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/lib/openra/launch-game.sh \
--prefix PATH : "${binaries}" \
--prefix LD_LIBRARY_PATH : "${runtime}"
--set TERM "xterm"
Copy link
Member

@Mic92 Mic92 Oct 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-     --prefix LD_LIBRARY_PATH : "${runtime}"
+     --prefix LD_LIBRARY_PATH : "${runtime}" \
      --set TERM "xterm"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Mic92 Mic92 merged commit fc29f68 into NixOS:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants