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-ura: init at 407 #51530

Closed
wants to merge 1 commit into from
Closed

openra-ura: init at 407 #51530

wants to merge 1 commit into from

Conversation

msteen
Copy link
Contributor

@msteen msteen commented Dec 4, 2018

Motivation for this change

Red Alert - Unplugged

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@fusion809
Copy link
Contributor

fusion809 commented Dec 5, 2018

Unfortunately, while this builds fine, this does not run properly on openSUSE Tumbleweed, it crashes on start up with the error:

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) [0x0008d] in /build/mono-5.8.0.108/mcs/class/corlib/System/TermInfoReader.cs:134 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in /build/mono-5.8.0.108/mcs/class/corlib/System/TermInfoReader.cs:97 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in /build/mono-5.8.0.108/mcs/class/corlib/System/TermInfoDriver.cs:164 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in /build/mono-5.8.0.108/mcs/class/corlib/System/ConsoleDriver.cs:73 
  at System.ConsoleDriver..cctor () [0x0004d] in /build/mono-5.8.0.108/mcs/class/corlib/System/ConsoleDriver.cs:57 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00000] in /build/mono-5.8.0.108/mcs/class/corlib/System/Console.cs:136 
  at System.Console..cctor () [0x0008e] in /build/mono-5.8.0.108/mcs/class/corlib/System/Console.cs:130 
   --- End of inner exception stack trace ---
  at OpenRA.ExceptionHandler.HandleFatalError (System.Exception ex) [0x0019c] in <3aae6d275d964adeb94a473301fdd340>:0 
  at OpenRA.Program.<Main>m__0 (System.Object _, System.UnhandledExceptionEventArgs e) [0x00006] in <3aae6d275d964adeb94a473301fdd340>:0 

@msteen
Copy link
Contributor Author

msteen commented Dec 5, 2018

@fusion809 Like we discussed before, the problem has to do with mono when run from a shell. Setting TERM=xterm solves it. I planned to add to the wrapper, but forgot about it. It's now been added to the wrapper. Thank you for reminding me!

@fusion809
Copy link
Contributor

I get an OpenGL error on Arch Linux, even with TERM set to xterm and with me building from your latest commit. Here is the precise error:

Platform is Linux
Engine version is unplugged-cd82382
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 () [0x00066] in <b6146d36c4b243a899f101e937603fa4>:0 
  at OpenRA.Platforms.Default.ThreadedGraphicsContext.RenderThread (System.Object contextObject) [0x0002d] in <b6146d36c4b243a899f101e937603fa4>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/thread.cs:72 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:957 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/thread.cs:87 

[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Can not create OpenGL context. (Error: Invalid window)
  at OpenRA.Platforms.Default.Sdl2GraphicsContext.InitializeOpenGL () [0x00066] in <b6146d36c4b243a899f101e937603fa4>:0 
  at OpenRA.Platforms.Default.ThreadedGraphicsContext.RenderThread (System.Object contextObject) [0x0002d] in <b6146d36c4b243a899f101e937603fa4>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/thread.cs:72 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:957 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in /build/mono-5.8.0.108/mcs/class/referencesource/mscorlib/system/threading/thread.cs:87 

@fusion809
Copy link
Contributor

fusion809 commented Dec 5, 2018

It turns out that the openra Nix package also gets this error on Arch, and it seems to be due to hard-coded OpenGL paths. I tried installing nixGL to fix this. Running nixGLNvidia openra-ura crashes on startup with the error:

Platform is Linux
Engine version is unplugged-cd82382
Using SDL 2 with OpenGL renderer
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  92
  Current serial number in output stream:  93

(and yes openra gets a similar error when started with nixGLNvidia). My graphics card for future reference is NVIDIA GeForce 1050Ti. My host is using the proprietary driver, version 415.18, with kernel 4.19.6. Nix is installing version 390.25. lspci -k | grep nvidia` (which I ran to verify the module in use) returned:

        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

fusion809 added a commit to fusion809/nixpkgs that referenced this pull request Dec 6, 2018
@rardiol
Copy link
Contributor

rardiol commented Dec 23, 2018

Just tested the sp on nixos, seemed fine. As the out of nixos opengl problem also happens to standard openra, then I think we can merge this and fix the non-ura specific opengl issue separately.

@fusion809
Copy link
Contributor

fusion809 commented Dec 23, 2018

One small issue, this package is rather out of date now, the latest uRA is commit no 431 (hash 128dc53741fae923f4af556f2293ceaa0cf571f0).

@fusion809
Copy link
Contributor

@msteen should this PR be closed given #53163?

@msteen
Copy link
Contributor Author

msteen commented Jan 2, 2019

Closing in favor of #53163.

@msteen msteen closed this Jan 2, 2019
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

4 participants