CoursePython from Scratch to Intermediate · Module 9: Classes and Objects · part 65 of 75
Part 65 · Module 9: Classes and Objects

Incident: A counter that ran out of room

7 min read·14 Oct 2026
Module 9 · Incident file · About 30 minutes

What happened

day 0 power on counting up and up day 248 counter full risk electrics off FAA airworthiness directive, 2015: Boeing 787
The 787's counter counted from power on (blue); after 248 days of continuous power it overflowed, and the electrics could shut down (red).

In 2015 the US Federal Aviation Administration (FAA) issued an airworthiness directive for the Boeing 787. An airworthiness directive is a legal order to fix a safety problem in an aircraft, and airlines must follow it.

The problem was a counter inside the software that controls the plane's electrical power. It counted up for as long as the power stayed on. After 248 days of continuous power, the counter overflowed: it reached the largest number it could hold and could go no higher. When that happened, the electrical system could shut down.

248 days: never reached each restart sets the counter back to 0
The directive's answer: restart regularly, so the counter (green) is reset long before the 248-day line (red).

The order told operators to restart the aircraft's power regularly, so that no 787 ever stayed powered for 248 days. Switching off resets the counter to zero.

This file keeps to those facts. The directive is the source; nothing here adds detail to it.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.