Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
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 - 1.36.2.4 +++ src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 09:01:14 - @@ -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;
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Angus Leeming wrote: 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? I took the executive decision to do so, because hard crashes are always bad. Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus I took the executive decision to do so, because hard crashes Angus are always bad. OK. I was pondering whether this is related to http://bugzilla.lyx.org/show_bug.cgi?id=1451 but it is probably not. I guess I should apply the patch I have for that. JMarc 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.5 diff -u -p -r1.36.2.5 ControlSpellchecker.C --- src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 14:15:34 - 1.36.2.5 +++ src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 14:27:23 - @@ -59,6 +59,13 @@ void ControlSpellchecker::clearParams() } +void ControlSpellchecker::updateSlot(bool switched) +{ + if (switched) + hide(); +} + + void ControlSpellchecker::startSession() { lyxerr[Debug::GUI] spell startSession endl; Index: src/frontends/controllers/ControlSpellchecker.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.h,v retrieving revision 1.14.2.3 diff -u -p -r1.14.2.3 ControlSpellchecker.h --- src/frontends/controllers/ControlSpellchecker.h 7 Dec 2004 10:49:05 - 1.14.2.3 +++ src/frontends/controllers/ControlSpellchecker.h 10 Jun 2005 14:27:23 - @@ -83,6 +83,10 @@ private: /// not needed. virtual void apply() {} + /** Instantiation of ControlConnectBD private virtual method. + Slot connected to update signal. */ + virtual void updateSlot(bool); + /// current word being checked and lang code WordLangTuple word_;
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Jean-Marc Lasgouttes wrote: Angus I took the executive decision to do so, because hard crashes Angus are always bad. OK. I was pondering whether this is related to http://bugzilla.lyx.org/show_bug.cgi?id=1451 but it is probably not. I don't think that it is related intimately. It does highlight the fact that the spell checking code in 1.3.x is more fragile than it should be (because no one really understands the logic of what is going on). Fortunately, the code in 1.4.x should be much more robust and much more transparent. I guess I should apply the patch I have for that. That would be good. JMarc Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
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 - 1.36.2.4 +++ src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 09:01:14 - @@ -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;
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Angus Leeming wrote: 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? I took the executive decision to do so, because hard crashes are always bad. Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> I took the executive decision to do so, because hard crashes Angus> are always bad. OK. I was pondering whether this is related to http://bugzilla.lyx.org/show_bug.cgi?id=1451 but it is probably not. I guess I should apply the patch I have for that. JMarc 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.5 diff -u -p -r1.36.2.5 ControlSpellchecker.C --- src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 14:15:34 - 1.36.2.5 +++ src/frontends/controllers/ControlSpellchecker.C 10 Jun 2005 14:27:23 - @@ -59,6 +59,13 @@ void ControlSpellchecker::clearParams() } +void ControlSpellchecker::updateSlot(bool switched) +{ + if (switched) + hide(); +} + + void ControlSpellchecker::startSession() { lyxerr[Debug::GUI] << "spell startSession" << endl; Index: src/frontends/controllers/ControlSpellchecker.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.h,v retrieving revision 1.14.2.3 diff -u -p -r1.14.2.3 ControlSpellchecker.h --- src/frontends/controllers/ControlSpellchecker.h 7 Dec 2004 10:49:05 - 1.14.2.3 +++ src/frontends/controllers/ControlSpellchecker.h 10 Jun 2005 14:27:23 - @@ -83,6 +83,10 @@ private: /// not needed. virtual void apply() {} + /** Instantiation of ControlConnectBD private virtual method. + Slot connected to update signal. */ + virtual void updateSlot(bool); + /// current word being checked and lang code WordLangTuple word_;
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Jean-Marc Lasgouttes wrote: Angus> I took the executive decision to do so, because hard crashes Angus> are always bad. OK. I was pondering whether this is related to http://bugzilla.lyx.org/show_bug.cgi?id=1451 but it is probably not. I don't think that it is related intimately. It does highlight the fact that the spell checking code in 1.3.x is more fragile than it should be (because no one really understands the logic of what is going on). Fortunately, the code in 1.4.x should be much more robust and much more transparent. I guess I should apply the patch I have for that. That would be good. JMarc Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Paul A. Rubin wrote: Edit | Preferences | Language settings | Spellchecker lists ispell as the program, but it's grayed out and cannot be changed. I have aspell (in C:\Aspell). I don't have ispell. On the other hand, spell-checking somehow works ... The *nix versions have two ways to invoke the spell checker: 1 Spawn a child process and communicate with it through its STDIN and STDOUT streams. 2 Link against the Aspell library and communicate with it through the libraries C-API. Version 1, the external process, is not available to us on Windows because the communication with pipes bit hasn't been inplemented. That's why the Preferences thingie is greyed out: it's the name of the external process and it's irrelevant. ... 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. I read you as saying on the lyx-users list that you're now a proud linux user. Can you crash LyX 1.3.5 on linux? Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Angus Leeming wrote: Paul A. Rubin wrote: Edit | Preferences | Language settings | Spellchecker lists ispell as the program, but it's grayed out and cannot be changed. I have aspell (in C:\Aspell). I don't have ispell. On the other hand, spell-checking somehow works ... The *nix versions have two ways to invoke the spell checker: 1 Spawn a child process and communicate with it through its STDIN and STDOUT streams. 2 Link against the Aspell library and communicate with it through the libraries C-API. Version 1, the external process, is not available to us on Windows because the communication with pipes bit hasn't been inplemented. That's why the Preferences thingie is greyed out: it's the name of the external process and it's irrelevant. And yet ... Ruurd's port has an active drop-down list with three choices (ispell, aspell, hspell). Hence the confusion, at least for us old-timers. ... 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. I read you as saying on the lyx-users list that you're now a proud linux user. Can you crash LyX 1.3.5 on linux? I think you have me confused with someone with a similar name (and no doubt not as good-looking). I do have a Linux server (currently not in use and possibly no longer fully loaded), but I've never installed LyX on it. The crash-on-spell-check problem has been discussed on the user list, but I only recall posts from Windows users. -- Paul
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Paul A. Rubin wrote: I'm attaching two files from one of my classes. Well, that was the theory, anyway. Perhaps I'll get it right this time. hw10.lyx Description: application/lyx mgt914syllabus.lyx Description: application/lyx
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Paul A. Rubin wrote: Edit | Preferences | Language settings | Spellchecker lists ispell as the program, but it's grayed out and cannot be changed. I have aspell (in C:\Aspell). I don't have ispell. On the other hand, spell-checking somehow works ... The *nix versions have two ways to invoke the spell checker: 1 Spawn a child process and communicate with it through its STDIN and STDOUT streams. 2 Link against the Aspell library and communicate with it through the libraries C-API. Version 1, the external process, is not available to us on Windows because the communication with pipes bit hasn't been inplemented. That's why the Preferences thingie is greyed out: it's the name of the external process and it's irrelevant. ... 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. I read you as saying on the lyx-users list that you're now a proud linux user. Can you crash LyX 1.3.5 on linux? Angus
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Angus Leeming wrote: Paul A. Rubin wrote: Edit | Preferences | Language settings | Spellchecker lists ispell as the program, but it's grayed out and cannot be changed. I have aspell (in C:\Aspell). I don't have ispell. On the other hand, spell-checking somehow works ... The *nix versions have two ways to invoke the spell checker: 1 Spawn a child process and communicate with it through its STDIN and STDOUT streams. 2 Link against the Aspell library and communicate with it through the libraries C-API. Version 1, the external process, is not available to us on Windows because the communication with pipes bit hasn't been inplemented. That's why the Preferences thingie is greyed out: it's the name of the external process and it's irrelevant. And yet ... Ruurd's port has an active drop-down list with three choices (ispell, aspell, hspell). Hence the confusion, at least for us "old-timers". ... 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. I read you as saying on the lyx-users list that you're now a proud linux user. Can you crash LyX 1.3.5 on linux? I think you have me confused with someone with a similar name (and no doubt not as good-looking). I do have a Linux server (currently not in use and possibly no longer fully loaded), but I've never installed LyX on it. The crash-on-spell-check problem has been discussed on the user list, but I only recall posts from Windows users. -- Paul
Re: [LyXWin 1.3.6pre9] Spell-checking works, but...
Paul A. Rubin wrote: I'm attaching two files from one of my classes. Well, that was the theory, anyway. Perhaps I'll get it right this time. hw10.lyx Description: application/lyx mgt914syllabus.lyx Description: application/lyx