blt4linux / blt4l

PAYDAY 2 SteamOS/Linux LUA loader.
Other
57 stars 14 forks source link

Lua: SystemFS:list missing #96

Closed Kazenin closed 6 years ago

Kazenin commented 6 years ago

Hello friends,

I tested this new mod and this log appeared:

09:23:42 PM Lua: [BLT] Setting up mod: Void UI
09:23:42 PM Error: LUAErrRun loading LUA file mods/Void UI/main.lua
09:23:42 PM Error: attempt to call a string value

How Can I fix this?

RomanHargrave commented 6 years ago

check that it's not a case sensitivity problem

Kazenin commented 6 years ago

Hello @RomanHargrave,

I changed from mods/Void UI/Main.lua to mods/Void UI/main.lua and this log appeared:

09:43:14 PM Error: lua_call: error in lua_pcall: mods/Void UI/main.lua:304: attempt to call method 'list' (a nil value)
09:43:14 PM Error: lua_call: error in lua_pcall: [string "lib/setups/setup.lua"]:753: attempt to index field 'weapon_factory' (a nil value)
09:43:14 PM Error: lua_call: error in lua_pcall: [string "lib/setups/setup.lua"]:803: attempt to index global 'game_state_machine' (a nil value)
RomanHargrave commented 6 years ago

at that point, it looks like the mod expects things that have either been removed or are not present in BLT, or you are missing dependencies

Kazenin commented 6 years ago

