User-Agent: Mozilla/5.0 (X11; U; Linux i686; el-GR; rv:1.8.1.1) Gecko/20061221 Firefox/2.0.0.1 Build Identifier: Mousepad segfaults consistently when starting with an empty (zero bytes) configuration file. Reproducible: Always Steps to Reproduce: 1. Backup and remove ~/.config/mousepad/mousepadrc 2. touch ~/.config/mousepad/mousepadrc 3. start mousepad Actual Results: Mousepad exits with a segfault before displaying a window. Expected Results: It should start. Tested on Fedora 6 / GTK+ 2.10.4.
Reproduced on Debian Etch, gtk 2.8.20, glib 2.12.4 and svn revision 24535.
Created attachment 950 patch to fix crashes due to invalid mousepadrc
The patch in comment #2 at least seems to fix it. It simply invalidates the mousepadrc if an eof is found. It also doesn't seem to crash on invalid data, but it might load some invalid settings depending on the contents of the mousepadrc.
Created attachment 951 another version of the patch with some extra error checking
The patch fixes it here, too.
We really need to fix the problem that we assume that if the file exists, it's data is valid. Fix forthcoming
Alex, I've applied you patch for now, so this is fixed in trunk. I'm leaving this bug open to remind me to backport the fix for 4.4.1
Thank you :) I was thinking of converting the mousepadrc to XfceRc, but then realized that that would probably create backwards compatibility problems with the old format. So I just added some error detection. And it'll get an overhaul anyway as mousepad is rewritten, right?
Will this be released in 4.4.2 since it doesn't appear it made 4.4.1?
I'm not sure off hand if this patch made it back to the 4.4 branch. This bug fell off the radar when Nick's branch hit. I'll double check if it's in 4.4.2 and if not, put it in for 4.4.3
The patch didn't make it to 4.4.2. Is there a way to backport it? Cheers,
MM i though backport this to trunk... Backing it a blocking 4.6 bug so I won't forget...
Committed to the xfce_4_4 branch too in rev. revision 27853.