Port of FS28 - #debug message not displayed. #172
Labels
feature
proposal for a new feature, or alleged bug triaged as intentional but warranting improvement
ToDo: discuss
action required: discuss possible solutions
http://bugs.povray.org/task/28
Details:
The #debug message stream is only being flushed when it hits a newline character,
instead of after each #debug statement. This means that some final strings don't show up.
#debug "This line prints,\n but this line doesn't."
Coments:
Comment by Christoph Lipka (clipka) - Wednesday, 20 May 2009, 19:32 GMT+5
This is a known issue; I think a convention of flushing the #debug stream at the end of each #debug statement is a reasonable idea.
Comment by Nicolas Calimet (calimet) - Wednesday, 27 May 2009, 13:25 GMT+5
No: doing so would defeat the purpose of having buffered debug output in the first place. Instead, a single, forced flush right before the render starts should be enough.
Comment by Tim Attwood (TimA) - Thursday, 28 May 2009, 02:31 GMT+5
In 3.6 some macros produced a progress bar by printing dashes.
If you only flush the buffer before render then those progress bars will be broken.
If you are worried about buffers because of file redirection, then it makes sense performance wise to actually redirect output to a file buffer, then only flush the file buffer when it's full, and at end of the render.
For the message window display it makes sense to flush after each #debug command.
Comment by Thorsten Fröhlich (thorsten) - Wednesday, 24 March 2010, 20:06 GMT+5
This did not work in 3.6 either, the buffering was included there already. One intelligent way to restore a meaningful progress output would be to implement a smart handling of "\r" (backslash-r) that would be detected by the debug message printing code and convert them into progress messages handled similar to the parser token progress messages. This could be implemented i.e. by appending any #debug stream message that ends with a backslash-r to the parser progress message display. Regular text stream output would remain as is, meaning only the last "progress debug" message before the next new backslash-n would be printed. This would reduce output of debug message junk to log files (if used), yet it would also permit meaningful progress reporting from inside the SDL
The text was updated successfully, but these errors were encountered: