TASEmulators / TASEmulators/BizHawk

Accented characters in Bizhawk path can prevent some LUA scripts from loading

Open
#3,970 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Fault is in third-party code Repro: Affects 2.9.1 Tool: Lua Console
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Summary

If Bizhawk is running from a folder with a accented character like é, and LUA scripts loaded that are looking for socket.core functionality are used, it will throw an error about being unable to find DLLs that would otherwise load just fine.

Repro
  1. Create a folder like "Bizhawk Tést"
  2. Put bizhawk files in that folder
  3. Run a game and load a lua script like the connector.lua script from the crowdcontrol-lua.zip attached
  4. Get output errors!

Note: The lua files can be inside the accented folder or not. But if just the lua files are in the accented folder and bizhawk is not, things work fine.

Output
NLua.Exceptions.LuaScriptException: [string "main"]:57: module 'socket.core' not found:
	no field package.preload['socket.core']
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\lua\socket\core.lua'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\lua\socket\core\init.lua'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\socket\core.lua'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\socket\core\init.lua'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\..\share\lua\5.4\socket\core.lua'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\..\share\lua\5.4\socket\core\init.lua'
	no file '.\socket\core.lua'
	no file '.\socket\core\init.lua'
	no file 'H:\CC\Bizhawk Tést\Bizhawk-2.9.1\Lua\socket\core.dll'
	no file 'H:\CC\Bizhawk Tést\Bizhawk-2.9.1\Lua\loadall.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\socket\core.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\..\lib\lua\5.4\socket\core.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\loadall.dll'
	no file 'H:\CC\Bizhawk Tést\Bizhawk-2.9.1\Lua\socket.dll'
	no file 'H:\CC\Bizhawk Tést\Bizhawk-2.9.1\Lua\loadall.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\socket.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\..\lib\lua\5.4\socket.dll'
	no file 'H:\CC\Bizhawk T st\Bizhawk-2.9.1\loadall.dll'
Host env.
  • BizHawk 2.91; Win10/11 Pro

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using a BizHawk installation under a path such as "Bizhawk Tést" and the linked connector.lua script. Trace how Lua loads socket.core and handles the installation path; done means the script loads successfully when BizHawk is located in a folder containing accented characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, lua
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.