GNOME Bugzilla – Bug 444992
crash adding to aspell dictionary with no word selected
Last modified: 2007-07-06 03:46:02 UTC
Steps to reproduce: 1. launch application 2. close tip window 3. Select Document:Check Spelling... from the menu 4. click the "Add" button in the Check Spelling window 5. segfault Stack trace: Program received signal SIGSEGV, Segmentation fault.
+ Trace 138961
Thread 46962791714912 (LWP 4487)
$1 = (Tbfspell *) 0xc1aad0 (gdb) print *bfspell $2 = {spell_config = 0x792540, spell_checker = 0x0, filtert = filthtml, win = 0xbb2510, lang = 0x78e0d0, filter = 0x78e340, langs = 0xc51780, dict = 0xbc3280, runbut = 0xbbc0c0, repbut = 0xbbc430, ignbut = 0xbbc380, in_doc = 0x78b1a0, in_sel = 0x78b260, incorrectword = 0x7424b0, suggestions = 0xbbb6d0, doc = 0x0, offset = 0, stop_position = 0, so = 0x0, eo = 0x0, bfwin = 0x98d770} (gdb) print bfspell->doc->buffer Cannot access memory at address 0x88 (gdb) print bfspell->doc $3 = (Tdocument *) 0x0 (gdb) quit Other information: originally reported by Cory Doctorow
Created attachment 89528 [details] [review] patch to add guards preventing the segfault This patch guards the segfaults I found, which may not be all of them. You may prefer a more specific fix.
To my knowledge, Jim already fixed this issue (untested). Your report seems to be a duplicate of http://bugzilla.gnome.org/show_bug.cgi?id=378825. The fix can be seen at http://bluefish.cvs.sourceforge.net/bluefish/bluefish-gtk2/src/bfspell.c?r1=1.26.2.3&r2=1.26.2.4&pathrev=bluefish_1_0. However, the fix turns off the "Add word" button forever. Seems, we need to fix this. Adjusting severity. It's not nice but IMO not critical.
Yes, the patch seems to work, and is a better fix. Thanks. It doesn't turn off the "Add Word" button forever, just when the "Misspelled word" field (which is oddly uneditable) is empty. The crash caused (repeated) data loss for the original reporter. I would have thought because of this a crash should be considered especially critical for an editor.
Doh! Missed a part of the patch. Yes it works. Will be applied to the Debian package soon. You can then file a sync-request for Ubuntu. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 378825 ***
Thanks for pushing an update!