Could I get a login on the buildbot to make a fix?
I bet the problem is with the stdscr object. PyCurses_InitScr()
does 'return (PyObject *)PyCursesWindow_New(stdscr);'.
PyCursesWindow_Dealloc() does:
if (wo->win != stdscr) delwin(wo->win);
I bet FreeBSD is clearing contents of the stdscr global variable. The condition in PyCursesWindow_Dealloc() is then true, and it tries to delwin() the old value, which is in wo->win.
One fix might be to keep a reference to that PyCursesWindow object holding stdscr, and change dealloc to 'if (wo != saved_stdscr_object)'. Or maybe, since multiple calls to initscr() will create multiple window objects holding the value of stdscr, window objects should have a 'do_not_delwin' flag. |