ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.73k stars 267 forks source link

Gnome-console-46.0 Breaks Box64 #1403

Closed ricoazzurro closed 5 months ago

ricoazzurro commented 5 months ago

Issue

When testing two games Axiom Verge and Axiom Verge 2 with Goldberg, I found the strange issue, that gnome-console-46.0 breaks known working Box64 games.

My current workaound is using xterm or add export TERM=xterm to start script.

Good log with xterm and error log via gnome-console are listed at bottom.

These two games are known as good. And I never seen the below "Unhandled Exception" before. I reverted box64 to release version, https://github.com/ptitSeb/box64/commit/e42001b2bc030f93bdba582bf12d6eac63fae345 and https://github.com/ptitSeb/box64/commit/45c4117a40e564b84dc8659283b52d92defe86c0 and the above issue remains. So it's not recent non-4k commits to blame.

Then I saw System.Console in the log. So I added export TERM=xterm to the start scripts, and the two games launched! Or launching the two games in xterm also worked.

I am almost sure that when I was at Gnome 45, I didn't see such an issue.

Games

Tested on

Logs

rico [ /opt/games/axiom_verge_2 ]$ ./box64-start.sh 
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Cortex-A55 Cortex-A76 with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 768 MHz
Params database has 61 entries
Box64 with Dynarec v0.2.7 a8866c3 built on Apr  3 2024 08:04:05
BOX64: Detected 48bits at least of address space
Counted 63 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/opt/rustc/bin/:/usr/local/bin/:/usr/bin/:/opt/ant/bin/:/opt/jdk/bin/:/opt/bin/
Looking for ./start.sh
Not an ELF file (sign=#!/b)
Error: Reading elf header of /opt/games/axiom_verge_2/start.sh, Try to launch natively instead
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Cortex-A55 Cortex-A76 with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 768 MHz
Params database has 61 entries
Box64 with Dynarec v0.2.7 a8866c3 built on Apr  3 2024 08:04:05
BOX64: Detected 48bits at least of address space
Counted 65 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/opt/rustc/bin/:/usr/local/bin/:/usr/bin/:/opt/ant/bin/:/opt/jdk/bin/:/opt/bin/
Looking for ./AxiomVerge2
Rename process to "AxiomVerge2"
Using native(wrapped) libm.so.6
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) libbsd.so.0
Error loading needed lib steam_api
Warning: Cannot dlopen("steam_api"/0x3b2d7a10, 101)
Using emulated /opt/games/axiom_verge_2/lib64/libsteam_api.so
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Test
2024-04-03 08:09:23,950 - Initializing SteamAPI.
2024-04-03 08:09:24,177 - SteamAPI Initialized.
Using native(wrapped) libSDL2-2.0.so.0
Using emulated /opt/games/axiom_verge_2/lib64/libFNA3D.so.0
Error loading needed lib libd3dcompiler.so
Warning: Cannot dlopen("libd3dcompiler.so"/0x7fff03071340, 0)
Using native(wrapped) libFAudio.so.0
2024-04-03 08:09:24,540 - Creating Game, version 1.0.29.24319
2024-04-03 08:09:26,382 - Attempting to load Settings.xml
2024-04-03 08:09:26,386 - Load Game:  File Settings.xml doesn't exist.
2024-04-03 08:09:26,386 - Settings object was null; initializing new object.
2024-04-03 08:09:26,389 - Initializing settings data.
2024-04-03 08:09:26,395 - Initializing Settings Data.
2024-04-03 08:09:26,396 - Initializing control mappings.
2024-04-03 08:09:26,422 - Creating Graphics object.
2024-04-03 08:09:26,431 - Creating Graphics Device Manager.
Using native(wrapped) libGL.so.1
FNA3D Driver: OpenGL
OpenGL Renderer: Mali-G610 (Panfrost)
OpenGL Driver: 3.1 Mesa 24.1.0-devel (git-a2d3cdd5f2)
OpenGL Vendor: Mesa
MojoShader Profile: glsl120
2024-04-03 08:09:26,557 - Requesting windowed: 864 x 480
2024-04-03 08:09:26,591 - Device Status: Normal
2024-04-03 08:09:26,592 - Presentation parameters: 864 x 480
2024-04-03 08:09:26,593 -   SurfaceFormat: Color,  DepthStencilFormat: None
2024-04-03 08:09:26,593 -   Presentation Interval: One,  RenderTargetUsage: DiscardContents
2024-04-03 08:09:26,594 -   VSync: True
2024-04-03 08:09:26,604 - Creating global Content Manager.
2024-04-03 08:09:26,608 - Creating Trophy Manager.
2024-04-03 08:09:26,663 - Initializing Leaderboard Manager.
2024-04-03 08:09:26,714 - Initializing Factories.
2024-04-03 08:09:27,006 - Initializing Languages.
2024-04-03 08:09:27,027 - Attempting to add CSV file Content/Text/Hacks.csv
2024-04-03 08:09:27,195 - Attempting to add CSV file Content/Text/Items.csv
2024-04-03 08:09:27,310 - Attempting to add CSV file Content/Text/Messages.csv
2024-04-03 08:09:27,433 - Attempting to add CSV file Content/Text/Notes.csv
2024-04-03 08:09:27,569 - Attempting to add CSV file Content/Text/NPCs.csv
2024-04-03 08:09:27,690 - Attempting to add CSV file Content/Text/Skills.csv
2024-04-03 08:09:27,796 - Attempting to add CSV file Content/Text/UI.csv
2024-04-03 08:09:27,928 - Attempting to add CSV file Content/Text/Dialogue.csv
2024-04-03 08:09:28,690 - Initializing language: English
2024-04-03 08:09:29,186 - Initializing Audio.
Using emulated /opt/games/axiom_verge_2/lib64/libfmodstudio.so.13
Using emulated /opt/games/axiom_verge_2/lib64/libfmod.so.13
Error loading needed lib libfmod_SDL
Warning: Cannot dlopen("libfmod_SDL"/0x3c186450, 101)
Using emulated /opt/games/axiom_verge_2/lib64/libfmod_SDL.so
Using native(wrapped) libasound.so.2
2024-04-03 08:09:29,786 - Done creating Game.
FNA3D Driver: OpenGL
OpenGL Renderer: Mali-G610 (Panfrost)
OpenGL Driver: 3.1 Mesa 24.1.0-devel (git-a2d3cdd5f2)
OpenGL Vendor: Mesa
MojoShader Profile: glsl120
2024-04-03 08:09:29,857 - THRenderTargetPool: Preallocating render target mDrawBuffer, 432 x 240
2024-04-03 08:09:29,866 - THRenderTargetPool: Preallocating render target THGraphics.mUIBuffer, 432 x 240
2024-04-03 08:09:29,868 - Loading content.
2024-04-03 08:09:29,872 - Loading audio content.
2024-04-03 08:09:29,897 - Caught exception trying to load SoundEffect FireWall1; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,899 - Caught exception trying to load SoundEffect TendrilsEmerge; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,900 - Caught exception trying to load SoundEffect TendrilsRetract; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,900 - Caught exception trying to load SoundEffect WallTrace; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,900 - Caught exception trying to load SoundEffect Shards; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,900 - Caught exception trying to load SoundEffect WallTeleportBegin; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,900 - Caught exception trying to load SoundEffect WallTeleportSuccess; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect WallTeleportFailure; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect AirTeleportSuccess; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect Overclock; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect BreathMeter; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect DrillLoop; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,901 - Caught exception trying to load SoundEffect AddressDisruptor; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,902 - Caught exception trying to load SoundEffect IonBeam; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,902 - Caught exception trying to load SoundEffect TriCone; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,902 - Caught exception trying to load SoundEffect DistortionField; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:29,902 - Caught exception trying to load SoundEffect WallTeleportCharge; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:30,078 - Caught exception trying to load SoundEffect RedGooRebirth; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:30,487 - LoadContent: Reapplying Graphics Settings.
2024-04-03 08:09:30,487 - Requesting windowed: 864 x 480
2024-04-03 08:09:30,489 - Device Status: Normal
2024-04-03 08:09:30,489 - Presentation parameters: 864 x 480
2024-04-03 08:09:30,489 -   SurfaceFormat: Color,  DepthStencilFormat: None
2024-04-03 08:09:30,489 -   Presentation Interval: One,  RenderTargetUsage: DiscardContents
2024-04-03 08:09:30,489 -   VSync: True
2024-04-03 08:09:30,490 - Creating sprite batch
2024-04-03 08:09:30,608 - Setting static data colors.
2024-04-03 08:09:30,609 - Done setting static data colors.
2024-04-03 08:09:30,615 - THRenderTargetPool: Found render target THGraphics.PostBuffer1, 432 x 240 usage DiscardContents
2024-04-03 08:09:30,616 - THRenderTargetPool: Found render target THGraphics.PostBuffer2, 432 x 240 usage DiscardContents
2024-04-03 08:09:30,617 - THRenderTargetPool: WARNING! Creating render target THGraphics.PostBuffer3, 1296 x 720
2024-04-03 08:09:30,620 - THRenderTargetPool: WARNING! Creating render target THGraphics.PostBuffer4, 1296 x 720
2024-04-03 08:09:30,624 - THRenderTargetPool: WARNING! Creating render target THGraphics.PostBuffer5, 432 x 240
2024-04-03 08:09:30,625 - THRenderTargetPool: WARNING! Creating render target THGraphics.FinalCompositeBuffer, 1296 x 720
2024-04-03 08:09:30,628 - THRenderTargetPool: WARNING! Creating render target THGraphics.UIBuffer, 432 x 240
2024-04-03 08:09:30,631 - Creating shader Shaders/THBlurShader
2024-04-03 08:09:30,640 - Creating shader Shaders/THBreachShader
2024-04-03 08:09:30,656 - Creating shader Shaders/THBreachBombShader
2024-04-03 08:09:30,659 - Creating shader Shaders/THBreachTransitionShader
2024-04-03 08:09:30,661 - Creating shader Shaders/THColorCorrectionShader
2024-04-03 08:09:30,663 - Creating shader Shaders/THDistortionShader
2024-04-03 08:09:30,665 - Creating shader Shaders/THGateBreakerShader
2024-04-03 08:09:30,666 - Creating shader Shaders/THHallucinationShader
2024-04-03 08:09:30,668 - Creating shader Shaders/THScanlineShader
2024-04-03 08:09:30,991 - Creating shader Shaders/THBackgroundShader
2024-04-03 08:09:30,997 - Creating shader Shaders/THSpriteShader
2024-04-03 08:09:31,001 - Creating shader Shaders/THUIShader
2024-04-03 08:09:31,004 - Creating shader Shaders/THSpineShader
2024-04-03 08:09:31,007 - Creating shader Shaders/THVignetteShader
2024-04-03 08:09:31,611 - (0): Void Initialize()(): Initializing save data.
2024-04-03 08:09:31,670 - THRenderTargetPool: WARNING! Creating render target CompanyLogoState_DrawBuffer, 432 x 240
2024-04-03 08:09:31,720 - Initializing Settings Data.
2024-04-03 08:09:31,726 - Initializing Input.
2024-04-03 08:09:31,816 - Finished loading content.
2024-04-03 08:09:32,124 - Received stats and achievements from Steam.
2024-04-03 08:09:32,130 - Failed to Get Achievement Status for Accessible.  Is the achievement registered with Steam?
2024-04-03 08:09:32,131 - Failed to Get Achievement Status for Amashilama.  Is the achievement registered with Steam?
2024-04-03 08:09:32,131 - Failed to Get Achievement Status for Arms100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,132 - Failed to Get Achievement Status for Breach.  Is the achievement registered with Steam?
2024-04-03 08:09:32,132 - Failed to Get Achievement Status for BubbleBreaker.  Is the achievement registered with Steam?
2024-04-03 08:09:32,132 - Failed to Get Achievement Status for BullDrone.  Is the achievement registered with Steam?
2024-04-03 08:09:32,132 - Failed to Get Achievement Status for ButtonMasher.  Is the achievement registered with Steam?
2024-04-03 08:09:32,132 - Failed to Get Achievement Status for Demolitionist.  Is the achievement registered with Steam?
2024-04-03 08:09:32,133 - Failed to Get Achievement Status for Hack.  Is the achievement registered with Steam?
2024-04-03 08:09:32,133 - Failed to Get Achievement Status for Hacker.  Is the achievement registered with Steam?
2024-04-03 08:09:32,133 - Failed to Get Achievement Status for Health100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,133 - Failed to Get Achievement Status for HunterDrone.  Is the achievement registered with Steam?
2024-04-03 08:09:32,134 - Failed to Get Achievement Status for IndraApocalypse.  Is the achievement registered with Steam?
2024-04-03 08:09:32,134 - Failed to Get Achievement Status for Items100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,134 - Failed to Get Achievement Status for LowPercent.  Is the achievement registered with Steam?
2024-04-03 08:09:32,134 - Failed to Get Achievement Status for Map100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,134 - Failed to Get Achievement Status for MostlyInvincible.  Is the achievement registered with Steam?
2024-04-03 08:09:32,135 - Failed to Get Achievement Status for Notes100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,135 - Failed to Get Achievement Status for Overclocked.  Is the achievement registered with Steam?
2024-04-03 08:09:32,135 - Failed to Get Achievement Status for Pacifist.  Is the achievement registered with Steam?
2024-04-03 08:09:32,135 - Failed to Get Achievement Status for Robopede.  Is the achievement registered with Steam?
2024-04-03 08:09:32,135 - Failed to Get Achievement Status for Roborb.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for SerpentDrone.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for Skills100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for SkyDrone.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for Speedrunner.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for Weapons100.  Is the achievement registered with Steam?
2024-04-03 08:09:32,136 - Failed to Get Achievement Status for WeedWhacker.  Is the achievement registered with Steam?
2024-04-03 08:09:32,137 - Failed to Get Achievement Status for NONE.  Is the achievement registered with Steam?
2024-04-03 08:09:32,137 - Finished updating 0 trophies.
2024-04-03 08:09:32,157 - [1104 - LeaderboardFindResult] - 1 -- 1
2024-04-03 08:09:32,191 - [1104 - LeaderboardFindResult] - 2 -- 1
2024-04-03 08:09:32,194 - [1104 - LeaderboardFindResult] - 3 -- 1
2024-04-03 08:09:32,196 - [1104 - LeaderboardFindResult] - 4 -- 1
2024-04-03 08:09:32,201 - [1104 - LeaderboardFindResult] - 5 -- 1
2024-04-03 08:09:32,202 - [1104 - LeaderboardFindResult] - 6 -- 1
2024-04-03 08:09:38,031 - THRenderTargetPool: Free render target , 432 x 240
2024-04-03 08:09:39,448 - Caught exception trying to load SoundEffect LaserWhipDeep; Result: ERR_EVENT_NOTFOUND
2024-04-03 08:09:39,618 - THRenderTargetPool: Found render target TitleState_DrawBuffer, 432 x 240 usage DiscardContents
2024-04-03 08:09:39,969 - TitleState.Initialize() - User already signed in.  Loading settings.
2024-04-03 08:09:39,974 - Attempting to load Settings.xml
2024-04-03 08:09:39,975 - Load Game:  File Settings.xml doesn't exist.
2024-04-03 08:09:39,975 - Settings object was null; initializing new object.
2024-04-03 08:09:39,976 - Initializing Settings Data.
2024-04-03 08:09:39,976 - Requesting windowed: 864 x 480
2024-04-03 08:09:39,977 - Device Status: Normal
2024-04-03 08:09:39,977 - Presentation parameters: 864 x 480
2024-04-03 08:09:39,977 -   SurfaceFormat: Color,  DepthStencilFormat: None
2024-04-03 08:09:39,977 -   Presentation Interval: One,  RenderTargetUsage: DiscardContents
2024-04-03 08:09:39,977 -   VSync: True
2024-04-03 08:09:39,988 - Initializing Input.
Thread 0xffff76ccef00 may have been prematurely finalized
Thread 0xffff76ccef00 may have been prematurely finalized

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: File must be smaller than 4K at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0001d] in :0 at System.TermInfoDriver..ctor (System.String term) [0x00055] in :0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in :0 at System.ConsoleDriver..cctor () [0x0004d] in :0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in :0 at System.Console..cctor () [0x0007d] in :0 --- End of inner exception stack trace --- at OuterBeyond.Program.Main (System.String[] args) [0x00083] in <5580ea07a27c46389bb78582f5d239ff>:0 [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: File must be smaller than 4K at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0001d] in :0 at System.TermInfoDriver..ctor (System.String term) [0x00055] in :0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in :0 at System.ConsoleDriver..cctor () [0x0004d] in :0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in :0 at System.Console..cctor () [0x0007d] in :0 --- End of inner exception stack trace --- at OuterBeyond.Program.Main (System.String[] args) [0x00083] in <5580ea07a27c46389bb78582f5d239ff>:0

ptitSeb commented 5 months ago

That's a known issue, not specific to box64. You'll have the same behaviour on native x86_64. They are many FNA/mono games that need TERM=xterm export to work correctly

ricoazzurro commented 5 months ago

OK. But wasn't there before the version 46.0. Close it for now.

ptitSeb commented 5 months ago

I had that issue before with other terminal (mate terminal I think). It's the engine that want to print pretty logs and use the terminal name for configuration and freaks out if the terminal is unknown to it.