I don`t have idea...

RomanHargrave commented 6 years ago

since BLT is (primarily) only responsible for facilitating the execution of new scripts in the preexisting lua environment, script errors that aren't related to BLT API calls are not within the scope of BLT

RomanHargrave commented 6 years ago

Though game_state_machine is, IIRC, a common global. Are other plugins working?

ZNixian commented 6 years ago

@Kazenin You could try building my work-in-progress error.txt-supporting version (ZNixian/blt4l, and check the error.txt file in mods/logs for a stack trace.

Kazenin commented 6 years ago

@RomanHargrave yes, other plugins I use are working. @ZNixian how to proceed?

ZNixian commented 6 years ago

@Kazenin As in, how to build it? If you've got it installed, pastebin the error.txt file in your mods/logs folder.

Kazenin commented 6 years ago

Hello @ZNixian. This file does not exist. I have log.txt and <date>_log.txt files

ZNixian commented 6 years ago

@Kazenin They should only be generated after a Lua error, which on my WIP fork should generate a crash.

Kazenin commented 6 years ago

but the game does not crash, I have a black screen, instead

ZNixian commented 6 years ago

@Kazenin Are you using my fork? If not, I can either send you the correct libblt_loader.so or you can compile it yourself:

git clone https://github.com/ZNixian/blt4l.git errorlog-blt4l
cd errorlog-blt4l
git submodule init
git submodule update
mkdir build 
cd build
cmake .. 
make
Kazenin commented 6 years ago

@ZNixian thank you. See the output:

Lua runtime error: mods/Void UI/main.lua:304: attempt to call method 'list' (a nil value)

stack traceback:
    mods/Void UI/main.lua:304: in function 'func'
    mods/base/req/core/Hooks.lua:109: in function 'Call'
    mods/base/lua/MenuManager.lua:11: in function 'init'
    [string "core/lib/utils/coreclass.lua"]:35: in function 'new'
    [string "lib/setups/setup.lua"]:334: in function 'init_managers'
    [string "lib/setups/menusetup.lua"]:229: in function 'init_managers'
    [string "core/lib/setups/coresetup.lua"]:379: in function <[string "core/lib/setups/coresetup.lua"]:278>
ZNixian commented 6 years ago

Okay, found it. It's trying to use SystemFS:list.

@RomanHargrave Is there a substitute in the IO library?

Reopening as this is a problem with BLT.

RomanHargrave commented 6 years ago

no, we currently do not have a SystemFS:list implementation.

The fact that it is yet to be implemented still may be due to the return type being effectively opaque to us (e.g. we cannot create it or interact with it), though there is a chance that may not be the case. I know I had it on the list of SystemFS functions needed in BLT4L.

BangL commented 6 years ago

this might help: http://download.paydaymods.com/download/latest/556

Kazenin commented 6 years ago

@BangL thanks for your help. I tried this one but I had these results:

Log:

05:30:12 PM Error: mods/Void UI/main.lua:87: attempt to call method 'create_entry' (a nil value)
05:30:12 PM Lua: [Error] mods/Void UI/main.lua:87: attempt to call method 'create_entry' (a nil value)

Image from my game Original Image

BangL commented 6 years ago

which means it fixed the problem. this is a new one.

I guess its using DB:create_entry there? its used to load images at runtime. this isn't possible on linux yet, and therefore can't really be fixed for now, only surpressed.

On 6 Oct 2017 00:40, "Kazenin" notifications@github.com wrote:

@BangL https://github.com/bangl thanks for your help. I tried this one but I had these results:

Log:

05:30:12 PM Error: mods/Void UI/main.lua:87: attempt to call method 'create_entry' (a nil value) 05:30:12 PM Lua: [Error] mods/Void UI/main.lua:87: attempt to call method 'create_entry' (a nil value)

Image from my game: https://pasteboard.co/GNAl9ED.png Original Image: https://goo.gl/Qvw3gH

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/blt4linux/blt4l/issues/96#issuecomment-334611748, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhp6Pge3Zv8swoIiYmF0Tim0GEDHsomks5spVrDgaJpZM4PtBSa .

BangL commented 6 years ago

its basically the same problem as this one: #70

ZNixian commented 6 years ago

@BangL Since this issue was originally about SystemFS:list, we might as well use it for that. I'll rename the issue.

fangedhex commented 6 years ago

Hello, I'm one of the developer of Void UI (the mod that use SystemFS:list function). We are aware of this bug : this part of our code is to load our custom texture we use for our hud.

So I will follow this discussion to know when this bug can be fixed :)

EDIT : Btw, we already fixed the "Case Sensitive" bug

dribbleondo commented 6 years ago

Did some messing about and VoidUI works =D. Tried loading the custom heist: Enemy Spawner but it crashes as you get to the briefing screen (the "ready up screen" before the heist).

Lua runtime error: [string "core/lib/utils/dev/editor/coreworlddefinition..."]:249: attempt to index field 'world_data' (a nil value)

stack traceback:
    [string "core/lib/utils/dev/editor/coreworlddefinition..."]:249: in function 'parse_continents'
    [string "core/lib/utils/dev/editor/coreworlddefinition..."]:44: in function 'WorldDefinition_init'
    mods/BeardLib/Hooks/CoreWorldDefinition.lua:10: in function 'WorldDefinition_init'
    mods/BeardLib/Hooks/CoreWorldDefinition.lua:10: in function 'init'
    [string "lib/utils/dev/editor/worlddefinition.lua"]:6: in function 'init'
    [string "core/lib/utils/coreclass.lua"]:35: in function 'new'
    [string "core/lib/utils/dev/editor/worldholder.lua"]:49: in function 'init'
    [string "core/lib/utils/coreclass.lua"]:35: in function 'new'
    [string "lib/setups/gamesetup.lua"]:633: in function 'init_game'
    [string "core/lib/setups/coresetup.lua"]:402: in function <[string "core/lib/setups/coresetup.lua"]:278>`` 
Kazenin commented 6 years ago

@dribbleondo all custom heists are crashing with BLT4L

ZNixian commented 6 years ago

BeardLib is somewhat of a mess; this does not particularly surprise me.

RomanHargrave commented 6 years ago

@Fanged-Hex @Kazenin @BangL closing unresolved WRT satisfactory fixes from BangL's ioc mod. Reopen if needed.

WRT BangL's IO compatibility mod, we should investigate shipping it with BLT4L for the time being. That's not to say it would be ideal to ultimately share the SystemFS implementation with windows for perfect compatibility.