FMOD Studio 2.03.08 – memory never released after each scripting terminal evaluation (TCP 3663)

FMOD Studio 2.03.08 – memory never released after each scripting terminal evaluation (TCP 3663)

Environment: FMOD Studio 2.03.08 (64-bit, Qt 6.5.3, build #153137), Windows 11 Pro (22000), 32 GB RAM.

Summary
Every expression evaluated through the scripting terminal port (3663) grows Studio’s private memory by
about 12-20 KB, and this memory is never released: not by studio._internal.runGC(), not by
Scripts > Reload, not by closing the TCP connection. Only quitting Studio frees it.
Our tool polls Studio’s profiler state 20 times per second (cursor/playhead sync with a video player),
which grew Studio by ~1.2 GB per hour. Over a work day this exhausted Windows’ commit memory and froze
the machine (Resource-Exhaustion-Detector events listing FMOD Studio.exe at up to 12.7 GB).

Steps to reproduce

  1. Open any project in Studio 2.03.08.

  2. Run this Python 3 script (standard library only):

    import socket
    s = socket.create_connection((“127.0.0.1”, 3663))
    def read_frame():
    buf = b""
    while not buf.endswith(b"\x00"):
    buf += s.recv(65536)
    read_frame() # greeting
    for i in range(20000):
    s.sendall(b"1")
    read_frame() # “out(): 1”

  3. Watch FMOD Studio’s commit size (Task Manager > Details > Commit size).

Measurements (same Studio instance)

  • 5,000 evaluations of “1”: +58 MB (~12 KB each)
  • 20,000 evaluations of a small JSON.stringify(…): +387 MB (~20 KB each)
  • Polling at 20 Hz: ~19 MB/min; at 5 Hz: 4.7 MB/min; no polling: 0 MB/min
  • studio._internal.runGC(): no change
  • Scripts > Reload (menu): no change (993 → 996 MB).
    studio.window.triggerAction(studio.window.actions.ScriptReload) is refused
    (“does not support the ScriptReload action”).
  • Closing the socket: no change

Expected: memory used by an evaluation is released once it completes, or at least by GC / script reload.

Question: is there a supported way to follow profiler session state (cursor, playhead, recording)
without polling, e.g. a callback a script can register to push changes to a terminal client?