Bug 68199

Summary: Call to time functions from a curses screen using the ncurses screen dump feature causes crash.
Product: [Retired] Red Hat Linux Reporter: Need Real Name <donpa>
Component: ncursesAssignee: Eido Inoue <havill>
Status: CLOSED DUPLICATE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dickey
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 13:49:13 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
C program to compile with g++ -lncurses none

Description Need Real Name 2002-07-07 20:44:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
A call to a function to get time/date from a curses screen where there is first
a call to scr_dump() will cause the program to core dump.  If the curses screen
does a getch() before the call to the time function the program will not crash. 
However, there are many occasions where one will need to set up a time/date
string without making a call to getch() first.  There is some kind of conflict
between the curses screen dump feature and the time functions.  This is a
problem for RH to solve.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Set up a screen with curses control.
2. Do a screen dump (scr_dump(const char filename). (Do not do a getch() before
the screen dump.
3. Call a (void) function to set up a string containing the time and date.
4. The program will crash.
5. Have a call to restore(filename) after the call to the time function.
	

Actual Results:  Crash!

Expected Results:  Program should return from time fucntion and restore screen
as before dump.

Additional info:

Example program is avialable if you will send me your email address.
Comment 1 Need Real Name 2002-07-07 20:47:36 EDT
Created attachment 64165 [details]
C program to compile with g++ -lncurses
Comment 2 Thomas E. Dickey 2003-01-11 14:42:24 EST
This is fixed in ncurses 5.3 (Redhat does not deliver ncurses 5.3).
Comment 3 Eido Inoue 2003-01-20 16:49:54 EST
marking as a duplicate of the "5.3 solves all problems" bug

*** This bug has been marked as a duplicate of 77585 ***
Comment 4 Red Hat Bugzilla 2006-02-21 13:49:13 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.