[Crash] MoonlightPortable 6.4.1 crashes at "Starting RTSP handshake..." while official 6.1.0 and Moonlight V+ work perfectly

Author: ApproLight01Created Sep 21, 2026Updated Sep 26, 2026

Describe the bug When streaming from a Sunshine host, this custom/refactored MoonlightPortable-x64-6.4.1 client crashes silently without any error dialog right after printing Starting RTSP handshake....

On the server side (Sunshine), the connection is immediately aborted with: Error: RTSP: handle_read_encrypted_header(): Couldn't read from tcp socket: Connection reset by peer

Crucial Comparison / Isolation:

  • Official Moonlight v6.1.0 (Windows portable) connects and streams flawlessly on the exact same Windows PC to the exact same host (full 60.32 FPS, 0% packet loss).
  • Moonlight V+ (Tablet) connects and streams flawlessly to the exact same host.
  • The crash happens on this 6.4.1 client across multiple different server machines (Arch Linux and Windows 11 Surface Book 2). This conclusively isolates the bug to the 6.4.1 client implementation.

Steps to reproduce

  1. Host: Launch Sunshine (KMS capture enabled, Intel VA-API encoder or Windows host).
  2. Client: Open MoonlightPortable-x64-6.4.1 on Windows 11.
  3. Select the host and launch "Desktop".
  4. Client logs Starting RTSP handshake... and immediately terminates/crashes.

Screenshots N/A (Process terminates immediately; no crash dialog or message box is shown).

Affected games

  • Desktop (Affects all stream sessions).

Other Moonlight clients

  • Official Moonlight 6.1.0 on Windows: Works completely fine.
  • Moonlight V+ on Tablet: Works completely fine.
  • Only this MoonlightPortable-x64-6.4.1 build crashes.

Moonlight settings

  • Default settings tested: Crashes.
  • Video Decoders tested: D3D11VA, Forced Software Decoding, Vulkan, DXVA2: All crash at the exact same point.
  • Display mode: Windowed and Fullscreen: Both crash.
  • Audio: Stereo and Surround tested: Both crash.

Gamepad-related issues

  • N/A (Not gamepad related).

Client PC details

  • OS: Windows 11 x64 (Laptop, NVIDIA Optimus)
  • Problematic Version: MoonlightPortable-x64-6.4.1 (Compiled with SDL 2.32.70 / SDL 3.4.14)
  • Working Version: MoonlightPortable-x64-6.1.0 (Compiled with SDL 2.31.0)
  • Client GPU: NVIDIA GeForce RTX 3070 Laptop GPU

Server PC details

  • Server 1: Arch Linux (Kernel 7.2.6), Sunshine version: 2026.914.233613, GPU: Intel UHD Graphics (Tremont, i915 / intel-media-driver)
  • Server 2: Windows 11 (Surface Book 2), Sunshine

Logs Comparison

1. Problematic Client Log (MoonlightPortable 6.4.1 - Crash)

00:01:08 - Qt Info: Executing request: "https://192.168.1.203:47984/displays?uniqueid=...&clientname=ApproLight"
00:01:09 - Qt Warning: Failed to parse displays JSON: "非法数字"
00:01:10 - SDL Info (0): Vulkan rendering device chosen: NVIDIA GeForce RTX 3070 Laptop GPU
00:01:11 - SDL Info (0): SDL audio driver: wasapi
00:01:15 - Qt Info: Launch response: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root status_code=\"200\"><sessionUrl0>rtspenc://192.168.1.203:48010</sessionUrl0><resume>1</resume></root>"
00:01:15 - SDL Info (0): RTSP port: 48010
00:01:15 - SDL Info (0): Negotiated audio codec: 0 (bitrate 0 bps)
00:01:15 - SDL Info (0): Initializing platform... done
00:01:15 - SDL Info (0): Resolving host name... done
00:01:15 - SDL Info (0): Initializing audio stream... done
00:01:15 - SDL Info (0): Starting RTSP handshake...
[PROCESS TERMINATED / SILENT CRASH HERE]

2. Server Log When 6.4.1 Crashes (Sunshine on Arch Linux)
Info: Creating encoder [h264_vaapi]
Info: Opus initialized: 48 kHz, 2 channels, 96 kbps (total), LOWDELAY
Error: RTSP: handle_read_encrypted_header(): Couldn't read from tcp socket: 连接被对方重置
Error: RTSP: Couldn't send data over tcp socket: 断开的管道


3. Working Client Log (Official Moonlight 6.1.0 - Success)
00:00:08 - SDL Info (0): RTSP port: 48010
00:00:08 - SDL Info (0): Starting RTSP handshake...
00:00:08 - SDL Info (0): Reference frame invalidation is not supported by this host
00:00:08 - SDL Info (0): Audio port: 48000
00:00:08 - SDL Info (0): Video port: 47998
00:00:08 - SDL Info (0): Control port: 47999
00:00:08 - SDL Info (0): done
00:00:08 - SDL Info (0): Starting video stream...
00:00:08 - SDL Info (0): Video stream is 1920x1080x60 (format 0x1)
00:00:08 - SDL Info (0): Starting audio stream...
00:00:08 - SDL Info (0): Audio stream has 2 channels
00:00:08 - SDL Info (0): Received first video packet after 0 ms
...
Incoming frame rate from network: 60.32 FPS
Decoding frame rate: 60.32 FPS
Rendering frame rate: 60.32 FPS
Average decoding time: 0.62 ms

Two critical anomalies observed right before the crash in 6.4.1:
Displays JSON Parsing Failure:
Qt Warning: Failed to parse displays JSON: "非法数字"
The /displays response from Sunshine fails JSON parsing with an "Illegal Number" error, possibly due to locale-specific decimal formats or float formatting in the Qt parser.
Audio Stream Negotiation Zeroed:
Negotiated audio codec: 0 (bitrate 0 bps)
Unlike the official 6.1.0 client which negotiates valid Opus channels, 6.4.1 reports 0 bps, which likely causes a divide-by-zero or null pointer dereference inside the WASAPI/SDL audio initialization routine during RTSP handshake completion.

[Moonlight6.1.0-1789987977.log](https://github.com/user-attachments/files/32462932/Moonlight6.1.0-1789987977.log)

[Moonlight6.4.1HardwareDecoding-1789988402.log](https://github.com/user-attachments/files/32462946/Moonlight6.4.1HardwareDecoding-1789988402.log)

[Moonlight6.4.1SoftwareDecoding-1789988457.log](https://github.com/user-attachments/files/32462950/Moonlight6.4.1SoftwareDecoding-1789988457.log)

Source: moonlight-stream/moonlight-qt