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

scriptwrapper.lua seems to erase last character of the first part of the path when searching a package #15691

Open
dufresnep opened this Issue Oct 7, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@dufresnep

dufresnep commented Oct 7, 2018

Issue Summary

scriptwrapper.lua seems to erase last character of the first part of the path when searching
a package. This does it for me for all revisions (tried from mars 2018 to latest bleed).

Example: if my directory is:
paul@paul-OptiPlex-745:~/Téléchargements/OpenRA-bfcbe

Then I get:
Platform is Linux
Engine version is {DEV_VERSION}
Using SDL 2 with OpenGL renderer
Desktop resolution: 1280x1024
No custom resolution provided, using desktop resolution
Using resolution: 1280x1024
Using window scale 1,00
OpenGL version: 3.1 Mesa 18.2.1
Using default sound device
Internal mods:
all: All mods ({DEV_VERSION})
cnc: Tiberian Dawn ({DEV_VERSION})
d2k: Dune 2000 ({DEV_VERSION})
modcontent: Mod Content Manager ({DEV_VERSION})
ra: Red Alert ({DEV_VERSION})
ts: Tiberian Sun ({DEV_VERSION})
External mods:
ra-playtest-20180729: Red Alert (playtest-20180729)
ra-playtest-20180825: Red Alert (playtest-20180825)
ra-release-20180307: Red Alert (release-20180307)
ra-release-20180923: Red Alert (release-20180923)
ra-{DEV_VERSION}: Red Alert ({DEV_VERSION})
Loading mod: ra
Exception of type Eluant.LuaException: [string "scriptwrapper.lua"]:15: module 'sandbox' not found:
no field package.preload['sandbox']
no file '/home/paul/Téléchargements/OpenRA-bfcb/lua/sandbox.lua'
no file './sandbox.so'
no file '/usr/local/lib/lua/5.1/sandbox.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/sandbox.so'
no file '/usr/lib/lua/5.1/sandbox.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
at Eluant.LuaRuntime.Call (System.Collections.Generic.IList`1[T] args) [0x000c9] in :0
at Eluant.LuaRuntime.DoBuffer (System.String str, System.String name) [0x00033

See how it search in no file '/home/paul/Téléchargements/OpenRA-bfcb/lua/sandbox.lua'
where it erassed the e of bfcbe...
again pwd is: /home/paul/Téléchargements/OpenRA-bfcbe
This is at runtime, near the end of initialization of RA mod.

So the workaround I use, is to create a copy of the game, like:
/home/paul/Téléchargements/OpenRA-bfcb (last character removed),
in which I only keep the lua directory.

System Information

  • Operating System: Ubuntu 18.10 beta
  • .NET / Mono Version: Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
  • OpenRA Version: Any
  • Mod: Red Alert
    did not try other
  • Lua: ii liblua5.1-0:amd64 5.1.5-8.1build2 amd64

I see
-- Reset package path
package.path = GameDir .. "/lua/?.lua"
in scriptwrapper.lua (11..12): but I am unsure if and how it is related to the problem.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Oct 7, 2018

Member

This may be triggered by the és in the directory path. Can you please try launching from a path that only uses unaccented letters?

Member

pchote commented Oct 7, 2018

This may be triggered by the és in the directory path. Can you please try launching from a path that only uses unaccented letters?

@dufresnep

This comment has been minimized.

Show comment
Hide comment
@dufresnep

dufresnep Oct 7, 2018

Well seen! I copy the game to my home directory, /home/paul, and it work there without the workaround copy of the directory.

dufresnep commented Oct 7, 2018

Well seen! I copy the game to my home directory, /home/paul, and it work there without the workaround copy of the directory.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Oct 7, 2018

Member

This suggests the problem may be with the unicode handling either in our GameDir path resolution, or inside Lua itself. If it turns out to be in Lua then we have a problem - they seem to have fixed their unicode handling in 5.3, but we are unable to upgrade past 5.1 because 5.2 changed the way that Lua is embedded in other software, breaking compatibility.

Member

pchote commented Oct 7, 2018

This suggests the problem may be with the unicode handling either in our GameDir path resolution, or inside Lua itself. If it turns out to be in Lua then we have a problem - they seem to have fixed their unicode handling in 5.3, but we are unable to upgrade past 5.1 because 5.2 changed the way that Lua is embedded in other software, breaking compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment