New Bug [Attn: Robert Craig]
- Posted by Mario Steele <eumario at trilake.net> Feb 15, 2005
- 481 views
I know this isn't a fix to implement a new feature, unless you call machine level exceptions on a regular basis a new feature. Basically, what I'm doing, is creating a small pre-processor of sorts, that loads a file up, tokenizes it, and spits it back out in the tokenized format, to experiment with a few things. When dealing with a large file, I figured that Sequence operations would be slower, and I wanted to see about boosting speed. This is where I ran into the problem. When I allocated a file, into Memory, and started using peeks to gather the data I wanted, I started getting strange errors. These comming up at random places, when I changed code. When I first converted the functions from Sequence Operations to Memory, I used strict machine_func()/machine_proc() to do it, to avoid any dependencies on outside libraries to do what I want. When I got to executing the code, it crashed out of no-where, at a statement that wasn't even dealing with memory. So I figured, allright, I'll temporarly use machine.e, and file.e to see if it might be what I'm writting that is causing the problems. This worked for a time, till the program crashed again, with the same problem, a machine level exception occured, and this time, it was totally on a diffrent section of code, that, again, didn't have anything to do with the normal peek() and poke(). After looking through both error files, to see if I can track down what was going on, I came to find a Major bug. What I first thought was not memory assignment errors on my part, turned out to be, memory handling by the interpreter itself. In one instance, it was crashing on a if statement, where it'd be getting the return from the function to the statement. The next crash, came when I was assigning a Token to my sequence of tokens. If I remember right, I ran into these problems before in 2.4, 2.3, and even 2.2 of the interpreter, but never got around to posting the bug report about it, since they was all in final versions when I found the bug, and I didn't think no more about it. The only thing I can think of, is that the memory block is getting corrupted, and somehow, Euphoria is thinking that I'm trying to access it's memory block, which is doubtful, since both crashes occured no where near one of my memory input routines. Or Euphoria is attempting to use my memory, or some peice of memory very close to mine, and It's not liking it very much. In either case, When I'm running the program, the program always crashes when it get's to a point, of just doing straight reads, and no writting to my memory blocks, only Euphoria's own memory blocks, or so I assume. Hope this helps out, cause I don't want to release the code for this on the list, as it's privitized code. Mario Steele