{
  "id": 21069815,
  "title": "The Fix That Brought the Bug Back",
  "url": "https://urgent.news/2026/11/21/the-fix-that-brought-the-bug-back",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T16:10:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/harrisonsec/the-fix-that-brought-the-bug-back-k1j"
  },
  "original_language": "en",
  "account": "The bug that had previously been fixed resurfaced in a surprising manner. Initially, the issue occurred when connecting to the phone, with the screen coming through USB as H.264 and the phone's GPU re-encoding it. Sunshine streamed it to the main phone, but a bug appeared after the initial fix. The problem manifested as a delay in connection, followed by no video traffic for ten seconds, and then the connection terminating (-100). The issue arose because the H.264 decoder could only start at a keyframe, and a still screen never sent one.\n\nThe fix for the first bug was to remember the phone's latest keyframe and every subsequent frame (up to 900 frames or 60 MB). The transcoder would wake every 100 ms to notice new viewers and restart the GPU pipeline, replaying the cached frames. This approach resolved the issue in the first instance. However, two days later, the same problem resurfaced, but this time, the transcoder's log indicated a new issue. The transcoder began reporting its mode every five seconds, showing that it was using the \"passthrough\" fallback. The passthrough mode was activated when the GPU pipeline failed, allowing at least a picture to be displayed.\n\nThe transcoder continued to experience issues, with the GPU encoder becoming unavailable and the process leaking threads. Every GPU pipeline restart resulted in a new thread being spawned, which held the pipeline's bus until the pipeline was dropped. This led to an accumulation of threads, eventually reaching 500. The leak occurred because a keyframe request while the phone was quiet restarted the GPU at most once every five seconds. The fallback mechanism did not resolve the issue, as it did not include a replay of frames.\n\nThe primary solution was updating the transcoder to include a timeout for bus threads, ensuring they exited promptly when their pipeline was dropped. Additionally, the fallback mechanism was modified to include replays, allowing new viewers to bypass the issue that caused the initial bug to resurface. The fixes addressed the root cause of the problem, restoring the system's functionality.",
  "summary": "I use a second iPhone at home through a stream ( the setup ): the phone's screen comes off USB as H.264, an old laptop's GPU re-encodes it, and a fork of Sunshine streams it to my main phone. The bug in this post appeared twice. The second time, my fix for the first one was the cause. Round one: nothing for ten seconds Connecting to the phone was slow. Sometimes the picture took a couple of…",
  "key_points": [
    "Bug resurfaces after initial fix, causing connection delay and termination",
    "Transcoder fixes include timeout for bus threads and replays for new viewers",
    "System functionality restored with updated transcoder and fallback mechanism"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}