writeln & cie. not reliable on Mac OS X

Michel Fortin michel.fortin at michelf.com
Mon Dec 21 11:38:55 PST 2009


On 2009-12-21 14:34:39 -0500, Michel Fortin <michel.fortin at michelf.com> said:

> I have an annoying problem where writing to the output stream with 
> writeln and other similar functions crash with an null dereference, but 
> it appear to depend on the order the modules are compiled or linked. I 
> wasn't able to reduce it to a
> 
> I've found a workaround. I can add this at the beginning of main():
> 
> 	std_stdio_static_this();
> 
> which forces the initialization of the standard streams and everything 
> goes well.
> 
> Basically, it looks like the std_

Oops, I didn't meant to send that message, not in that state. Please 
excuse the unterminated sentences.

There's definitely a problem that occurs at some times and not others, 
but I can't nail the exact conditions right now. The workaround works 
though.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list