FLAM3 2.7.6 released
FLAM3 2.7.6 released, download it here. The changelog:
fixed action string overflow when many xforms are present.
added 'print_edit_depth' env var to control how many levels of
edit tags are saved when using flam3-genome. Fixed wrong
placement of random improve_colors code in flam3-genome. go to
five digit filenames. fixed bug in supershape variation. API
cleanup, thanks to david bitseff.
Ouch, flam3 has a "classic" bug....
The below is from Dave Burnett, who posted it in the wrong category, and i just moved it here but for some reason i cannot fathom i am not able to make it appear to come from Dave even though I am admin here.... anyway:
Hi Guys,
I've spent an age puzzling over a flam3 bug. Basically a flam3 genome I was given was crashing the flam3 exe that Oxidizer runs.
It was one of those problems that disappear as some as you start debugging and this particular issue also requires
exactly the correct parameters in terms of bits and isaac random seed which leads you down the wrong path on occasion.
I've finally tracked it down though and it's a classic :-)
We've got this code in flam3.c
int fn = xform_distrib[abs((int)irand(rc)) % CHOOSE_XFORM_GRAIN];
The problem with this is that abs() returns an undefined result if irand(rc) ever returns INT_MIN, which is exactly what was happening with the crasher.
On OSX abs(INT_MIN) returns INT_MIN as ABS is defined as.
x >= 0 ? (x) : (-x)
and 0 - INT_MIN = INT_MIN thanks to good old two's complement. I can see this being an issue on other OS's too.
At the moment I'm trying
int fn = xform_distrib[ abs( (int)irand(rc) % CHOOSE_XFORM_GRAIN ) ];
instead although that'll change the results a little.
Dave
The bloke who wrote Oxidizer (apart from the flam3 bits)
thanks dave, i checked in a
thanks dave, i checked in a fix which i think is a bit faster and cleaner.
i'll inform erik and eventually this will show up in the next release.
xform_distrib[((unsigned)irand(rc)) % CHOOSE_XFORM_GRAIN]

Recent comments
13 hours 8 min ago
13 hours 43 min ago
13 hours 45 min ago
13 hours 48 min ago
13 hours 53 min ago
1 day 4 hours ago
1 day 15 hours ago
1 day 15 hours ago
1 day 15 hours ago
1 day 15 hours ago