*commands_line[position] means “the first char of the code item in current position”.
position can be seen as a program counter in assembler. It gives the indice of the current G’MIC item to execute. There are special debug items which are not regular strings, but char* buffers starting with the value 1.
Debug items give info about the current line number and the command file associated to the current G’MIC command to be executed. The interpreter tries then first to ‘skip’ these particular items before starting to execute the next command. This explain the term *commands_line[position]==1 in the while loop.
No, your stack trace looks interesting. It would be nice to see what is the value of the variable position in that case, as well as the value of the image at commands_line[position]. Could you try then to show me:
print commands_line
print position
print commands_line[position]
to see if there is something strange ? Thanks by advance for your help !