Gedemon / Civ6-YnAMP

Yet (not) Another Maps Pack for Civilization VI
184 stars 122 forks source link

Linux crash #56

Open Jau-Al opened 7 years ago

Jau-Al commented 7 years ago

Hello,

I tried other mods, they work. Unfortunately, this one crashes every time, even if I disable any other mod. Every time I try to start a game, the loading screen appears, sean bean tells the story (Ok, it's already a great part in the game :-P ) then :

Segmentation fault (core dumped)
Game removed: AppID 289070 "Sid Meier's Civilization VI", ProcID 613 

I'm under Ubuntu 16.04, nvidia-375 I cloned the git inside ~/.local/share/aspyr-media/Sid Meier's Civilization VI/Mods/

martinkaberg commented 7 years ago

try removing the .git folder

Jau-Al commented 7 years ago

Removed .local/share/aspyr-media/Sid Meier's Civilization VI/Mods/Civ6-YnAMP/.git

nothing changed.

Le 21/02/2017 à 15:02, martinkaberg a écrit :

try removing the .git folder

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gedemon/Civ6-YnAMP/issues/56#issuecomment-281352163, or mute the thread https://github.com/notifications/unsubscribe-auth/AOVatHMV3w0bR9UoyIyuE1-7OW8tAhdDks5reu5bgaJpZM4MFaNx.

-- Jaufré Aligé http://jau-informatique.com 09 60 43 68 30

Gedemon commented 7 years ago

Is there a lua.log on Linux ?

If there is one, could you search for any lines with the word "error" in it ?

Jau-Al commented 7 years ago

Found it !

Why is it calling a windows-like directory ? :-(

Runtime Error: Error opening/reading C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Override\assignstartingplots.lua. stack traceback: [C]: in function 'lInclude' C:\Emu\AppAssets\Base\Assets\maps\continents.lua:17: in function '(main chunk)' [C]: in function '(anonymous)' Lua callstack: Runtime Error: Error loading C:\Emu\AppAssets\Base\Assets\maps\continents.lua.

I'm surprised Mac players are not complaining.

Gedemon commented 7 years ago

Do you have a DLC folder with the game ?

You can try to move the mod there (or in assets/scenarios) as a workaround, but this is a bug with the game, not something the mod can fix.

Jau-Al commented 7 years ago

Nothing works. sob I send a bug report to Aspyr.

Jau-Al commented 7 years ago

It was complicated with support who answered "we don't support mods". After some "explanations", they answered again : No worries. I have added your information to a preexisting bug. I imagine this will be fixed with the next update, but the dev schedule and syncing with PC are a little unpredictable.

Thanks again for your patience.

Vadus commented 7 years ago

Same thing on my ubuntu... To be able to play with TSL I just copied everything but the includes from Override/AssignStartingPlots.lua to Maps/GiantEarth/GiantEarth.lua and placed it right after the getMap() function at the bottom. Then I commented out "include "AssignStartingPlots" on top. Just to be sure I removed the Override folder. With that GiantEarth with TSL works on Linux :)

Jau-Al commented 7 years ago

I checked with Australian Summer update and Steam Workshop : Same thing. I warned (again) Aspyr. To be continued...

Jau-Al commented 7 years ago

Aspyr tells me there is a case problem. I'm trying to rename (every file name to lowercase) all the files and modify the configuration files. Hard task lol.

Jau-Al commented 7 years ago

YnAMP_lowercase.zip

I probably did a mistake, but the crash reason looks different.

Logs.zip

Gedemon commented 7 years ago

I've you tried to just change the case of the only overriden file (IE AssignStartingPlots.lua)

But now that I think of it, if it's a lower case problem, you'll have to search for all "include" in the lua files to change the case of the files included in them...

for example you have an error messge on playeuropeagain.lua in the lua.log, and in that file you have multiple includes:

include "MapEnums"
include "MapUtilities"
include "MountainsCliffs"
include "RiversLakes"
include "FeatureGenerator"
include "TerrainGenerator"
include "NaturalWonderGenerator"
include "ResourceGenerator"
include "AssignStartingPlots"
eshwayri commented 7 years ago

I had the same exact problem. I got the following in Lua.log:

Runtime Error: Error opening/reading C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Override\assignstartingplots.lua. C:\Emu\AppAssets\Base\Assets\maps\continents.lua:17: in function '(main chunk)'

I was certain that it must be a mistake in the code what with those Windows paths. I decided to rename the Override directory to something else (testit) and I got a differnet error:

Runtime Error: C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Maps\GiantEarth\GiantEarth.lua:43: function expected instead of nil C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Maps\GiantEarth\GiantEarth.lua:43: in function 'GenerateMap'

This told me that the game was properly translating those Windows paths into their Unix paths since it was even telling me what line number the error was on. I put the Override directory back and took a closer look at the original error. That is where I noticed it was looking for assignstartingplots.lua (lower case a/s/p) instead of AssignStartingPlots.lua. Windows is case in-sensitive, while Unix is case sensitive. I have no desire to figure out what parts wants to call it with lower case letters, and what parts want to call it with upper. I created a symbolic link for it like so:

ln -s AssignStartingPlots.lua assignstartingplots.lua

thisisi@blade2017:~/.local/share/aspyr-media/Sid Meier's Civilization VI/Mods/Civ6-YnAMP/Override$ ls -al total 168 drwxrwxr-x 2 thisisi thisisi 4096 May 1 01:26 . drwxrwxr-x 8 thisisi thisisi 4096 May 1 01:22 .. lrwxrwxrwx 1 thisisi thisisi 23 May 1 01:26 assignstartingplots.lua -> AssignStartingPlots.lua -rw-rw-r-- 1 thisisi thisisi 160125 Apr 28 14:48 AssignStartingPlots.lua

Game now loads fine with no errors in Lua.log. I haven't had a chance to play more than a couple of turns, but this appears to be an easy "fix" (ie- workaround). This technique can probably be applied to any other files that have case sensitivity issues. It is a lot easier than manually hacking through all those files to change them to lower, and should work just as well.

Jau-Al commented 7 years ago

GREAT IDEA ! I'll try it as soon as posible ! Thank ;-)

Le 01/05/2017 à 07:49, eshwayri a écrit :

I had the same exact problem. I got the following in Lua.log:

Runtime Error: Error opening/reading C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Override\assignstartingplots.lua. C:\Emu\AppAssets\Base\Assets\maps\continents.lua:17: in function '(main chunk)'

I was certain that it must be a mistake in the code what with those Windows paths. I decided to rename the Override directory to something else (testit) and I got a differnet error:

Runtime Error: C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Maps\GiantEarth\GiantEarth.lua:43: function expected instead of nil C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\Civ6-YnAMP\Maps\GiantEarth\GiantEarth.lua:43: in function 'GenerateMap'

This told me that the game was properly translating those Windows paths into their Unix paths since it was even telling me what line number the error was on. I put the Override directory back and took a closer look at the original error. That is where I noticed it was looking for assignstartingplots.lua (lower case a/s/p) instead of AssignStartingPlots.lua. Windows is case in-sensitive, while Unix is case sensitive. I have no desire to figure out what parts wants to call it with lower case letters, and what parts want to call it with upper. I created a symbolic link for it like so:

ln -s AssignStartingPlots.lua assignstartingplots.lua

thisisi@blade2017:~/.local/share/aspyr-media/Sid Meier's Civilization VI/Mods/Civ6-YnAMP/Override$ ls -al total 168 drwxrwxr-x 2 thisisi thisisi 4096 May 1 01:26 . drwxrwxr-x 8 thisisi thisisi 4096 May 1 01:22 .. lrwxrwxrwx 1 thisisi thisisi 23 May 1 01:26 assignstartingplots.lua -> AssignStartingPlots.lua -rw-rw-r-- 1 thisisi thisisi 160125 Apr 28 14:48 AssignStartingPlots.lua

Game now loads fine with no errors in Lua.log. I haven't had a chance to play more than a couple of turns, but this appears to be an easy "fix" (ie- workaround). This technique can probably be applied to any other files that have case sensitivity issues. It is a lot easier than manually hacking through all those files to change them to lower, and should work just as well.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gedemon/Civ6-YnAMP/issues/56#issuecomment-298290180, or mute the thread https://github.com/notifications/unsubscribe-auth/AOVatMD3QtGgppfwBdf7vAk8HJyQq7X3ks5r1XJrgaJpZM4MFaNx.

-- Jaufré Aligé http://jau-informatique.com 09 60 43 68 30

eshwayri commented 7 years ago

Both Windows and Mac by default use case preserving, but case in-sensitive file systems. That is why you wouldn't see a problem on Mac. Linux by default uses case sensitive file systems. You could probably introduce this problem on a Mac if you installed on a partition formatted to be case sensitive. Similarly, you can probably resolve this issue on Linux by installing on a mount configured to be in-sensitive. I don't recommend that. It looks like all you need is a symbolic link for each file in your Override directory. Fairly simple. This isn't really a bug. It seems to be more a question about the naming standard for the game files.

bszonye commented 6 years ago

FYI, you don’t need to change the script names to lowercase in Lua include statements. The Lua engine already seems to handle case (in)sensitivity gracefully. In my own mods, I deal with this just by naming all of the scripts in all-lowercase and matching that in the .modinfo definitions.

aenertia commented 6 years ago

Same issue here - mod authors please sanitize and use relative URI safe file paths and script naming in next release.

Gedemon commented 6 years ago

there are no URL at all in the mod, it's the game's that create the paths.

aenertia commented 6 years ago

File paths are considered URI

Gedemon commented 6 years ago

and the game is creating the full path from the relative path in the mod, just look at the code.

mmstick commented 6 years ago

Another great example of why people should develop games from Linux, and not use brain-dead file systems that are case-insensitive.

Ghotrix commented 5 years ago

In order to make all lua files lowercase you need to run it inside mod directory: for i in $(find . -iname "*.lua"); do ln -s "$(readlink -f $i)" "$(dirname $i)/$( basename $i | awk '{print tolower($0)}')"; done . At least it done it for me.

codebori commented 5 years ago

Since the latest update the create game menu is blank even with the lowercase link fix above. Before the update it worked with that fix. Is there any new file that is not include in that fix?

magistermika commented 5 years ago

@codebori - worked for me after renaming the .xml files as well. The game keeps crashing, but I guess that's the game's fault, not YnAMP's

jyavorska commented 5 years ago

Since the latest update the create game menu is blank even with the lowercase link fix above. Before the update it worked with that fix. Is there any new file that is not include in that fix?

This seems to be the new error:

Test: Test.LUA loaded!
MainMenu: Checking Mods status for MainMenu Media...
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: loading AdvancedSetup for Yet (not) Another Maps Pack...
Runtime Error: \home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua:872: attempt to index a nil value
stack traceback:
        \home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua:872: in function 'Initialize'
        \home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua:892: in function '(main chunk)'
        [C]: in function '(anonymous)'^M
Lua callstack:^M
Error loading file where=, file=\home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua
Runtime Error: \home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua:661: attempt to index a nil value
stack traceback:
        \home\jason\.local\share\Steam\steamapps\workshop\content\289070\871861883\Override\advancedsetup.lua:661: in function 'OnShow'^M
Lua callstack:^M
MainMenu: Checking Mods status for MainMenu Media...
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true

Since that seems to be a new issue, I created https://github.com/Gedemon/Civ6-YnAMP/issues/110.

OneAdder commented 5 years ago

Hi, there way too much info and unclear what works and how.

@Gedemon Could you add instruction into the readme if there is a workaround? If the issue is still present, could you open a new issue with full description of the problem? I (I'm not alone probably) could try to help maintain it for the Linux version

Gedemon commented 5 years ago

I don't have linux, so I can't test the proposed solutions myself, but does this help: https://forums.civfanatics.com/threads/tutorial-getting-mods-to-work-in-linux-most-of-the-steps-are-no-longer-needed.528742/

ferdinandyb commented 4 years ago

One would think making platform agnostic calls to the filesystem should be a no-brainer nowadays ...

OGrigorios commented 3 years ago

Hey, the issue with the blank create game screen is still there. Has anyone found a solution for that? The link posted by Gedemon, did not solve the issue for me.