Issue 2301 - Spell check function cannot check a word if the word length is more than 98 characters.
Summary: Spell check function cannot check a word if the word length is more than 98 c...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 638
Hardware: PC Windows 2000
: P2 Trivial (vote)
Target Milestone: ---
Assignee: khendricks
QA Contact: issues@graphics
URL:
Keywords:
: 2381 (view as issue list)
Depends on:
Blocks:
 
Reported: 2001-11-28 01:51 UTC by Unknown
Modified: 2003-09-08 16:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2001-11-28 01:51:52 UTC
Spell check Function when Used To check a word length which is around 100 
characters long causes the program to crashHow to reproduce the bug:

1.	Open open office presentation part.
2.	Insert a slide.
3.      Click on the Text box to insert a word.
4.	Type  a word of length 100 character. ( e.g you can  do it as:          
Abcdefghij     select this text and copy it <ctrl-C>     Paste it 10 times 
<ctrl v>)
5.	Select “Tools” from the main menu bar.
6.	Click on “Spell check” and then  click on “ check”.	Notice an error 
message as  “ An irrecoverable error has occurred” will pop up and file will 
stop automatically for restart.

Note: In case there is any restriction on word length, program should generate 
an error message or should skip that word with a message instead of closing the 
file.
Comment 1 bettina.haberer 2001-11-28 13:03:08 UTC
The described crash does no more occure in an actual version (641q1). 
Hello Stefan, here is an spellcheck-issue for you. I changed the 
component to word processor.
Comment 2 stefan.baltzer 2001-11-29 18:05:53 UTC
The action described is typical tester habit (Look who's talking... ;-) but complete useless in 
daily life, at least in the languages I know. Nevertheless a crash is an inconvenience that must 
be fixed.
Comment 3 thomas.lange 2001-11-30 09:04:18 UTC
Since this bug occurs in OpenOffice (where the StarOffice spell 
checker is not be used) it should be passed on to the developer 
(Kevin Hendricks).

Since in StarOffice one of the third party spell checkers also 
crashed when a word had more than 64 characters I restricted the 
length of the text in those implementations to 63, which should be 
large enough for all real words.

I did not imply this restriction in the dispatchers.
Thus implementations of spell checker, thesaurus or hyphenator have 
to imply such restrictions on their own if necessary.
Especially since I have no way of knowing of such restrictions of the 
implementations.

Note: Having _very_ long words is not just a tester habbit.
The actual cause for a similar crash in StarOffice was a Calc 
document where the "i" character was used as row delimiter in a table 
like 
  "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII..."
Not a real word but still a word...
Some users may do similar things in ASCII text documents (hand drawn 
tables for example).
Comment 4 thomas.lange 2001-11-30 09:05:00 UTC
Added me to the CC list...
Comment 5 stefan.baltzer 2001-12-03 11:32:39 UTC
Reassigned to Kevin.
Comment 6 khendricks 2001-12-03 15:23:06 UTC
Hi,

But I can't see how or why this fails given the first thing my spell 
routine does is check the length of the word and return that any 
word longer than MAXWORDLEN is "spelled correctly".

Here is the define:

atypes.hxx:#define MAXWORDLEN      100

int MySpell::spell(const char * word)
{
  char * rv=NULL;
  char wspace[MAXWORDLEN+1];
  int wl = strlen(word);
  if (wl > MAXWORDLEN) return 0;

So the question is does this problem happen with words of 
length 99 or less,  or words of 101 or more?

I guess is what I am asking is this true only for words of exactly 
length 100?

(I can not recreate this issue in myspell directly, perhaps there is 
a problem in the spell library but that would imply some limit to 
OUString types which I do not think exists.

Please let me know if only exactly length 100 is the problem?

Thanks,

Kevin
Comment 7 stefan.baltzer 2001-12-04 18:22:13 UTC
*** Issue 2381 has been marked as a duplicate of this issue. ***
Comment 8 cemkaner 2001-12-05 11:37:08 UTC
CK 5/12/01 -- Kevin asked whether this bug is restricted to 100 character strings. I replicate this 
bug, version 638c, with 99 and 100 characters but not with 90, 95 or 98. At 105, we get a different 
error message. The initial crash is "An unrecoverable error has occurred.". In contrast, at 105, the 
crash is "Soffice has generated errors and will be closed by Windows." -- Cem Kaner
Comment 9 khendricks 2001-12-07 15:25:43 UTC
Hi,

I just can not recreate this problem under Linux.  However, based on 
a lot of help and hints form Thomas, my use of temp variables as 
parameters may be to blame.

So I have modified the code to not use these temp varaibles as 
parameters in the hopes this will fix the problems.

The new code has been tagged for the OO641C release (the very next 
release hopefully coming very fast).

Please repeat your tests on the next release and reopen this issue if
you still run into problems.  

I have seen reports of other Window's specific problems with the 
spell checker so this fix may not do the trick but I am very hopeful.

Thanks for you testing!


Kevin


Comment 10 khendricks 2002-06-04 14:30:36 UTC
 closing this as fixed in oo641d