Version française
Home     About     Download     Resources     Contact us    
Browse thread
Corrupt output of printf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dawid Toton <dawid.toton@u...>
Subject: Corrupt output of printf
I have a program, which output is produced only with Printf.printf .
This inner part is executed by another one (outer) using Unix.system . 
The outer executable uses print_endline before and after the inner is run.

 From time to time the output of the inner program is corrupt.

Printf.printf seemingly devours parts of single lines, as in these 
examples (all lines should have the same structure):

156 In: 5.483000, 1.500000, 1.760000
157 Sb: 5.008000, 1.494000, 1.500000
158 In: 4.498000, 1.494000, 0.750000
159160 Sb: 5.003000, 1.503000, 0.508000

Another one:

138 In: 5.000000, 0.000000, 0.253000
139 In: 5.001000, 1.000140 Sb: 5.500000, 0.000000, 0.000000
141 Sb: 5.500000, 1.000000, 0.000000

This isn't easily reproducible as it happens rarely; subsequent runs are OK.

Could anybody find a possible cause of this behavior?

Dawid