chainsaw@amalthea ~ $ tomatoes Error appeared: - Unable to load config file: \uffff In the get_config_location (config.cpp), first the containing directory ~/.tomatoes and afterwards the file tomatoes.cfg is opened for reading. Strace output shows that this succeeds: open("/home/chainsaw/.tomatoes/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3 fstat(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 close(3) = 0 open("/home/chainsaw/.tomatoes/config.cfg", O_RDONLY) = 3 close(3) = 0 However, things go wrong after that: open("\uffff\uffffT", O_RDONLY) = -1 ENOENT (No such file or directory) This is the first relevant line in init.cpp: load_config(get_config_location(), &config); It would appear that although get_config_location does what it should, the actual return value gets corrupted.
Ah C++ and its wonders... The c_str function translates a C++ string into a C char*, but this pointer will only be available for the next instruction! So using it to return the correct path will not work... I fixed up a patch to it (thanks strcpy), so I could burst some tomatoes happily ;)
Created attachment 79615 [details, diff] Patch to fix c_str use
The package has been revision bumped to make sure that your fix reaches all ~amd64 users. Thanks for your work on this Bernard :)
You're welcome, smashing tomatoes is good for people, even ~amd64 ones ;)