Difference between revisions of "ChucK/Bugs/Known"
From CSWiki
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | These following have been verified and will be fixed in an upcoming release. | |
---- | ---- | ||
− | + | == Multiple Declarations (FIXED) == | |
− | |||
* multiple declarations in single statement causes crashes/undefined behavior. Example: | * multiple declarations in single statement causes crashes/undefined behavior. Example: | ||
+ | // bug: this causes bad things to happen | ||
int a, b; | int a, b; | ||
+ | Here is a workaround until the bug is fixed: | ||
+ | // workaround | ||
+ | int a; int b; | ||
+ | |||
+ | |||
+ | == Sporking Non-static Member Functions (FIXED) == | ||
* spork a non-static member function causes crashes/undefined behavior. Example: | * spork a non-static member function causes crashes/undefined behavior. Example: | ||
class X | class X | ||
{ | { | ||
− | void | + | fun void foo() { <<< "hi" >>>; } |
} | } | ||
− | + | ||
X x; | X x; | ||
− | + | ||
// bug: causes crash and undefined behavior | // bug: causes crash and undefined behavior | ||
spork ~ x.foo(); | spork ~ x.foo(); | ||
+ | |||
+ | Here is workaround, using a wrapper: | ||
+ | |||
+ | https://lists.cs.princeton.edu/pipermail/chuck-users/2006-June/000714.html | ||
+ | |||
+ | |||
+ | == ++/-- inline bugs (FIXED) == | ||
+ | * ++/-- causes incorrect behavior when used inline. Example: | ||
+ | |||
+ | // bug | ||
+ | i++ * y++ => z; | ||
+ | |||
+ | Workaround: split into multiple statements | ||
+ | |||
+ | |||
+ | == Static class variable initialization == | ||
+ | * static class variables are initialized incorrectly. Example: | ||
+ | |||
+ | class X | ||
+ | { | ||
+ | // bug - this is not initialized | ||
+ | static Object our_object; | ||
+ | } | ||
+ | |||
+ | Here is a workaround: | ||
+ | |||
+ | class X | ||
+ | { | ||
+ | // declare as reference | ||
+ | static Object @ our_object; | ||
+ | } | ||
+ | |||
+ | // initialize outside class | ||
+ | new Object @=> X.our_object; | ||
+ | |||
+ | |||
+ | == Extending Non-public classes to Public classes (FIXED) == | ||
+ | * this doesn't work: | ||
+ | |||
+ | class myEvent extends Event | ||
+ | { | ||
+ | int value; | ||
+ | } | ||
+ | |||
+ | public class bla | ||
+ | { | ||
+ | myEvent some_event; | ||
+ | } | ||
+ | |||
+ | |||
+ | == Log/output not flushed on Windows XP == | ||
+ | * output are not flushed correctly on XP. |
Latest revision as of 20:39, 5 August 2006
These following have been verified and will be fixed in an upcoming release.
Contents
Multiple Declarations (FIXED)
- multiple declarations in single statement causes crashes/undefined behavior. Example:
// bug: this causes bad things to happen int a, b;
Here is a workaround until the bug is fixed:
// workaround int a; int b;
Sporking Non-static Member Functions (FIXED)
- spork a non-static member function causes crashes/undefined behavior. Example:
class X { fun void foo() { <<< "hi" >>>; } } X x; // bug: causes crash and undefined behavior spork ~ x.foo();
Here is workaround, using a wrapper:
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-June/000714.html
++/-- inline bugs (FIXED)
- ++/-- causes incorrect behavior when used inline. Example:
// bug i++ * y++ => z;
Workaround: split into multiple statements
Static class variable initialization
- static class variables are initialized incorrectly. Example:
class X { // bug - this is not initialized static Object our_object; }
Here is a workaround:
class X { // declare as reference static Object @ our_object; } // initialize outside class new Object @=> X.our_object;
Extending Non-public classes to Public classes (FIXED)
- this doesn't work:
class myEvent extends Event { int value; }
public class bla { myEvent some_event; }
Log/output not flushed on Windows XP
- output are not flushed correctly on XP.