Author zach.ware
Recipients larry, nadeem.vawda, serhiy.storchaka, zach.ware
Date 2014-01-25.23:51:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390693889.01.0.597169098191.issue20358@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, I've tracked down where the error is happening, but I don't know enough about curses to suggest where it should go from here.  It does appear to be the version of ncurses that Ubuntu 13.10 uses that's causing problems, version 5.9+20130608.  The issue stems from a change in ncurses/base/lib_overlay.c, here's the relevant part of the diff to copywin (left is vanilla ncurses-5.9 from http://ftp.gnu.org/pub/gnu/ncurses/, right is ncurses-5.9+20130608 obtained by 'sudo apt-get source ncurses'):

--- ncurses-5.9/ncurses/base/lib_overlay.c      2009-10-24 18:21:31.000000000 -0500
+++ ncurses-5.9+20130608/ncurses/base/lib_overlay.c     2014-01-25 17:13:08.461548012 -0600
@@ -151,7 +151,10 @@
        dminrow, dmincol,
        dmaxrow, dmaxcol, over));
 
-    if (src && dst) {
+    if (src != 0
+       && dst != 0
+       && dmaxrow >= dminrow
+       && dmaxcol >= dmincol) {
        _nc_lock_global(curses);
 
        bk = AttrOf(dst->_nc_bkgd);


The failing test passes 1, 2, 3, 3, 2, 1 for sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, which fails the dmaxrow >= dminrow check and copywin returns -1 (ERR).  Changing the test to call with 1, 1, 2, 2, 3, 3 prevents the failure, but does ugly things to the tty when the process ends.
History
Date User Action Args
2014-01-25 23:51:29zach.waresetrecipients: + zach.ware, larry, nadeem.vawda, serhiy.storchaka
2014-01-25 23:51:29zach.waresetmessageid: <1390693889.01.0.597169098191.issue20358@psf.upfronthosting.co.za>
2014-01-25 23:51:28zach.warelinkissue20358 messages
2014-01-25 23:51:28zach.warecreate