A short update: I was able to reproduce the crash with the standard build. I rebuilt the code with debugging symbols so I could get more information about the crash using GNU debugger (gdb), but when I run the debug build, it does not crash with the 142-character filename.
However, the file is listed at least twice in the file detail list... and if you switch to another directory, then come back to the same one, the file is repeated even more times. And so on and so forth!
This one is going to take a bit more work to troubleshoot.
OK, maybe not too much more.
I built with debug symbols and normal optimizations. That version still crashed, and I was hoping to find a stack trace to help me isolate the bug. When I used a 200-character name, I saw a massively corrupted stack that contained a lot of the filename data itself... a symptom of a classic buffer overrun bug for an array allocated locally (in a stack frame). The 142-character filename length reported by caminati still caused a crash, but I was able to view the stack trace to find out where it crashed. It was in the new_item_sorts_before_existing_item() function, where some local arrays for filenames were only allocated with with 128 bytes, while a filename can be up to 255.
I have created a new 0.9.0 version that has now full-sized local buffers for these filenames. I also expanded a few other local buffers in other functions that could be vulnerable to the same type of bug. I tested this version with the 142 and 200-character filenames that crashed before and they work with no problems (yet?). You can even expand the file name column in the detail window if you want to see the entire name.
New source is now posted at
http://retrospectiva.krautsoft.de/projects/useful-lightweight-software/blog.
Thanks again caminati for reporting this bug. You just helped make Fluff even stronger. (Even if that does sound like an oxymoron if taken out of context
).
--
Mike Lockmoore