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

Sleeping in profile.lua prevents compilation of the command line #235

Closed
Adrodoc opened this issue May 16, 2019 · 3 comments · Fixed by #245
Closed

Sleeping in profile.lua prevents compilation of the command line #235

Adrodoc opened this issue May 16, 2019 · 3 comments · Fixed by #245
Assignees
Labels

Comments

@Adrodoc
Copy link
Member

Adrodoc commented May 16, 2019

When a spell falls asleep while loading standard modules such as Vec3.lua or the profile.lua or shared-profile.lua then the command line is never compiled and the spell terminates once the loading finishes.

To reproduce this bug simply add sleep(1) to your profile.lua and try to cast a spell.

@Adrodoc Adrodoc added the bug label May 16, 2019
@Adrodoc
Copy link
Member Author

Adrodoc commented May 16, 2019

Note that this can also happen due to autosleep if the loading takes longer than the configured lua ticks limit.

@Adrodoc
Copy link
Member Author

Adrodoc commented May 29, 2019

When we fix this bug we should also be able to remove the lower bound of luaTicksLimit in the general config.

@Adrodoc
Copy link
Member Author

Adrodoc commented Jun 13, 2019

Probably the easiest solution would be to load the shared-profile.lua and profile.lua by adding 2 calls to require at the start of the command line (without a line break to preserve line numbers in stack traces). Other modules such as Vec3 should be loaded before the allowance starts ticking, so that there is no difference between modules implemented in Lua and modules implemented in Java.

@Adrodoc Adrodoc self-assigned this Jun 18, 2019
@Adrodoc Adrodoc mentioned this issue Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant