| <<O>> Difference Topic YgorProblemsAndKnownBugs (r1.3 - 28 May 2008 - JoeBrandt) |
| Added: | |
| > > |
|
| <<O>> Difference Topic YgorProblemsAndKnownBugs (r1.2 - 24 May 2008 - JoeBrandt) |
| Changed: | |
| < < |
Problem |
| > > |
Common Ygor Problems & Known Bugs |
| Changed: | |
| < < | Common Ygor Problems & Known Bugs |
| > > | TOC: No TOC in "Knowledge.YgorProblemsAndKnownBugs" |
| Changed: | |
| < < |
Solution |
| > > |
|
| Changed: | |
| < < |
|
| > > |
Make Related Errors
|
| Changed: | |
| < < |
|
| > > |
Compiler/Environment Setup
Data Description Problems
General Code Gotcha'sManager 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: |
| Added: | |
| > > |
'C' codeRule #1: Only if you must, and with great care. I ran across this one recently: In file foo1.c:
void foo(float a, float b, int c)
{
}
and referenced by a function in another file:
void bar()
{
foo( (float)1.0, (float)2.0, (int) 3);
}
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 Win32 Errors
|
| Deleted: | |
| < < | -- AmyShelton - 11 Sep 2003 |
| <<O>> Difference Topic YgorProblemsAndKnownBugs (r1.1 - 11 Sep 2003 - AmyShelton) |
| Added: | |
| > > |
%META:TOPICINFO{author="AmyShelton" date="1063312653" format="1.0" version="1.1"}%
%META:TOPICPARENT{name="MnCKnowledge"}%
ProblemCommon Ygor Problems & Known BugsSolution
for (int i = ManagerId::ParameterCount; i < MyManagerId::ParameterCount; ++i)
{
if (p[i] == 0)
{
print a warning !
}
}
-- AmyShelton - 11 Sep 2003
%META:FORM{name="WebForm"}%
%META:FIELD{name="TopicClassification" title="TopicClassification" value="NoDisclosure"}%
%META:FIELD{name="OperatingSystem" title="OperatingSystem" value=""}%
%META:FIELD{name="OsVersion" title="OsVersion" value=""}% |
| Topic YgorProblemsAndKnownBugs . { View | Diffs | r1.3 | > | r1.2 | > | r1.1 | More } |
|
Revision r1.1 - 11 Sep 2003 - 20:37 GMT - AmyShelton Revision r1.3 - 28 May 2008 - 21:06 GMT - JoeBrandt |
Content copyright © 1999-2007 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. |