Sorry, but this is not the case. TableName is not required. (it was in the very first beta implementations of Lua with Rainmeter, but that is a couple of versions of Rainmeter ago.) Rainmeter will quite gracefully keep multiple versions of a skin running Lua completely separate. So when you run two versions of your skin is when it crashes?rezonance wrote:I have finally isolated the reason behind the crash:
When using the Script measure to run a Lua script, a required variable is TableName, which allows for each script to have it's own little unique environment to run in. As also stated in the definition of the variable on the Lua for Rainmeter page, this variable must be unique for all running skins. When running dual (or more) copies of Line Planner, however, these are not unique. So, when one skin closes, it likely flushes (or at least tampers in some way with) the same table that the other is also using, causing an error to be generated at some point in the program execution and to blow out all of Rainmeter.
Most would never encounter this error, because one really only needs one Line Planner skin open at a time. Otherwise, this error only pops up when one of the many skins is later closed. Nonetheless, I'll see if I can work in a way to make each new instance of the script have a little random number associated to it, though as previously stated this really shouldn't be a problem for anyone but myself or another developer working on the skin.
It is currently August 3rd, 2021, 10:55 am
Quote of the Day, To-Do List and other text-based skins
- Posts: 22016
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
- Posts: 8
- Joined: March 12th, 2011, 3:18 am
Indeed I've only ever experienced the issue when running multiple instances of the same skin.jsmorley wrote:Sorry, but this is not the case. TableName is not required. (it was in the very first beta implementations of Lua with Rainmeter, but that is a couple of versions of Rainmeter ago.) Rainmeter will quite gracefully keep multiple versions of a skin running Lua completely separate. So when you run two versions of your skin is when it crashes?
If I omit the optional TableName parameter, will Rainmeter just assign a random TableName for the script and continue to run it without issue?
EDIT: Actually, after playing around with the skin and attempting to reproduce the issue I originally had, I no longer encounter a crash. I'll continue to mess around with it more, but it appears as if this issue has been resolved.