Bug 448413 - hunspell segfaults on Polish .tex file
Summary: hunspell segfaults on Polish .tex file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: hunspell
Version: 9
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-26 16:09 UTC by Michal Piotrowski
Modified: 2008-06-06 07:50 UTC (History)
1 user (show)

Fixed In Version: 1.2.1-7.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-06 07:50:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test file (112 bytes, text/x-tex)
2008-05-26 16:29 UTC, Michal Piotrowski
no flags Details

Description Michal Piotrowski 2008-05-26 16:09:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5) Gecko/2008043010 Fedora/3.0-0.60.beta5.fc9 Firefox/3.0b5

Description of problem:
When I try to invoke spell checking from tools menu I have a message "The spelling program seems to have crashed".

My locale is pl_PL.UTF-8. I have installed:
hunspell-pl
aspell-pl
kde-i18n-Polish
kde-l10n-Polish

I have selected Polish locale in KDE settings.

Version-Release number of selected component (if applicable):
kile-2.0.1-1.fc9.x86_64

How reproducible:
Always


Steps to Reproduce:
1. In Kile choose Tools->Spell checking

Actual Results:
Error message showed up.

Expected Results:
Spell checking window should show up.

Additional info:

Comment 1 Rex Dieter 2008-05-26 16:20:01 UTC
fwiw, works fine here for English. ??

Comment 2 Kevin Kofler 2008-05-26 16:25:23 UTC
Sounds like fallout from my FeatureDictionary patches in any case.

Comment 3 Kevin Kofler 2008-05-26 16:29:19 UTC
This might be an encoding issue (e.g. latin2 being passed to Hunspell when it's 
expecting UTF-8).

Comment 4 Michal Piotrowski 2008-05-26 16:29:46 UTC
Created attachment 306688 [details]
Test file

I have noticed that when I run hunspell from command line and select TeX file
to check then hunspell segfaults. I am attaching simple file which I used for
testing.

I guess that problem is in hunspell not in Kile so I will change component.

Comment 5 Kevin Kofler 2008-05-26 16:50:39 UTC
As a workaround, you can set up Kile (and other KDE 3 apps using the old KSpell 
interface) to use aspell instead of hunspell by following the following 
procedure:
1. su -c "yum install kdebase3"
2. kcmshell spellchecking
3. set the program to Aspell and click OK
Of course, this only papers over the real bug, but if you need spellchecking in 
Kile now, you may find it useful. To reverse this, set the program back to 
Hunspell in kcmshell spellchecking.

Comment 6 Caolan McNamara 2008-05-26 17:56:33 UTC
I didn't get any crash from

yum -y install hunspell-pl
export LANG=pl_PL.UTF-8
hunspell spell-test.tex

Is there some specific way to get that reported crash ? In the meantime I'll
install kile and see if that crashes for me

Comment 7 Caolan McNamara 2008-05-26 17:58:44 UTC
Hmm, I launch kile from a pl_PL.UTF-8 locale I still don't get a crash on that
sample document

Comment 8 Michal Piotrowski 2008-05-26 18:41:58 UTC
I tested it on two x86_64 installations. I can try to download and install debug
info, but it will take me a while. For now when I run hunspell i gdb I have:
(gdb) run spell-test.tex
Starting program: /usr/bin/hunspell spell-test.tex
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x00000000004065b8 in __gxx_personality_v0 ()

Comment 9 Kevin Kofler 2008-05-26 19:03:11 UTC
What's your (exact) locale? pl_PL.UTF-8?

Comment 10 Caolan McNamara 2008-05-26 19:09:57 UTC
ah, x86_64, silly me. I see it now.

Comment 11 Michal Piotrowski 2008-05-26 19:32:22 UTC
I don't know if it is still needed but I paste stacktrace from gdb with
debuginfo installed:

Starting program: /usr/bin/hunspell spell-test.tex

Program received signal SIGSEGV, Segmentation fault.
LaTeXParser::look_pattern (this=0x5c, col=0) at latexparser.cxx:107
107                     while ((*k != '\0') && (tolower(*j) == *k)) {

Comment 12 Michal Piotrowski 2008-05-26 19:36:10 UTC
#0  LaTeXParser::look_pattern (this=0x5c, col=0) at latexparser.cxx:107
#1  0x000000000040681a in LaTeXParser::next_token (this=0x2ad47c0) at
latexparser.cxx:139
#2  0x00000000004049fa in interactive_line (parser=0x2ad47c0, pMS=0x105e2a0,
filename=0x7fffb07f8470 "spell-test.tex", tempfile=0x29dcb10) at hunspell.cxx:1094
#3  0x0000000000404cc0 in interactive_interface (pMS=0x105e2a0,
filename=0x7fffb07f8470 "spell-test.tex", format=<value optimized out>) at
hunspell.cxx:1149
#4  0x0000000000405191 in main (argc=2, argv=0x7fffb07f6938) at hunspell.cxx:1427

Comment 13 Caolan McNamara 2008-05-26 19:40:44 UTC
All good now, bad sizeof calculation. Will be fixed in hunspell-1.2.1-7.fc9

Comment 14 Fedora Update System 2008-05-26 22:02:06 UTC
hunspell-1.2.1-7.fc9 has been submitted as an update for Fedora 9

Comment 15 Fedora Update System 2008-05-29 02:46:42 UTC
hunspell-1.2.1-7.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update hunspell'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4566

Comment 16 Fedora Update System 2008-06-06 07:50:16 UTC
hunspell-1.2.1-7.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.