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.
Summary: | Loop Halting in a C Project | ||
---|---|---|---|
Product: | cnd | Reporter: | soldatov <soldatov> |
Component: | Terminalemulator | Assignee: | ilia |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
soldatov
2017-09-16 19:15:06 UTC
From me =============================== Can you try 2 samples? with delay ================================================= #include <stdio.h> #include <unistd.h> int main() { double x; for (x = 0.0; x <= 5.0; x += 0.1) { printf("%f %f\n", x, x); } sleep(1); return 0; } force a write from buffer to stdout ================================================= #include <stdio.h> int main() { double x; for (x = 0.0; x <= 5.0; x += 0.1) { printf("%f %f\n", x, x); } fflush(stdout); return 0; } From Moshe Milshtein ===================================== Flushing or closing stdout does not help. My locale is en_US.UTF-8. Adding a delay after the loop with sleep(1) (as suggested by soldatov) solves the problem. Link to e-mail thread: https://netbeans.org/projects/cnd/lists/users/archive/2017-09/message/17 Hm. I can reproduce this bug in NetBeans 8.2 patch 2, but original NetBeans 8.2 works nicely. I see stable bug in NetBeans 8.2 patch 2 and NetBeans 8.2 original if I uses such code (50.0 instead of 5.0): #include <stdio.h> int main() { double x; for (x = 0.0; x <= 50.0; x += 0.1) { printf("%f %f\n", x, x); } return 0; } |