Urgent.News

What's breaking now, across hundreds of outlets.

Tech

The Fix That Brought the Bug Back

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…

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.

The 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.

The 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.

The 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.

Rewritten by urgent.news; may contain errors — check the original.

Read the original at dev.to →

Report a problem with this story

More in Tech

Interaction Nets Explained: The Programming Model Behind the Frostbite CPU

On November 18, 2026, the chip-design startup Architect Labs published a post introducing Frostbite . They describe it as a general-purpose CPU with a new instruction set.

  • Interaction nets enable Frostbite's energy-efficient programming model
  • Programs represented as graphs with nodes and wires in interaction nets
  • Frostbite's quad achieved 4.59x better performance per watt using interaction nets

You Don't Need That useEffect: Derived State in React

A search box over a list. It works, and it shows up in code review every week: function Results ( { items , query } ) { const [ filtered , setFiltered ] = useState ( items ) ; useEffect ( ( ) => {…

  • Using useEffect to derive state causes inefficiency in React components.
  • Filtered results stored in state create "effect-after-paint gap" on slow devices.
  • Compute values directly in component rendering to improve performance.

Three ways to connect a WhatsApp number to Bitrix24 (and what each one costs you)

If your customers write to you on WhatsApp, sooner or later someone asks the same question: "Can we see these chats inside Bitrix24?" The answer is yes, but there is more than one way to do it, and…

  • Three methods to connect WhatsApp to Bitrix24: QR code, official Business Platform, or coexistence
  • QR code method is quick but unofficial and may be restricted by WhatsApp
  • Official Business Platform offers Meta support and message templates but requires approval

More from Saturday 21 November →