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

opening a profile on launch with lua syntax errors kills the program #7128

Open
atari2600tim opened this issue Feb 10, 2024 · 4 comments
Open

Comments

@atari2600tim
Copy link
Contributor

atari2600tim commented Feb 10, 2024

Brief summary of issue / Description of requested feature:

Some lua code with a syntax error in it is tolerated mid-session or when launching from the connection dialog, but closes the program if the profile starts with the program. This happens with alias, trigger, timer, keybind, button. With script item it is fine.

Steps to reproduce the issue / Reasons for adding feature:

  1. Choose a profile and set it to open upon launch
  2. Open your profile
  3. Create a timer named "crasher" with lua code 1 2 3
  4. Save item and save profile
  5. Close program
  6. Relaunch with that profile upon startup and see that it closes the program
  7. Go to your profile folder and delete the autologin file so that you can start the program again in the future

Error output / Expected result of feature

Launching it from the command prompt, I see that it puts this line into output: [LOADING PROFILE]: "C:/Users/Alpha/.config/mudlet/profiles/local-3333/current/2024-02-10#10-31-34.xml" XMLimport::readTimer(...): ERROR: can not compile timer's lua code for: "crasher"

Extra information, such as the Mudlet version, operating system and ideas for how to solve / implement:

I expect there is some variable that tracks errors during startup and failing to compile some lua is treated like a fatal error, and it's treated as a lesser error if you open the profile from the connection dialog. It also might be trying to update a UI element that isn't available yet.

@atari2600tim atari2600tim changed the title opening a profile on launch with syntax errors kills the program opening a profile on launch with lua syntax errors kills the program Feb 10, 2024
@vadi2
Copy link
Member

vadi2 commented Feb 10, 2024

Which Mudlet version is this and on which OS? I just tried 4.17.2 and PTB, and both load okay with the faulty timer code.

@atari2600tim
Copy link
Contributor Author

It's with Windows 10 using Mudlet 4.17.202293acc which is the PTB of Feb 9. After work I will try some other setups.

@atari2600tim
Copy link
Contributor Author

With a brand new profile, with a timer called crasher containing lua code of 1 2 3 and set to autologin, I was able to crash it with Windows 10, 11, and Ubuntu. Looks like it started somewhere between 2023-12-28-ab5cd and 2023-12-23-377e3 which was a busy few days. I'm able to compile on Ubuntu so I'll try and narrow it down some more tomorrow.

Alienware Alpha with Windows 10,
4.17.2 - opens fine
PTB versions:
2024-02-09 - crash
2024-01-20 - crash
2024-01-13 - crash
2024-01-02 - crash
2023-12-30 - crash
2023-12-28-ab5cd - crash
2023-12-23-377e3 - opens fine
2023-12-22 - opens fine
2023-06-01 - something went wrong message

Atari VCS with Windows 10:
release 4.17.0 - just fine
ptb 2024-1-18 - crash

Atari VCS with Windows 11
release 4.17.2 - fine
ptb 2024-02-11 - crash
ptb 2024-01-30 - crash

Atari VCS with Ubuntu 22.04.3 LTS
ptb 2024-02-11 - seg fault
ptb 2024-01-30 - seg fault
ptb 2023-11-14 - fine

@atari2600tim
Copy link
Contributor Author

atari2600tim commented Feb 11, 2024

Seems like #6846 is doing it. On Ubuntu I made a branch from f76e7a2 which crashes and from the one immediately before it, 2180a34 which stays open. I compiled each one and tested it with command line arg --profile="crasher" and also with the checkbox, both ways stay open on the older version and then both ways crash on the newer version. The changes there involve the startup procedure but beyond that it looks unrelated. This confuses me. I mean this is my local machine where I'm not dealing with outside things updating and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants