On Fri, Feb 29, 2008 at 7:46 AM, James Paige <[EMAIL PROTECTED]> wrote: > > On Fri, Feb 29, 2008 at 02:19:33AM +1300, Ralph Versteegen wrote: > > On Fri, Feb 22, 2008 at 1:01 PM, <[EMAIL PROTECTED]> wrote: > > > james > > > 2008-02-21 16:01:57 -0800 (Thu, 21 Feb 2008) > > > 217 > > > Work around bug 577. If you use REDIM PRESERVE on an array of UDTs > > > while inside a WITH block, the WITH's pointer will be orphaned for > > > the remainder of the block. > > > > > > Hard to discover, but now that I know, easy to avoid. > > > --- > > > U wip/game.bas > > > U wip/whatsnew.txt > > > > I just discovered another WITH pitfall: if you GOSUB out of a WITH > > block, the WITH pointer can be overwritten. We know we're not meant to > > GOSUB out of a scope with temporary variables (actually I totally > > forgot about this myself), but it didn't occur to me that a WITH block > > creates a temporary variable. > > > > We do this in several places, and it's pretty odd/lucky that I only > > just now tripped up on this. > > Ooh! Wow. I wonder if that is what could be causing the randomish > memory corruption and crashes that Meatballsub keeps seeing. > > If you have help me find these GOSUB-in-a-WITH's (I'm talking to you, > mister emacs lisp scripter) I am sure I can either factor them out or > SUBify them all. > > --- > James Paige
Having written such a script, I found only one instance of use of a probably-corrupted with pointer: for the wait immediate debug message. Since this message prints correctly for me, it seems we were lucky, and the problem is not here. Still, sfunctions and nextsay should definitely be subified (and I was thinking about removing dumpandreturn anyway). Do you realise that if we put all of the textbox stuff into a type (and then probably globalised it), several functions' argument lists would shortened by about 11 arguments? _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
