Bug 264779 - krunner crashes with spellcheck plugin
Summary: krunner crashes with spellcheck plugin
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 4.7.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 288372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-29 19:09 UTC by Rohan Garg
Modified: 2012-10-26 23:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.3


Attachments
Valgrind log for krunner (93.87 KB, text/plain)
2011-01-29 19:11 UTC, Rohan Garg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Garg 2011-01-29 19:09:43 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

When trying to check a correct spelling with krunner and then trying to delete the word with the backspace key, krunner crashes and does not startup again

Reproducible: Always

Steps to Reproduce:
1) Enable the spell check plugin
2) Type " spell synthesize " in krunner
3) Press backspace 3-4 times in order to clear krunner
4) krunner crashes

Actual Results:  
krunner crashes

Expected Results:  
i'd expect krunner to clear the last alphabet using the backspace key
Comment 1 Rohan Garg 2011-01-29 19:11:56 UTC
Created attachment 56628 [details]
Valgrind log for krunner
Comment 2 Yohan Pereira 2011-03-22 17:32:08 UTC
can confirm this one in 4.6.1 too. 
Pressing backspace is not needed just type spell aaaaaaaaaaaaaaaaaaaaa or something like that dont hold down the key type them slowly. probably has something to do with the sugested words thing.
Comment 3 Myriam Schweingruber 2011-12-12 07:44:37 UTC
*** Bug 288372 has been marked as a duplicate of this bug. ***
Comment 4 Simeon Bird 2012-09-04 01:04:05 UTC
This is caused by the spellchecker calling "setLanguage", which is not thread-safe. 

I have a fix, submitted as 
https://git.reviewboard.kde.org/r/106242/

[related fix at:
https://git.reviewboard.kde.org/r/106244/]

awaiting review.
Comment 5 Simeon Bird 2012-10-26 23:29:05 UTC
Git commit 124e35885b8cd1b593b7b83a070bd0bdb5758661 by Simeon Bird.
Committed on 20/10/2012 at 03:16.
Pushed by sbird into branch 'KDE/4.9'.

Fix the plasma spellchecker's 'foreign language' support.
Previously this caused segfaults (even if not used) because
it called setLanguage(), which is not thread-safe, in match().

Instead, this patch constructs a new speller safely for each new
language, without deleting the old one. Old spellers are instead
deleted on the teardown() signal.

While we're at it, amend the language detection so that the user
can type natural language names (eg, 'german') and have the
spell-checker find the right language.

REVIEW: 106244
Related: bug 303831
FIXED-IN: 4.9.3

M  +121  -37   runners/spellchecker/spellcheck.cpp
M  +8    -2    runners/spellchecker/spellcheck.h

http://commits.kde.org/kdeplasma-addons/124e35885b8cd1b593b7b83a070bd0bdb5758661