PuTTY bug assert-line-not-null

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Privacy | Changes | Wishlist

summary: Bombs out with line==NULL in terminal.c
class: bug: This is clearly an actual problem we want fixed.
priority: medium: This should be fixed one day.
present-in: 0.56 0.58 0.59
fixed-in: 874ce8239cd7ebcf8e12effdc18e0ccd7c477d73 80f5a009f647aacd492c6e1e7a5f450156cabe13 (0.73)

We receive occasional reports of PuTTY crashing out with line==NULL in terminal.c:lineptr(). However, we haven't been able to reproduce the problem ourselves.

In recent versions of PuTTY (0.58 and up), the error takes the form of one or more error boxes saying "line==NULL in terminal.c" and giving some diagnostic information, along with an exhortation to contact us.

In versions of PuTTY before snapshot 2005-03-07, the error is instead a failure of an assertion in terminal.c that line != NULL (the precise line number has changed a lot due to the extensive terminal re-engineering since 0.56).

We've had one report since we added diagnostics which indicates that screen doesn't contain enough entries. However, we haven't thought of a plausible mechanism for screen or alt_screen to end up undersized.

(Possibly related, although we've no hard evidence for this: assert-fail-newsavelines.)

There seem to be a lot of reports of this error from people using the serial backend in 0.59, which suggests that it can be a symptom of win-handle-double-free (fixed in 0.60).

In fact, in general, we suspect this is a symptom of some sort of memory corruption to which this assertion is particularly sensitive, rather than evidence of a direct logical error.

One user ([email protected]) reported a failure of the same assertion with PuTTY 0.58. However, as their screen is apparently zero rows high (presumably due to their window manager), this pathological case is a problem that's now protected against via zero-rows-cols-crash.

I am using bblean blackbox for windows as a shell on windows XP SP2, and whenever I rollup a maximized putty window the following fatal error results:

line==NULL in terminal.c
lineno=4621 y=0 w=93 h=0
count(scrollback=003B0F60)=200
count(screen=00CFA2B8)=0
count(alt=003B0F70)=0 alt_sblines=0
whichtree=00CFA2B8 treeindex=0

Perhaps an unrelated bug that's already been fixed:

SGT, 2024-11-16: it was never clear whether we'd fixed the last of these bugs, but I don't believe we've had a case of it since some fixes in 0.73, so I'm going to tempt fate and declare it closed.


If you want to comment on this web site, see the Feedback page.
Audit trail for this bug.
(last revision of this bug record was at 2024-11-17 14:53:03 +0000)