BizHawk
BizHawk copied to clipboard
Crash Lua console with manjaro linux
I just installed bizhawk on my manjaro linux system. I opened it over command line and when I tried opening the Lua console there is a null pointer error and the program crashes.
I have tried version 2.9.1
Repro Install Bizhawk (linux) open lua console --> crash
Output
System.NullReferenceException: Object reference not set to an instance of an object
at BizHawk.Client.EmuHawk.LuaConsole.AskSaveChanges () [0x00006] in <828628a610e44fa287bdfc7090f08a57>:0
at BizHawk.Client.EmuHawk.ToolManager+<>c.<AskSave>b__44_0 (BizHawk.Client.Common.IToolForm tool) [0x00000] in <828628a610e44fa287bdfc7090f08a57>:0
at System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].MoveNext () [0x00059] in <6427664c493440c7b5c1ccedf481c620>:0
at System.Linq.Enumerable.All[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00048] in <6427664c493440c7b5c1ccedf481c620>:0
at BizHawk.Client.EmuHawk.ToolManager.AskSave () [0x00039] in <828628a610e44fa287bdfc7090f08a57>:0
at BizHawk.Client.EmuHawk.MainForm.<.ctor>b__6_9 (System.Object o, System.ComponentModel.CancelEventArgs e) [0x00000] in <828628a610e44fa287bdfc7090f08a57>:0
at System.Windows.Forms.Form.OnClosing (System.ComponentModel.CancelEventArgs e) [0x0001c] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.Form.FireClosingEvents (System.Windows.Forms.CloseReason reason, System.Boolean cancel) [0x00007] in <932a27a365f94d128b5f0bdb01499e2b>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form.FireClosingEvents(System.Windows.Forms.CloseReason,bool)
at System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) [0x00035] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.Application.Exit () [0x00005] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.Application.OnThreadException (System.Exception t) [0x0006e] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.NativeWindow.OnThreadException (System.Exception e) [0x00000] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x001d7] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.XplatUIX11.DoEvents () [0x00080] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.XplatUI.DoEvents () [0x00000] in <932a27a365f94d128b5f0bdb01499e2b>:0
at System.Windows.Forms.Application.DoEvents () [0x00000] in <932a27a365f94d128b5f0bdb01499e2b>:0
at BizHawk.Client.EmuHawk.MainForm.CheckMessages () [0x00000] in <828628a610e44fa287bdfc7090f08a57>:0
at BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop () [0x001e4] in <828628a610e44fa287bdfc7090f08a57>:0
at (wrapper remoting-invoke-with-check) BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop()
at BizHawk.Client.EmuHawk.Program.SubMain (System.String[] args) [0x0038c] in <828628a610e44fa287bdfc7090f08a57>:0
Host env. BizHawk 2.9.1: manjaro Linux
Do you have lua 5.4 installed on your system?
Yes, 5.4.6
Possibly related to #3712 (outdated Mono).
I already read that, but it's not my case. I can't open the lua console because the emulator crash.
~~"I can't open the lua console because the emulator crash" would be exactly what 3712 is. An outdated Mono can in fact cause the emulator to crash when opening Lua.~~ No it wouldn't, probably, not sure what I was thinking.
Please list the following:
~~The version of Mono you have installed (mono --version
).~~
What lua .so's are available (ldconfig -p | grep lua
).
I have the same problem (on Arch Linux): the emu runs, but opening the lua console causes a crash with the same error as above (memory locations different, but, otherwise identical). Which also appears to be the same error as #3678 although I'm not sure if that's specifically a Fedora issue.
I'm on the latest mono and I have lua 5.4 available. I'm on BizHawk 2.8 (installed via the aur package—which, btw, didn't work right until I changed the owner of the files to myself)
$ mono --version
Mono JIT compiler version 6.12.0 (makepkg/d9a6e8710b3 Thu Aug 31 10:53:20 UTC 2023)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
Suspend: hybrid
GC: sgen (concurrent by default)
$ ldconfig -p | grep lua
libtexlua53.so.5 (libc6,x86-64) => /usr/lib/libtexlua53.so.5
libtexlua53.so (libc6,x86-64) => /usr/lib/libtexlua53.so
libtexluajit.so.2 (libc6,x86-64) => /usr/lib/libtexluajit.so.2
libtexluajit.so (libc6,x86-64) => /usr/lib/libtexluajit.so
liblua5.2.so.5.2 (libc6,x86-64) => /usr/lib/liblua5.2.so.5.2
liblua5.2.so (libc6,x86-64) => /usr/lib/liblua5.2.so
libluajit-5.1.so.2 (libc6,x86-64) => /usr/lib/libluajit-5.1.so.2
libluajit-5.1.so (libc6,x86-64) => /usr/lib/libluajit-5.1.so
liblua.so.5.4 (libc6,x86-64) => /usr/lib/liblua.so.5.4
liblua.so (libc6,x86-64) => /usr/lib/liblua.so
liblua++.so.5.4 (libc6,x86-64) => /usr/lib/liblua++.so.5.4
liblua++.so (libc6,x86-64) => /usr/lib/liblua++.so
BizHawk 2.8 would predate native lua support for Linux (LuaInterface doesn't work as it relies on a lua dll compiled against CLI/C++ which Mono does not like), the issue you're having is a separate issue resolved with 2.9.
Confirmed upgrading to 2.9.1 fixes the problem for me. (Left a note on the AUR re:what it took for me to get that to work.)
Would you like to take over maintaining the AUR package?
I appreciate the offer, but I don't really know anything about BizHawk nor package maintenance beyond updating hashes and version numbers, so I doubt I could do a good job.
@Ash123495 Does the crash still occur with ba24907d9c87337a6ea7320ed064033bde1d54bc
I was getting this exception with prebuilt 2.9.1 binaries on NixOS. For what it is worth, I am able to open the Lua console after building the current master
branch with nix-shell -A emuhawk
.
Are you talking about the prebuilt binaries in github releases? Those are going to expect the system liblua .so available from whatever package manager the distro uses.
Assuming you meant 2.9.1, it's packaged as nix-build -A emuhawk-2_9_1-bin
(or emuhawk-2_9_1
to build from source; either way Lua works fine).