Darwinbots Forum

Code center => Bugs and fixes => Bug reports => Topic started by: Testlund on November 01, 2006, 05:29:28 AM

Title: crashing in 2.42.8d
Post by: Testlund on November 01, 2006, 05:29:28 AM
Looks like there has been a bug introduced in this version that causes DB to crash displaying the message "Darwinbots has encountered a problem and needs to close". There's no saved sim but I can upload the settings file I use if needed.
Title: crashing in 2.42.8d
Post by: Henk on November 01, 2006, 05:50:51 AM
I got an division by zero error last night, see added error.sim (the 800kb one)

[attachment=411:attachment]
Title: crashing in 2.42.8d
Post by: EricL on November 01, 2006, 11:29:00 AM
The larger of HenK's sims isn't a divide by zero, it's an overflow.  A bunch of bots in the sim have ridiculously high position values.  The overflow occurs when these Single valued position coordinates get assigned to a local Long in the bot drawing routine.  This is where the crash occurs, but the root of the bug happened a while back in the cycle when those wacky positions got calculated.

Debugging these kind of problems where the crash happens long after the actual bug can be a bitch.  My theory is that there is an issue with the way the intrasim teleporter chooses a new random positions.  Both the X and Y position values of the bot have wacky values and there are several bots that all got wacky values that cycle.  This points to the intrasim teleporter as your sim includes a large one capable of teleporting a bunch of bots all in the same cycle.

Testlund, does your sim include a intrasim teleporter?

Henk, the other error.sim you posted crashes because the field dimensions are 0.  Got any more info on this sim?
Title: crashing in 2.42.8d
Post by: Testlund on November 02, 2006, 06:50:48 AM
No, I have no teleporters in that sim. In version 2.42.8c it's been running smoothly for weeks, so I'm pretty sure it must be something that you put into the 2.42.8d version that causes it. I'm running with shapes, simple horisontal and vertical maze plus a bunch of rectangles moving around at slowest speed.
Title: crashing in 2.42.8d
Post by: EricL on November 02, 2006, 10:22:31 AM
Testlund, could you post the sim you are using?  I'll let it run a while and try to catch it in the IDE.  I'm pretty sure HenK's issue is the teleporter, so probably two different problems here.  Thanks.
Title: crashing in 2.42.8d
Post by: Testlund on November 02, 2006, 02:29:48 PM
You can try this sim I just started and saved. It should crash within a few hours.

Edit: Changed to another saved file. Forgot to set up the sim the way I had it when it crashed.
Title: crashing in 2.42.8d
Post by: Testlund on November 02, 2006, 02:30:40 PM
You also need this veggie I think.
Title: crashing in 2.42.8d
Post by: Testlund on November 02, 2006, 02:38:47 PM
One more thing... The settings for the shapes aren't saved. You need to enter the topography and select black color and allow horizontal and vertical drift at the slowest speed and let shapes absorb shots. ...and I chosed not to display movement vectors in the robot settings.
Title: crashing in 2.42.8d
Post by: Henk on November 02, 2006, 04:57:54 PM
Quote from: EricL
The larger of HenK's sims isn't a divide by zero, it's an overflow.  A bunch of bots in the sim have ridiculously high position values.  The overflow occurs when these Single valued position coordinates get assigned to a local Long in the bot drawing routine.  This is where the crash occurs, but the root of the bug happened a while back in the cycle when those wacky positions got calculated.

[...]

Henk, the other error.sim you posted crashes because the field dimensions are 0.  Got any more info on this sim?

No sorry haven't a clue... it sure isn't the sim I deliberatly attached to this particular post. The attachment thingy gives me trouble sometimes. Took me several tries to get it right.
Title: crashing in 2.42.8d
Post by: EricL on November 03, 2006, 11:41:30 AM
Testlund, I found your crash.  Its described in #42 here (http://www.darwinbots.com/Forum/index.php?act=ST&f=10&t=1568&st=0).