Bug 96650 - Segmentation fault when looking for next fuzzy or using PageDown
Summary: Segmentation fault when looking for next fuzzy or using PageDown
Status: RESOLVED WORKSFORME
Alias: None
Product: kbabel
Classification: Miscellaneous
Component: KBabel editor (show other bugs)
Version: 1.9.1
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Stanislav Visnovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-09 18:50 UTC by Frans Pop
Modified: 2006-04-27 11:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File that causes the crash (21.43 KB, application/x-gzip)
2005-01-09 18:52 UTC, Frans Pop
Details
Config files (from before upgrade to current version of kbabel). (95.25 KB, application/x-tgz)
2005-02-07 15:36 UTC, Frans Pop
Details
Proposed patch (1.33 KB, patch)
2005-02-28 07:50 UTC, Stanislav Visnovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frans Pop 2005-01-09 18:50:44 UTC
Version:           1.9.1 (using KDE KDE 3.3.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

KBabel crashes when I get to the 6th string in the attached file (Dutch translation of Debian release notes for Sarge).
No crash dialog is shown; if I start kbabel from the command line, the only thing I get is "segmentation fault".

I tried running the program in strace (strace kbabel --no-fork <file>) but when I do, the crash does _not_ happen.
Running with --no-fork but without strace _does_ crash.

This may be related to #46586, but as I'm not sure I decided to open a new bug.
Comment 1 Frans Pop 2005-01-09 18:52:50 UTC
Created attachment 9005 [details]
File that causes the crash
Comment 2 Frans Pop 2005-01-09 19:05:34 UTC
Forgot some possibly relevant library versions:
libqt3c102-mt  3.3.3-7
kdelibs4       3.3.1-4
libgcc1        3.4.3-6
libdb4.2       4.2.52-17
xlibs          4.3.0.dfsg.1-1
Comment 3 Stanislav Visnovsky 2005-02-07 13:10:55 UTC
What are the last messages on console if you run it with nofork?
Comment 4 Frans Pop 2005-02-07 15:32:17 UTC
I have managed to get rid of the problem, but can reproduce it by changing the 'Project properties' for Spelling.
- If I disable 'on the fly spellchecking', I will never get a crash.
- With 'on the fly spellchecking' enabled, I will sometimes get a crash, depending on settings; if I do get a crash, it will always be on the same string.

The main factor that determines if I get a crash seems to be the dictionary that's selected:
- with Ispell's Default (US English) dictionary the crash will happen more often than not
- with the 'Unknown [dutch]' Ispell dictionary the crash will never happen

With the Default (US English) dictionary selected:
- kbabel will always crash if I select US-ASCII encoding.
- if I switch to ISO 8859-1 it will sometimes still crash, but I can get it to work eventually by switching 'on the fly spellchecking' or 'remember ignored words' off and on a couple of times and changing the encoding. However if I close and restart kbabel it may crash again.
- if I switch to ISO 8859-15, the same happens as with ISO 8859-1, only with an error 'charsets iso-8859-4 .. iso-8859-15 not supported yet'.

I'm not sure if the encoding really is relevant as switching encodings seems to make no difference at all with the Dutch dictionary selected.
Especially since the string on which the crash happens does _not_ contain any non-ascii characters!

Here are the console messages I've seen.

This message is always printed (even if no crash happens):
kbabel: WARNING: KGenericFactory: instance requested but no instance name or about data passed to the constructor!

The only message that will always be printed on a crash with --nofork is:
Segmentation fault
(Which is less than helpful ;-)

The full message when I select ISO 8859-15 is:
kspell (kdelibs): ERROR: charsets iso-8859-4 .. iso-8859-15 not supported yet

On three occasions I got these messages, although once not at a crash:
QObject::disconnect: No such signal QScrollBar::misspelling(const QString&,const QStringList&,unsigned int)
QObject::disconnect: No such signal QScrollBar::misspelling(const QString&,const QStringList&,unsigned int)

I will attach the config files for kbabel as they were before I upgraded to the new version of kbabel.

Hope all this helps.

Cheers,
Frans Pop
Comment 5 Frans Pop 2005-02-07 15:36:03 UTC
Created attachment 9463 [details]
Config files (from before upgrade to current version of kbabel).

I am attaching the 'old' config files as the upgrade could be a contributing
factor.
Comment 6 Stanislav Visnovsky 2005-02-07 16:05:14 UTC
I've tried to fix the spellchecker today, it's in CVS. If you can test, would be great.
Comment 7 Frans Pop 2005-02-08 11:35:01 UTC
I successfully compiled kbabel with the patch (applied against Debian 
source package for kdesdk 3.3.1 that includes kbabel 1.9.1).

Unfortunately it does not fix the segfault. I can still reproduce it in 
exactly the same way.

I tried to strace it again, but the crash still does not happen with 
strace.

Cheers,
Frans

Comment 8 Stanislav Visnovsky 2005-02-28 07:50:28 UTC
Created attachment 9878 [details]
Proposed patch

Could you, please, try this patch?
Comment 9 Frans Pop 2005-03-01 15:01:56 UTC
I've performed exactly the same tests as with the previous patch.
Unfortunately the results were also the same: no difference, the crash still happens :-(

Cheers,
Frans
Comment 10 Stanislav Visnovsky 2005-05-29 14:57:23 UTC
Frans, I'm closing this - there will be no more KDE 3.3.x
Please, reopen if it's possible to reproduce it with KDE 3.4.x