Hi, can anybody give me a hand? I have a script I'm trying to de-bug but it's like stumbling around in a coal shed looking for a black cat in the dark. I've managed to fine down the trouble area to a copying loop which selects by colour and pastes into a new layer. It does this for every colour so can build up quite a number of layers before it terminates. Some days it'll run 100 times out of 100 but sometimes it aborts part way through with the empty list error "Error: car: argument 1 must be: pair."
There appears to be no consistency in where it will stop - it could be on layer 4 or layer 40. I've tried it on several computers all running Gimp 2.6 and the frequency does seem to possibly be hardware related in that it fails more frequently on one computer. CPUs and memory are all similar spec.
If I was writing this in machine code I'd be looking for a stack overflow but with a script I just don't know where to look.
I would have thought that if a script runs once, it ought to run every time but it obviously isn't that simple. Are there instances where the "car" error can be thrown unpredictably?
Any assistance gratefully received.