Re[2]: Prothon bug: strange interaction between self andadd_

"Mark Hahn" <[email protected]> Wed, 19 May 2004 18:58:46 -0700
Newsgroups gmane.comp.lang.prothon.devel
Message-ID <008a01c43e0d$fc87ed40$0d01a8c0@MarkVaio>
Lenard Lindstrom wrote:

> I am in no rush. I was thinking it may be the garbage collector. The
> best way to check this is increase the number of iterations in the
> for loop. Remove the print statement from the loop and place it after
> the loop.
>
> niters = 1000     # Adjust number of iterations here
> for i in niters:
>     m = m + n
> # If it gets this far print the result and verify it is correct
> print "%i, %s" % (m, m.protoList().str_())
> if m != (niters + 1) % 8 or m.protoList().len() != 5:
>     print "*** Error ***"
>
> If everything is working properly the integer value should be between
> 0 and 7 inclusive and the protoList should have five entries.

I did increase the loop size and that helped, although when the problem is
occuring it usually happens in the first 10 or 20 loops or it works forever.

As I said in the other message, I am getting the problem to occur in my
slower laptop.  I'm running the development system on the laptop and
observing the symptoms.  They are really bizzare.  When there is data
corruption and you don't see the error until much later, you are only
looking at fragments of a long chain reaction of symptoms. I've worked on a
lot of systems with multiple threads over the years so I'm used to this.

Meanwhile you can play with the garbage collector turned off if you want to.