Open i30817 opened 5 years ago
lua plugin is severely outdated, which may be a reason, or one of them.
The short freeware game 'Salt' by the makers of primordia has the same error.
Here is the game: https://plnehry.idnes.cz/salt-recenze-c93-/Download.aspx?id=D131027_996267
Running same version of the engine but with original windows agslua.dll from the game package actually works. So I guess there's an inconsistency in lua plugin. Perhaps the sources are either newer or older. I recall we had continious trouble with lua plugin which had numerous updates and some did not work correctly.
all the way down has (according to exiftool)
a original lua5.1.dll
of version:
File Version Number : 5.1.4.0
Product Version Number : 5.1.4.0
File Version : 5.1.4
and a agslua.dll doesn't have a version (ofc).
diff proves both dlls are the same on both games, so if one is solved, both are (though i don't know of other games using the lua plugin that might get broken). I agree that the incompatibility is likely to be in agslua, not lua5.1 dlls.
'Barely Floating' is another game with a lua dependency that breaks.
Plugin 'agslua' could not be loaded (expected 'libagslua.so'), trying built-in plugins...
No placeholder functions for the plugin 'agslua' found. The game might fail to load!
Loading game failed with error:
Script link failed.
Runtime error: unresolved import 'LuaValueList::Add^1'.
and if we place libagslua.so
(and considering that lua5.1 is installed as part of the system) on the game dir:
Plugin 'agslua' loaded as 'libagslua.so', resolving imports...
An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.5.0.13)
Error: [Lua] attempt to call a string value
Anyway, i always remove lua5.1 package after trying this. I don't think depending on the user to install lua would be the right move even if it worked.
Error: [Lua] attempt to call a string value
sounds like a debugging session is due
I mentioned this above, lua plugin was in development and had several versions. I believe one should begin with a research to find out which version is currently referenced in our repository (it is linked as submodule), and which versions are used in these games, if plugin is backwards compatible, and so on.
Error: [Lua] attempt to call a string value
Question also is, whether this is an error caused by incompatibility between lua scripts in game and plugin or by incompatibility between lua plugin and a new engine.
Wouldn't it be easier to try to adapt the glue plugin to work with the current release of lua5.1? Were people using this plugin actually coding lua scripts/code or just calling bindings?
edit: ninja'ed
The fact that error occurs in all games at startup makes me think it's between the plugin and the dll, but that raises the question of if the game devs could send strings as lua code as part of the plugin interface if they wouldn't screw up in the same way.
Has a likely culprit on the comments: !=
confused for ~=
or maybe this: https://stackoverflow.com/a/35225536/214260
or maybe one of these: https://www.lua.org/manual/5.1/manual.html#7 or these: https://www.lua.org/manual/5.0/manual.html (search for "Incompatibilities with version 4.0")
Error: [Lua] attempt to call a string value
sounds like a debugging session is due
GDB is not helping on this case, even on a debug build -
Error: [Lua] attempt to call a string value
[Thread 0x7fffeffff700 (LWP 12815) exited]
[Thread 0x7ffff59da700 (LWP 12814) exited]
***** ENGINE HAS SHUTDOWN
[Thread 0x7ffff43ea700 (LWP 12816) exited]
[Inferior 1 (process 12805) exited with code 0133]
(gdb) bt
No stack.
GDB is not helping on this case, even on a debug build -
yeah, i meant looking for where the error comes from an setting a bp there
Wouldn't you have to build lua51.so for that? Anyway, i'm not that knowledgeable about debugging to do that, my experience is limited to 'build debug, wait for crash, backtrace - so i fear I'll be of little to no help.
though now that i think about, it's obvious why the bt didn't work. The error is in lua, and it's caught and 'handled' by the engine by exiting normally, if with a error, not a crash. And even if info from the crash location in lua was kept, that wouln't necessarily help because the actual code is being assembled either in the agslua plugin or the game code as strings that lua only knows 'appear' from somewhere. Or at least that's what i suspect might happen. Breakpoint in the lua dll then examining the source string to match to parts of agslua may be the only way indeed.
a start could be to modify the lua source code to instead of displaying mentioned error message use abort(); (or even better __asm__("int3");
- that would cause getting a backtrace in gdb, and then the memory contents can be examined
The plugins it needs are
libagslua.so
andlibags-spritefont-plugin.so
. They're on the main repo (with another name for libagsspritefont), so just copying a build of them by looking for the .so's in the Plugin dir allows the game to try to start.https://gamejolt.com/games/all-the-way-down/43678 However, it then crashes with
Not a big deal if it's supposed to be incompatible, but just checking.
Speaking of weird games with plugin dependencies, Donnie Darko needs agscreditz.so but it doesn't fail when trying to run it on linux without it (it doesn't have a port, just windows specific source) leading to a runtime crash in game (i'm still not sure if i finished the game or it uses the plugin not on a ending).