You are here

Error message is garbled in Windows

Sometimes error messages for NaN get garbled in Windows. See the thread below.

https://openmx.ssri.psu.edu/thread/3881#comment-5574

exited abnormally with the error message: MxComputeGradientDescent: fitfunction Sat.fitfunction evaluated to 1.#QNAN0 ()

We need a script that generates this error. Rob alluded to there being one. And then we can try to fix the printing of the error message.

Reporter: 
Created: 
Wed, 08/27/2014 - 13:32
Updated: 
Fri, 11/14/2014 - 10:21

Comments

On my system, models/passing/InvalidCovarianceMLObjective.R fails because of a garbled NaN.

This is basically a bug or lack of standardization in the C library's printf function. It is easy enough to reproduce by creating infinities and special "not a number" values (NaNs) and passing them through printf at the C level. Since it is unlikely that standardization can be achieved across C library implementations, it could be argued that R should provide its own version of printf that produces output that is consistent across platforms.

I get Rob's behavior on Windows 7, R 3.1.0 using the Beta binary, but not on Windows XP, R 2.14 using a source install.

Joshua, are you suggesting this is R's problem?

> Joshua, are you suggesting this is R's problem?

Some library should provide a portable way to format numbers into strings. Since libc is failing, R could fill this role or OpenMx could fill it too.

Did we decide if this was Rob's build machine, or a windows R problem we should work around?

Odd if it is R...

I cannot currently test this because I can build from source with R 2.14 on Windows XP but can't install from the Binary. I don't see the garbled message here with the source build. And I can't build from source with R 3.1 on Windows 7 but I can install from the Binary. I do see the message problem with the binary. In short, it's a bad experimental design: R version is confounded with Windows version and OpenMx version (Binary/Rob-build vs source/Mike-build).

I now get no problem from InvalidCovarianceMLObjective.R under R 3.1.1 on Windows Vista using my source build. So, the problem is NOT specific to a version of R. I get the same behavior for R 2.14.2 and 3.1.1, both built from source on Windows Vista.

I still haven't cross-checked on a Windows 7 source build because I haven't successfully built on that OS. It could be a Windows version issue, or a Rob-build issue: unclear so far.

Assume fixed