Urgent.News

What's breaking now, across thousands of outlets.

Tech

CanvasKit Layout Traps: The Unbounded Constraint Bug That Only Blanks Release Builds

I shipped eight card and casino games to my portfolio in a single commit — solitaire, roulette, video poker, slots, baccarat, keno, war, higher-lower. All client-side Flutter web, all free, all deployed to Firebase Hosting in one push. flutter analyze was clean. I read the diff twice. The build succeeded. I deployed. Then I opened /games/roulette on the live site and got a page with a header, a…

On August 7, 2021, a bug in Flutter's CanvasKit library, which was only present in release builds, caused eight card and casino games to display a blank rectangle instead of the betting board. The issue was traced back to an "unbounded constraint" placed inside a scroll view. The offending code involved a CrossAxisAlignment.stretch property in a Row widget, which was nested within a scroll view.

This combination led to an infinite height constraint in release builds, causing the layout to fail and rendering the betting board blank. The problem was difficult to diagnose because debug builds would throw an error, while release builds simply crashed silently without any error messages or console exceptions. The bug was only discovered after extensive testing and release of the games to Firebase Hosting.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 3 September →