Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | CRASH if TabStopDistance set to 0 | ||||||
---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | christianjunker | ||||
Component: | ui | Assignee: | AOO issues mailing list <issues> | ||||
Status: | CLOSED FIXED | QA Contact: | |||||
Severity: | Minor | ||||||
Priority: | P4 | CC: | issues, rainerbielefeld_ooo_qa | ||||
Version: | OOo 1.1.1 | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | Windows, all | ||||||
See Also: | https://issues.apache.org/ooo/show_bug.cgi?id=123063 | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
christianjunker
2004-05-23 13:45:07 UTC
MRU->SW: please have a look. Via UI, it is not possible to set the default tab stop distance to 0,00. So it also shouldn't be possible via API. SW->TL: just run the given macro attached to a document and then use the tab-key in this document => the crashreporter appears The minimal distance shouzld be set to let's say 100 (i.e. 1mm) which should already be smaller than any really useful distance. cyb->tl: A note in the idl docs might be sufficient to solve this issue, since the OOo API shouldn't prohibit too much. What do you think here? What is the state so far? Adding some docu in the IDL alone won't fix this since the Office should still not crash even if it was tried to set the distance to 0. But adding a note that those values should be positve and not too small would be nice. I wouldn't specify a minimal value in the IDL though since in the end the actual value migth be different. cyb->tl: How about ignoring 0 in the implementation?? (does not change TabStopDistance) tl->cyb: since tiny values as 1 or even 100 or 1000 are still quite not useful (since the unit for the API is 1/100th mm) I think we should enforce a minimum value. And if that is to be done it won't be much more to raise an exception for 0 as well. cyb->tl: "Enforcing" means ignoring all values under a certain minimum in the implementation? Nope. It means throwing an "illegal argument exception" when trying to set zhose values. That is provided the interface has specified that exception which I will assume would be natural. I just tested 0 TabStopDistance under Mac OS X with OOo 2.0 and it did not crash at all. cyb->tl: Can you test this on your platform (Win32/Linux?). I wonder if we should still fix it, if it's working under WinXP and *ix. No. If it works for some other platform it is likely to be by chance only. And also not having a reasonable minimal value may affect performance and stability. For example: if you have a tab-stop every 1/100th mm the number of tabsops is quite large and thus accessing a specific tabstop will become slower. Also from implementation side the tab-stops are likely to be stored in some array, with a fixed upper bound for the index (let's say USHORT_MAX for example which is about 65536) if by allowing such tiny values for tab-stops the maximal number for tab-stops will be above that (sth that actually may happen depending on the specified page width) the array might be too small and if per chance there is no proper bounds checking implemented the office may crash. And even if proper bounds checking is implemented any tab-stop above that limit will be of no use because the values can not be stored. So forcing some decent 'real-life' value should be the way to go even if from pure API view there would be no such need. Created attachment 83468 [details]
Test Document
With macro from original report I created attached sample document. For a test simply open test document from OO Start Center
Additional info:
(a) Crash no longer reproducible with sever installation of "OOo 3.3.0 English UI
/ German locale [OOO330m20 (Build 9567)]" on WIN7 Home Premium (64bit) DE
(b) Crash still Reproducible with sever installation of "OOo 3.2.1 English UI
/ German locale [OOO320m18 (Build 9502)]" on WIN7 Home Premium (64bit) DE
and
"Ooo 1.1.5 [645m58 (Build 8950)]" on German WIN7 Home Premium (64bit) will
crash immediately when I try to open document
(c) Has been fixed for OOo 3.3.0, but because of incomplete Target Milestone selector contents (Bug 123063) I only can select TM = 4.1.0, no correct information can be contributed. |