Skip to content
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

Weird execution stop with nested luaj function calls #109

Open
UltraBlackLinux opened this issue Feb 13, 2023 · 0 comments
Open

Weird execution stop with nested luaj function calls #109

UltraBlackLinux opened this issue Feb 13, 2023 · 0 comments

Comments

@UltraBlackLinux
Copy link

UltraBlackLinux commented Feb 13, 2023

Hey there,
I'm currently working on a library that exposes some features of a game to lua scripts.
The issue that I'm facing somehow has to do with my custom luaj library. Whenever I call a function from my library (weirdly enough not my custom print though), luaj just stops executing all the following lines.
I already tried removing \ns from the input string, but that sadly did not solve anything.
Does anyone have an idea, what could be the problem here? LuaJ does not appear to throw any errors when it stops.

The library is assembled here: https://chonkyrabbit.eu/git/luaprocessors.git/tree/src/luaprocessors/lua/LuaExecutor.java#n151
The code gets executed here: https://chonkyrabbit.eu/git/luaprocessors.git/tree/src/luaprocessors/lua/LuaExecutor.java#n66

Just for completeness, here an example snippet:

print(mindustry.env.getTick())
mindustry.world.io.message.print("message1", mindustry.env.getTick()) # Not executed
print("test") # Not executed

Can anyone explain this?
Thanks!

Edit: I found a weird edge-case (which works)

v = mindustry.env.getTick()
mindustry.world.io.message.print("message1", v)
print(v)
@UltraBlackLinux UltraBlackLinux changed the title Weird execution stop with custom library Weird execution stop with nested luaj function calls Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant