Around roughly 1 week ago, every script in our game started to highlight the first line in eye-blinding orange.
I paid it no mind, since it didn’t give me any issues when running the game nor did I experience issues with type solving (…aside from autocomplete and intellisense taking between 30s and up to 10min to process, but this has been a thing ever since I started working on it as well since February). Up until recently, we’ve all had the new Luau type solver beta enabled, but recently disabled this due to memory issues introduced by a new update.
Now with the beta disabled, all of our scripts – even those that don’t use type hinting – report the following error:
Type Error: (1,1) Luau ran into an unexpected error and will not type check until Studio is restarted.
We use typed luau for selective scripts & modules – a dozen at most – and commenting out the type definitions & restarting studio does not provide any change.
We’re also using team create.
Problem Consequences
Line 1 for every script in the game gets highlighted in orange, with no error or warning directly visible in the editor.
Script Analysis window reports the aforementioned error for every script.
All scripts are devoid of autocomplete and syntax highlighting – could just use notepad at this point to write my code.
Since switching back to the Luau type solver beta re-introduces memory issues and causes our programs to crash, we have no alternative to this, meaning we’re stuck in a deadlock at the moment.
Hello! Sorry to hear you’re running into issues with both the new and old type solver. Would you be comfortable sharing the place file in a private message? It would help us diagnose what’s currently going wrong with your place in the old solver, as well as in the new solver.
We use typed luau for selective scripts & modules – a dozen at most – and commenting out the type definitions & restarting studio does not provide any change.
This might be unintuitive, but there’s no untyped or typed Luau. Type inference is always there: it’s what powers autocomplete. The choice is whether errors are reported.
Hello! I’ve been iterating on the reproduction you gave me, thank you for that. I’ve narrowed down the issue you’re running into, but I wanted to ask if you’ve tried the new solver recently? I have a fairly beefy laptop, but I tried it out and I was able to see type information within 30 seconds or so, and type checking was snappy from thereon.
We’ve been focusing on performance as of late, and mid July we rolled out and rolled back a change to the new solver that we observed caused a lot of memory issues and Studio freezing. Y’all might have gotten caught up in that.
Yes, shortly after sending you the place file I switched back to the new solver to work around the complete lack of type inferring and syntax highlighting experienced using the old one, keeping in mind that I need to have a hawk’s eye on my task manager window for when to restart due to memory issues.
Types usually resolve around roughly the same time you experienced (this is with the new solver).
So while I’m still able to do my work using the new solver, I still need to restart (more accurately, kill) studio around every 10 minutes or so, making it difficult to get things done.
If interested, here’s what I’ve noticed since switching back to the new solver a few days back:
Memory usage seems to vary depending on script size.
Because my studio sessions can last longer when I’m editing smaller scripts.
Amount of script tabs open affects memory usage negatively.
Same thing as before; Session lasts longer with fewer tabs open (ideally only 1-3)
Closing script tabs after being opened does not reduce memory usage.
Exiting multi-window playtest bumps up memory usage by 10~20% (Using the “Test” option (F5) causes noticable studio slowdowns after exiting F5 playtest for the 3rd time, uncertain if related).
Hm, those are definitely some strange symptoms. Obviously, it’s not a good user experience to have to close Studio so often like that. This isn’t the first I’ve heard of such a report as well.
For information, the memory issues might be related to this as the symptoms appear very similar, although much more severe in our case to the point of taking up 99% memory usage.
I’d like to report that for the last few days I’ve had noticably less trouble working in the repro file I’ve sent you.
Memory usage is much more stable, overall system memory usage is around 50% while programming and ~85% while in multi-window playtest.
While programming, takes up around 3gb.
Multi-window playtest takes up around 6gb.
Previously this would spike to 98% system memory usage in either scenarios after around 10 minutes of work (instantly with playtest), requiring constant task kills.
Now for the last few days I haven’t had to do any of that. I missed this.
I don’t know what changed, but whatever’s been pushed in the last ~7 days; I’d take note of it.