PuTTY bug assert-line-not-null

PuTTY bug assert-line-not-null

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

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

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.

  • Pine.0410290832480.79579@mozart.musicbox.net
    0.56 on WinME and 2K; terminal.c:159
  • 2164FF46E100024E87C4F72442B267050393955A@mail02.ad.telekom.lv
    0.56 on W2KSP2; terminal.c:159
  • BB8EDCA75DA7624F9A8B446F68A56C70438A89@PKDWB06C.ad.sprint.com
    0.56 on Win2K; terminal.c:159
    "disable switching to alternate screen" enabled
  • f37cdb910503291851a052bd9@mail.gmail.com
    with diagnostic info
  • 20051013140345.GA9964@dot.oreally.co.uk
    0.58 on Win2K+SP4
    line==NULL in terminal.c
    lineno=5376 y=65 w=182 h=65
    count(scrollback=00890758)=2
    count(screen=008BE508)=65
    count(alt=00890768)=65 alt_sblines=64
    whichtree=008BE508 treeindex=65
    
  • D4EFE24E74186242BCFA48FB1BC47C2802E6681D@ore-mail2.ne.ad.ner.capgemini.com
    0.59, using a serial port
    line==NULL in terminal.c
    lineno=4754 y=51 w=153 h=56
    count(scrollback=003F1BF0)=382
    count(screen=003F1C00)=56
    count(alt=00B620C8)=56 alt_sblines=0
    whichtree=003F1C00 treeindex=51
    
  • FA37BC94952941AC89BFF98CD9997327@jamesPC
    Also a serial connection
    line==NULL in terminal.c
    lineno=4754 y=18 w=89 h=47
    count(scrollback=011E1AA8)=200
    count(screen=011E1AB8)=47
    count(alt=011F9BF0)=47 alt_sblines=0
    whichtree=011E1AB8 treeindex=18
    
  • 53b8f8fe0703261035q65cafd48i4f2f2387996a07d9@mail.gmail.com
    Using a serial port, so presumably 0.59
    linux==NULL in terminal.c
    lineno=4754 y=10 w=80 h=24
    count(scrollback=003A1C60)=200
    count(screen=003A1C70)=24
    count(alt=003A1F90)=24 alt_sblines=0
    whichtree=003A1C70 treeindex=10
    

One user (1124367194.23192.240954800@webmail.messagingengine.com) 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:

  • 000d01c4b1c7$ca506090$4296a8c0@nadine
    2004-10-14; terminal.c:662; connecting to SunOS
    reportedly fixed in 2004-10-15, although since other reports indicate the failure is intermittent, perhaps not

Audit trail for this bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2007-03-28 13:26:33 +0100)