Project

General

Profile

Bug #7660

Leaving curses mode a second time makes terminal window disappear

Added by Oskar Skog almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
Start date:
2016-12-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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()

History

#1

Updated by Alexander Pyhalov almost 3 years ago

Is issue reproducible on 2016.10 ?

#2

Updated by Oskar Skog almost 3 years ago

I'll check.

The system I already have seems to be as up-to-date as possible, no updates were available.

#3

Updated by Alexander Pyhalov almost 3 years ago

What publisher is set? (pkg publisher)

/dev is dead, latest update was in 2015 (shellshock fix, IIRC)

#4

Updated by Oskar Skog almost 3 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.

#5

Updated by Nikola M. almost 3 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.

#6

Updated by Oskar Skog almost 3 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.

#7

Updated by Aurélien Larcher almost 3 years ago

Tried to reproduce on 2016.10+, the term is cleared the second time, not destroyed.

#8

Updated by Aurélien Larcher over 2 years ago

  • Status changed from New to Closed

Not applicable to Hipster.

Also available in: Atom PDF