Writing typeof(function()) in the script editor can cause Studio to crash and place to be inaccessible

Today, 2 times already, Studio randomly freezed, and then closed in my face; in both those 2 crashes, I was doing the exact same thing: editing a module script with many types (and only types); specifically it happens when I put typeof() and then put function() inside, like this:

Then, when I try to reopen the same place, it seems to crash right before loading; no matter how many times I try reopening it. I had to revert my place to a previous save to access it again.

To be exact, studio freezes whilst I’m typing in function().
It doesn’t seem to happen regularly, instead almost at random (CHANGE OF MIND, whilst writing this bug report I managed to reproduce it again.); I edit that module script very regularly, but never crashed or had issues outside of doing this one specific thing within it. This issue only started happening today. I had no issues doing this yesterday and the days before it. I don’t think anything else I was doing could’ve crashed Studio, other than editing types in that specific way.

Interestingly enough, this only seems to happen in that specific module script?

Video of it happening:

The module script in question has ~38 types all with the export keyword before it, and is around 303 lines.

Reproduction Steps:
Consistency: 70% - 60% of the time

  1. Create a module script containing around ~38 exported types and ~300 lines.
  2. In that module script, within a type of table’s {}, make a new key and let the value be typeof()
  3. Within that typeof’s parentheses (), write function()
    e.g.
export type t = {
   func:typeof(
      function()

      end
   )
}

Enabled beta features:

  • Improved Find All/Replace All,
  • New Luau type solver,
  • Script Sync,
  • along with In-Experience avatar Auto-setup, New Studio camera controls, Preferred Text Size Setting, Revamped Asset Manager, UIDragDetectors, and Video uploads.

A private message is associated with this bug report

Hello, thank you for reporting this! We were able to reproduce this on our end and are actively looking into a fix.

2 Likes

By the way, if you end up locked out of the placefile again, you can try disabling the “New Luau type solver” Beta before reopening the file

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.