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

Issue restart rather than second lua_main() call on LFS reload. #3668

Open
wants to merge 1 commit into
base: dev-esp32
Choose a base branch
from

Conversation

jmattsson
Copy link
Member

By the time we get informed that there's an LFS reload we've already opened all the user libraries as well (and run their init code), so it's not safe to simply redo that with a fresh lua_State without also starting with a fresh hardware state. Currently attempting to do the second lua_main() call results in a hang, and a manual reset is required to progress. Doing the automatic restart is the correct approach here, even though this adds another reboot to the LFS reload process.

Also fixed up a couple of minor issues when embedded-LFS is used.

Fixes #3667.

  • This PR is for the dev-esp32 branch rather than for the release branch.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • I have thoroughly tested my contribution.
  • The code changes are reflected in the documentation at docs/*.

By the time we get informed that there's an LFS reload we've already
opened all the user libraries as well, so it's not safe to simply redo
that with a new lua_State. Currently that results in a hang, and a
manual reset is required to progress. Doing the automatic restart is
the correct approach here, even though this adds another reboot to the
LFS reload process.

Also fixed up a couple of minor issues when embedded-LFS is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant