HN
Today

Fixing a 20-year-old bug in Enlightenment E16

This post meticulously dissects a 20-year-old bug in the vintage Enlightenment E16 window manager, caused by a non-convergent Newton's method in text truncation. Hacker News is captivated by the blend of deep technical debugging, the enduring allure of classic software, and a philosophical reflection on software quality and supply chain security across generations. It’s a delightful dive into digital archaeology.

127
Score
33
Comments
#1
Highest Rank
14h
on Front Page
First Seen
Apr 15, 6:00 AM
Last Seen
Apr 15, 7:00 PM
Rank Over Time
1221234691011162123

The Lowdown

The author, a daily user of the 1997 Enlightenment E16 window manager, describes the intricate process of resolving a critical, decades-old bug. This bug, which caused a deterministic freeze when opening a specific PDF, ultimately stemmed from a flawed implementation of Newton's algorithm.

  • Enlightenment E16, created in 1997, is celebrated for being themable, hackable, and lightweight (peaking at 24MB RSS), maintaining a dedicated enthusiast community.
  • The bug manifested as a system freeze traced to imlib2's font cache, with GDB showing an oscillation in the TextstateTextFitMB function, responsible for truncating long window titles.
  • The core issue was a Newton-style search algorithm lacking iteration limits, causing it to endlessly oscillate between two trial truncations rather than converging or terminating.
  • The fix involved implementing defensive measures: capping iteration counts at 32, flooring nuke_count at 1 to prevent degenerate string states, and flooring cw (average pixels per char) at 1 to avoid division by zero.
  • The bug was reproducible with any window whose WM_NAME was long enough to trigger the truncation algorithm's overshoot regime, such as "Kickoff.pdf — Introduction to Information Theory Session 1: kickoff & first topic".
  • The author also includes a philosophical reflection, arguing that newer software isn't always better, citing recent kernel bugs and the XZ backdoor as examples of modern vulnerabilities, and praising the stability and self-reliance of maintaining older software.

This story highlights a fascinating intersection of software archeology, robust debugging, and contemporary concerns about software integrity and the "supply chain" of modern systems. It's a testament to the longevity of well-designed, if sometimes imperfect, open-source projects.

The Gossip

Nostalgic Nodes & Niche Navigators

Many commenters reminisce about their early experiences with Enlightenment E16 and other lightweight window managers like WindowMaker and Afterstep. They fondly recall E16's aesthetics and customizability, noting how these early Linux desktop environments, often paired with distros like Slackware or SuSE, served as a "hook" that led many into a career in software development.

Lightweight Legends & Lingering Legacy

A recurring point of discussion is the ironic evolution of E16's perception regarding resource usage. While it was once considered "eye candy but heavy" in the i486/early Pentium days, compared to today's mainstream environments, it's now seen as remarkably lightweight. This shift highlights how advancements in hardware and the increasing resource demands of modern software have redefined what is considered "lean."

Debugging Deep Dives & Deterministic Discoveries

The Hacker News community appreciates the detailed account of debugging a complex, two-decade-old bug, particularly one rooted in a mathematical algorithm. Commenters express admiration for the author's thorough analysis and the satisfaction of resolving such a long-standing issue. There's also lighthearted banter about the "deterministic" nature of the bug, which, despite being frustrating for the user, is a debugger's dream.