Code center > Bugs and fixes

Saves gets corrupted in 2.42.5a too.

(1/2) > >>

Testlund:
I have attached a zip here that causes an overflow error when ever I try to load it. This is from version 2.42.5a.

EricL:
I think this is that same timing dependent crash I've been trying to catch forever.  There is nothing wrong with the sim file itself.  It is not corrupted and loads and runs fine under VB.  But something in the sim causes an overflow in the naked exe after only a few cycles.  Damn, I sure wish it would happen in VB.  I'm too lazy to use a real debugger...

Testlund:
That sounds problematic. This happens more often since 2.42.5. Maybe it's something that you have worked on in these releases that causes it.

EricL:
I ran it all night in VB without a crash.  But when I save that sim and load it in the exe, the overflow happens within a few cycles but not always the same number of cycles.  It's timing dependent in some way.  I can load the same sim time and time again and it will crash at different times, sometimes on the first cycle it gets to run, sometimes as late as 20 cycles afterwards...  I've tried stripping the mutation details and using an exe without any compile optomizations.  Same results.  Something about running under VB, either the timing overhead or a difference between compiled and interpreted code is the root cause here....

I'll stay on it...

EricL:
[attachment=308:attachment]Okay, I found this one.   What a royal fricking pain in the butt tracking this one down has been.

So, the issue is that some of the bots in Testlund's sim have really wacky mutation means and standard deviations, like -1 X 10 ^20.  My assumption is that this happened when this sim was saved prior to 2.42.5 and then re-loaded or when specific bots were so saved.   A long value paremter in ChangeDNA() was overflowing when a super large Single was being passed to it from PointMutation(), the result of the wacky point mutation probability values.

The reason it only occurred in the EXE and not in the VB IDE probably has to do with the IDE using different calling conventions or having some sort of underlying implicit Single to Long aliasing scheme.

Anyway, In 2.42.6, I've added some sanity checking for both the Gauss routine (which consumes these parameters to determine the mutation length) as well as in the sim file load routine itself.  If you load a pre 2.42.5 saved sim (or any other sim) and the mutation values are way out of wack (negative or over 32000) then I set the mutation mean and standard deviation to the default values.  This way, old sims should run okay even if they were saved with mucked up values.

Whew.  This one was really bugging me.

Testlund, attached is your sim, saved without mutation details and with the default mutation values.  Hopefully, it uploaded okay.

By the way, you owe me a beer.  

Navigation

[0] Message Index

[#] Next page

Go to full version