Closed pandaro closed 7 years ago
Update:
i have download last dev spring from git
fresh&clean compiling
all work fine without shard
but if i add shard there are problem
spring crash with this error:
[f=-000001] Loading Skirmish AIs [f=-000001] <SkirmishAI: Shard dev (team 1)>: ShardCPP: Error: Shard CPP tried to boot up a Shard instance, but there was a problem loading boot.lua. There may be errors or issues from this point as a result. [f=-000001] SkirmishAI (ID = 0, team ID = 1) is using cheats! PANIC: unprotected error in call to Lua API (attempt to index a nil value) AL lib: (EE) alc_cleanup: 1 device not closed Errore di segmentazione (core dump creato)
EDIT: there are a debug mode? cant see what going wrong inside boot.lua
Can you run the game in isolation? Running multiple copies of Shard makes it harder to diagnose. And full infolog.txt stack traces
That last message implies that the lua files aren't in the correct location and Shard couldn't find them
Some of the games you've tried so far has had multiple AIs, which makes it difficult to figure out what went wrong
The infolog says Shard couldn't find boot.lua
, are you sure you put the lua code in the correct place? Remember, Shard native can't read inside game archives, it has no access to the VFS.
it's all in the right place, i run: last dev spring with last dev shard; whatever BA(9.46 BAR5866); with shard native, without any modification (vanilla) i have the error; with shardLua, bundled with the game itself i have no error and all work fine so i think the error is inside your recently update.
can you show me the folder structure of your copy of Shard?
mi folder structure is the one become with pr inside a vanilla spring compiling anyway: here
hmmm I made some adjustments to the code that tries to load boot.lua
, it should try to output where it was expecting the file now
i have just update and run error seem fixed, but shard actually do nothing issues can be close, my dev status is up to date, i can follow the development and give you feedback
wait, the system don't crash, but the error persist, new infolog: here
hmmm yes:
[f=-000001] <SkirmishAI: Shard dev (team 0)>: ShardCPP: Error: Shard CPP tried to boot up a Shard instance, but there was a problem loading boot.lua. There may be errors or issues from this point as a result. Shard tried to load from:
[f=-000001] <SkirmishAI: Shard dev (team 0)>:
[f=-000001] <SkirmishAI: Shard dev (team 0)>: ShardCPP: This is usually caused by putting the AI lua files in the wrong place, or putting them inside a game archive where Shard cannot see them.
This is being output by the changes in https://github.com/tomjn/Shard/commit/6737907835529d768237ee872627d0b770c38594
Making it output som more debug information would be useful
After last updates
i try to replace the whole things inside BAR related to spring with the last dev
i catch a erroro when loading shardLua:
Error: Failed to load: ailoader.lua (error = 2, luarules/gadgets/ai/boot.lua, [string "luarules/gadgets/ai/boot.lua"]:4: attempt to call global 'require' (a nil value))
can not understand why require
is not available
EDIT:
i search to fix this problem, a solution is replace require
with VFSInclude(), it works.
After this, raise another problem, Shard crash with this error:
error loop
Ah, I'll switch it to use VFSInclude
, that log also explains what the fakeos
thing was I commented out. Looks like it's another thing to port over from Eronoobos' fork
As an aside, I haven't tested AILoader.lua
myself yet, I couldn't get spring running on my Mac last night and didn't have time to power up my desktop, I'm going to do that later today though
I couldn't get spring running on my Mac last night and didn't have time to power up my desktop, I'm going to do that later today though
no problem, this was just a info
anyway this is the code i have made that cause the loop but resolve the require
problem:
BAR5868.sdd/luarules/gadgets/ai/
if ShardSpringLua then VFS.Include("luarules/gadgets/ai/preload/spring_lua/boot.lua") elseif game_engine then require "spring_cpp/boot" else require "preload/shard_null/boot" end VFS.Include( "luarules/gadgets/ai/ai.lua" ) -- create and use an AI if ShardSpringLua then return ShardAI() else ai = ShardAI() end
Pushed 2 commits that should help, there's likely to be other errors though, the stuff in shard.lua
needs wrangling still
we've both moved on to a common point so I'm going to close this issue out
At moment I'm a bit lost, My situation is this: i have installed springlobby 2 years ago; then installed engine 103.0 via springlobby now the source code of shard is behind the dev version. So in order to test myself PR and your upgrading at the code to see what is change and understand the situation, i try to put the last
data/ai
folder inside my engine installation. The predictable result was a complete fail: when i try to launch a game i receive the fallow error:this is happened with shard dev version, with shardLua bundled with BA work as well.
What do you suggest to do? My goal is try myself PR in order to improve it