NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Knowledge > MnCKnowledge > YgorProblemsAndKnownBugs
   Readme | Changes | Index | Search | Go

Common Ygor Problems & Known Bugs


Make Related Errors

Compiler/Environment Setup

Data Description Problems

General Code Gotcha's

Manager core dumps for an unknown reason. Well of course this could be anything. But for some unfortunate reason, I seem to have run into this problem too many times. Often this is due to a rearangement of the Managers parameter enumerations. Adding an enumeration without adding the code to the manager constructor is the cause. I usually add the following code to the end of my Manager constructor:

'C' code

Rule #1: Only if you must, and with great care.

I ran across this one recently: In file foo1.c:

and referenced by a function in another file: No worries right? But in foo none of the values of a,b or c are correct. Why? Well because without a prototype, the call to foo() places the floating point values onto the stack as doubles! The simple fix here is to place a prototype somewhere in an include file, so that the values are properly placed on the stack. (Of course it helps to add the -ansi and -Wall flags to gcc, but a call without a prototype is only a warning.) I should point out that this 'automatic float to double' conversion is both a feature, and a bug. This 'feature' is what allows %f to be used in printf() for both float and double types.

Alternatively, never use 'float' in argument lists, rather use double. It is my opinion that the float type will eventually become antiquated for PC-level applications. (How many of us still use the 'short' type?)

Win32 Errors

-- JoeBrandt - 24 May 2008

WebForm
TopicClassification: NoDisclosure
OperatingSystem:
OsVersion:

Topic YgorProblemsAndKnownBugs . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 28 May 2008 - 21:06 GMT - JoeBrandt
Parents: MnCKnowledge
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.