Bug #7660
closedLeaving curses mode a second time makes terminal window disappear
0%
Description
"Version": oi-dev-151a8-live-x86.iso
I've written a game in Python that uses curses, but only part of the time.
If I play again without exiting the program (the game) and starting it again, the terminal window goes poof.
I've got a minimal working example (in Python).
Just open up a new terminal window and start the (interactive) Python interpreter and copy paste the below code:
import curses
window = curses.initscr()
curses.endwin()
window = curses.initscr()
curses.endwin()
Updated by Alexander Pyhalov over 6 years ago
Is issue reproducible on 2016.10 ?
Updated by Oskar Skog over 6 years ago
I'll check.
The system I already have seems to be as up-to-date as possible, no updates were available.
Updated by Alexander Pyhalov over 6 years ago
What publisher is set? (pkg publisher)
/dev is dead, latest update was in 2015 (shellshock fix, IIRC)
Updated by Oskar Skog over 6 years ago
`pkg publisher` on the old VM says
openindiana.org origin online http://pkg.openindiana.org/dev/
opensolaris.org origin online http://pkg.openindiana.org/legacy/
The issue seems to have been resolved on OpenIndiana 2016.10, but I'm only 95% sure as I had trouble getting the GUI working.
Updated by Nikola M. over 6 years ago
Try updating to /hipster-2015 (it works from /dev to /hipster-2015 and from there, to latest /hipster. See if you can then update to newest updated Openindiana /hipster. ([[https://wiki.openindiana.org/pages/viewpage.action?pageId=30802657]])
I can reproduce this on Openindiana hipster with osnet-incorporation 0.5.11-2016.1.0.16036 and userland-incorporation 0.5.11-2016.1.0.8000 like this:
On first entering
' window = curses.initscr() ' start, Window clears
and I get that every Enter/Return key I press, does not move cursor to the next line, but ">>>" prompt continues in the same line.
Middle-key pasted text is not visible but is pasted (pasted command even if not visible works). Normal pasted text is visible.
After ' curses.endwin() ' it is back to normal.
That is similar to many CLI apps that after exiting, bash in terminal does not go to the next line when pressing Return, but stays in same line, too. (or written text at the end of the terminal does not go into the next line, but overlaps on the current line in the bottom of the terminal screen.
Updated by Oskar Skog over 6 years ago
@Nikola M:
This is not the same issue, and what I think you're describing is not even an issue.
What you're doing is that you set the terminal in an inappropriate mode by initializing curses.
Those odd things are supposed to happen after calling curses.initscr().
If you had exited the Python interpreter while in curses mode, you can restore the terminal
with the "reset" command.
The bug which I'm describing causes the terminal to disappear, literally disappear.
Updated by Aurélien Larcher over 6 years ago
Tried to reproduce on 2016.10+, the term is cleared the second time, not destroyed.
Updated by Aurélien Larcher about 6 years ago
- Status changed from New to Closed
Not applicable to Hipster.