Two numbers in a framing plan that froze the takeoff

A blocking row count of a billion hung the wall framing takeoff, and a billion-inch board crashed it. Both are now refused with a plain reason.

The wall framing takeoff reads a plan (walls, openings, lumber list) and returns a stud count, a cut list and the cheapest board order. Plans get typed by hand or generated by other tools, so the engine has to survive odd numbers.

Probing it with hostile settings found two more that got through validation:

  • blocking.rows set to 1e9 made the layout loop for minutes. A frozen page or command line, no message. Negative, fractional and text values were silently accepted too.
  • A board in the lumber list with a length of 1e9 inches threw a raw RangeError: Array buffer allocation failed out of the order optimiser.

The plan check now refuses both with a reason: blocking must be an object with whole-number rows from 0 to 20, and no listed board may be over 1,200 inches (100 ft). Tests in engine.test.mjs cover each case and check that a valid plan still runs, including 20 rows and fire/stagger options.

These are invented plans, found by trying them. No real builder's plan or order was used, so this says nothing about whether the takeoff matches a real job. The wall framing roadmap still lists the open items that need real inputs.

All writing · More in Tools and projects · More on Wall Framing Takeoff · All tools and research