Code center > Bug reports

Virus insertion

(1/2) > >>

Anonomous Guest Person:
For some reason, every single virus I've looked at in the victim's DNA seems to be inserted BEFORE a stop as opposed to AFTER a stop (making it, from cond to stop, technically apart of another gene)

For theoretical example, say you have a virus like:
cond
start
0 .aimdx store
0 .aimsx store
stop

And it gets inserted into a bot like:
cond
*.nrg 1000 >
start
15 .repro store
100 .strbody store
15 .aimdx store
stop

Then the result seems to become:
cond
*.nrg 1000 >
start
15 .repro store
100 .strbody store
15 .aimdx store
cond
start
0 .aimdx store
0 .aimsx store
stop
stop

This bug occurs in v2.42.8 by the way.

EricL:
This would not surprise me.  Viruses are an area that have been on the "verify it works right" list for the 2.4 fork for a long time, but I have not managed to get to it.  There have been some fixes to the core gene parsing routines in the 2.4 code fork however which could have broken this, so an insertion problem like this would not surprise me in the least.

Do you have a sim with a bot that exhibits this?  It need not be fancy or clean, just something I can use to excercise the code and step through it in the debugger.  Thanks.

EricL:
Okay, I think I found this via code inspection.  Looks like AddGene wasn't adding 1 to what was being returned by NextStop(), which returns the position of the next stop codone in a genome.  Hopefully, I can release a buddy drop later today.  A sim which demonstrates the bug would still be nice so I can verify the fix.  Thanks.

Anonomous Guest Person:

--- Quote from: EricL ---Okay, I think I found this via code inspection.  Looks like AddGene wasn't adding 1 to what was being returned by NextStop(), which returns the position of the next stop codone in a genome.  Hopefully, I can release a buddy drop later today.  A sim which demonstrates the bug would still be nice so I can verify the fix.  Thanks.
--- End quote ---

Thanks!

I might be uploading this wrong or something, but here.

EricL:
Thanks.  Your sim posted fine.  It was what I thought it was.  Stay tuned for a buddy.

Navigation

[0] Message Index

[#] Next page

Go to full version