In today's discovery const char text[] = "asfakshfsd"; return text; text is not guaranteed to exist after the return. static const char text[] = "asfakshfsd"; You have to declare it static even if it's const. The problem seems to be masked by declaring the string char *text = "asfakshfsd"; In that case, g++ statically allocated it. A lot of students use char text[] because it's less intimidating than pointers. XMLTag::encode_char somehow worked for 20 years before the compiler needed to overwrite the stack. It was probably std::string.append_text requiring more memory than the old strcat. Even mighty const inside a function is in volatile memory, probably because it's in a cache for speed. Here we have the 4 filebox instances in Cinelerra: index file location, render, load, save. Render & all browse buttons use the browse button routine in file mode. Index file uses the browse button in directory mode....
Comments
Post a Comment