This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214423

Summary: C++ output window early "RUN SUCCESSFUL"
Product: cnd Reporter: jcrada <jcrada>
Component: TerminalemulatorAssignee: Andrew Krasny <akrasny>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.1.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description jcrada 2012-06-19 09:33:56 UTC
Hi,

With Netbeans 7.1.2, when I run my C++ program which outputs information via std::cout, the Netbeans message "RUN SUCCESSFUL (total time: ###ms)" appears earlier than the whole information is presented. I am afraid that the message appears when the C++ Application signals its ending, but the console has not finished presenting the information from the application. I guess it is a thread-related problem. For example, this is the output from my application:

{
src/example/Example3.cpp [87]:Node added. Total nodes:348
src/example/Example3.cpp [87]:Node added. Total nodes:349
src/example/Example3.cpp [87]:Node added. Total nodes:350
src/example/Example3.cpp [87]:Node added. Total nodes:351
src/example/Example3.cpp [87]:Node added. Total nodes:352
src/example/Example3.cpp [87]:Node added. Total RUN SUCCESSFUL (total time: 506ms)nodes:353
src/example/Example3.cpp [87]:Node added. Total nodes:354
src/example/Example3.cpp [87]:Node added. Total nodes:355
src/example/Example3.cpp [87]:Node added. Total nodes:356
src/example/Example3.cpp [87]:Node added. Total nodes:357
}

The problem is that I am printing information from 400 nodes, and the Run Successful message gets lost, making me think that the program is still running.

Thanks
Comment 1 Andrew Krasny 2012-09-18 20:08:21 UTC
jcrada,

Is it possible that you provide a source code of your application? 
Could it be that your 'main' thread/process exits while others are running and printing?
Comment 2 Andrew Krasny 2012-09-20 16:35:32 UTC
I was able to reproduce the problem.
Comment 3 Andrew Krasny 2012-09-20 16:42:24 UTC
Fixed with:
http://hg.netbeans.org/cnd-main/rev/a864be9b6a17
Comment 4 Quality Engineering 2012-09-21 02:27:52 UTC
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a864be9b6a17
User: Andrew Krasny <akrasny@netbeans.org>
Log: #214423 - C++ output window early "RUN SUCCESSFUL"