Paul A. Rubin wrote:
... except for the bug, reported long ago for other versions, that
opening multiple documents and then spell-checking more than one of
them causes LyX to crash. Still.
Cool! Detailed HOWTO please.
Seems to be somewhat document-dependent, and may vary by astrological or
meteorological conditions. I'm attaching two files from one of my
classes. I can crash LyX using the following algorithm:
1. Open both docs (order seems immaterial).
2. Spell check one of them (again, does not seem to matter which) and
click "Ignore All" every time a word is flagged. (My spelling is
impeccable, so this is the appropriate response each time.)
3. Switch to the other document, position the cursor at the beginning,
and commence checking. The first time I click "Ignore All", LyX
disappears into bit oblivion.
Ok, the attached patch fixes the crash and allows you to spell check
multiple docs.
Jean-Marc, I have no idea why this bit of code exists but it is just plain
bad! The rest of the code assumes the existence of a valid speller_, so
resetting the pointer to 0 is just evil. Noetheless, I think that we should
recreate it in case the user has changed his lyxrc preferences.
Note that no such patch is needed for 1.4.x.
Ok to commit?
Angus
Index: src/frontends/controllers/ControlSpellchecker.C
===================================================================
RCS file:
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.C,v
retrieving revision 1.36.2.4
diff -u -a -u -r1.36.2.4 ControlSpellchecker.C
--- src/frontends/controllers/ControlSpellchecker.C 10 May 2005 15:00:13
-0000 1.36.2.4
+++ src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 09:01:14
-0000
@@ -63,11 +63,11 @@
{
lyxerr[Debug::GUI] << "spell startSession" << endl;
- if (speller_.get()) {
- lyxerr[Debug::GUI] << "startSession: speller exists" << endl;
- speller_.reset(0);
- return;
- }
+// if (speller_.get()) {
+// lyxerr[Debug::GUI] << "startSession: speller exists" << endl;
+// speller_.reset(0);
+// return;
+// }
// create spell object
string tmp;