]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
I'm sick and tired of the persistent reports of lineptr() failing
authorSimon Tatham <anakin@pobox.com>
Sun, 6 Mar 2005 14:48:22 +0000 (14:48 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 6 Mar 2005 14:48:22 +0000 (14:48 +0000)
its `line != NULL' assertion, so I've replaced the assertion with a
call to fatalbox() giving oodles of information. I may still not be
able to reproduce it, but at least next time it happens we should
see a decent amount of debugging data!

[originally from svn r5447]

terminal.c

index 1e9fb371d0172a6ac86cd9201a24e012ce69ff22..0ab14145a1a42626dc3d7d7ea6bfd648c3481369 100644 (file)
@@ -1017,6 +1017,21 @@ static termline *lineptr(Terminal *term, int y, int lineno, int screen)
     }
 
     /* We assume that we don't screw up and retrieve something out of range. */
+    if (line != NULL) {
+       fatalbox("line==NULL in terminal.c\n"
+                "lineno=%d y=%d w=%d h=%d\n"
+                "count(scrollback=%p)=%d\n"
+                "count(screen=%p)=%d\n"
+                "count(alt=%p)=%d alt_sblines=%d\n"
+                "whichtree=%p treeindex=%d\n\n"
+                "Please contact <putty@projects.tartarus.org> "
+                "and pass on the above information.",
+                lineno, y, term->cols, term->rows,
+                term->scrollback, count234(term->scrollback),
+                term->screen, count234(term->screen),
+                term->alt_screen, count234(term->alt_screen), term->alt_sblines,
+                whichtree, treeindex);
+    }
     assert(line != NULL);
 
     resizeline(term, line, term->cols);