MantisBT - Open CASCADE
View Issue Details
0027043Open CASCADE[OCCT] OCCT:DRAWpublic2015-12-28 16:342018-11-26 12:31
msv 
bugmaster 
normalminor 
verifiedfixed 
WindowsVC++ 201364 bit
[OCCT] 7.0.0 
[OCCT] 7.4.0* 
0027043: Draw is sometimes crashed unexpectedly during running of test command
When I run the tests in manual mode (test command) sometimes Draw is crashed.
E.g., the script in steps to reproduce gets draw to crash on 9th iteration on my PC.
repeat 10 {test boolean gdml_private E4}
No tags attached.
related to 0027620verified apn Open CASCADE Test perf bop boxholes crashes DRAW 
related to 0027013verified bugmaster Open CASCADE test boolean gdml_private O9 gets Draw to crash 
Issue History
2015-12-28 16:34msvNew Issue
2015-12-28 16:34msvAssigned To => mkv
2015-12-28 16:50msvNote Added: 0049644
2015-12-30 10:34abvRelationship addedrelated to 0027052
2015-12-30 10:35abvAssigned Tomkv => abv
2015-12-30 10:35abvStatusnew => assigned
2016-06-20 15:27msvRelationship addedrelated to 0027620
2016-06-20 15:28msvRelationship addedrelated to 0027013
2016-10-25 12:52msvNote Added: 0059072
2016-10-25 12:52msvTarget Version7.1.0 => 7.2.0
2017-07-20 12:00msvTarget Version7.2.0 => 7.3.0
2018-05-12 21:36abvTarget Version7.3.0 => 7.4.0*
2018-06-12 22:10abvNote Added: 0076726
2018-06-13 10:35msvNote Added: 0076731
2018-11-26 10:08msvNote Added: 0081252
2018-11-26 10:08msvAssigned Toabv => bugmaster
2018-11-26 10:08msvStatusassigned => feedback
2018-11-26 10:08msvResolutionopen => fixed
2018-11-26 12:31bugmasterStatusfeedback => verified

Notes
(0049644)
msv   
2015-12-28 16:50   
When running under debugger, the following debug assertion is raised:

Program: D:\git\occt1\build\win64\vc12\bind\DRAWEXE.exe
File: f:\dd\vctools\crt\crtw32\lowio\dup2.c
Line: 59

Expression: (fh1 >= 0 && (unsigned)fh1 < (unsigned)_nhandle)


The stack trace is shown:

     msvcr120d.dll!000007fedb5083ba() Unknown
> TKDraw.dll!`anonymous namespace'::capture_end(OSD_File * tmp_file, int std_fd, int save_fd, std::basic_ostream<char,std::char_traits<char> > & log, unsigned int doEcho) Line 90 C++
     TKDraw.dll!CommandCmd(void * theClientData, Tcl_Interp * interp, int argc, const char * * argv) Line 203 C++

The line in our code is (Draw_Interpretor.cxx):

89: dup2(save_fd, std_fd);

It seems assertion is raised during duplication of the standard error channel.
(0059072)
msv   
2016-10-25 12:52   
Error disappears if we turn off logging, either by running "dlog off" command, or by adding "1" option to the end of "test" command.
(0076726)
abv   
2018-06-12 22:10   
On my home computer similar problem is reproduces as follows:

1. Copy text "test perf bapline intersect" to buffer
2. Start DRAW
3. Paste the text
4. Press Enter
==> The test starts but crashes with message "error writing "stdout": bad file number"

Notably if the same text is input directy instead of copy / paste, it works OK
(0076731)
msv   
2018-06-13 10:35   
This is not for my work PC. This test always work OK.
(0081252)
msv   
2018-11-26 10:08   
This bug has been fixed with 0027620.
Please close it.