Issue 73969 - WW8: file size of .doc increases almost 1000x when importing VBA code
Summary: WW8: file size of .doc increases almost 1000x when importing VBA code
Status: ACCEPTED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2007-01-29 10:02 UTC by mux2005
Modified: 2013-08-07 15:31 UTC (History)
6 users (show)

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


Attachments
WARNING! File grows to 711MB when opened by OOo (873.00 KB, application/msword)
2007-01-29 10:04 UTC, mux2005
no flags Details
Three stacks pointing to tries to resize readonly streams by seeking. The third stack is related to the huge resize of the file. (4.23 KB, text/plain)
2007-03-21 11:32 UTC, mikhail.voytenko
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mux2005 2007-01-29 10:02:41 UTC
When I open the attached DOT Word template OpenOffice blows up the size of the
file to several 100MB before opening it. Note that I'm opening as template, so a
new Untitled1 document is created. There is absolutely no reason why OpenOffice
should perform any write access at all on the file when opening as template, let
alone something weird such as increasing the filesize 1000-fold.
The problem has been confirmed by other users on different computers with OOo
2.1 and 2.04 under Linux and Windows. Interestingly the file always grows to
exactly the same size of 744950784 Bytes, so the problem is completely
deterministic.
Comment 1 mux2005 2007-01-29 10:04:59 UTC
Created attachment 42552 [details]
WARNING! File grows to 711MB when opened by OOo
Comment 2 mux2005 2007-01-29 14:19:09 UTC
The bug only triggers if Tools/Options/Load/Save/Load Basic code to edit is checked.
Another user has reported that the bug does not occur under OOo 2.0.3. If that
is accurate, it was introduced in 2.0.4.
Comment 3 michael.ruess 2007-01-29 15:02:00 UTC
The file size of the attached document will increase to 710 MB when importing
(!) into OOo. This does not happen when the option "Load Basic code to edit" is
enabled.
I also confirm, that his worked fine last in OO 2.0.3.
Comment 4 mux2005 2007-01-29 15:54:26 UTC
@mru: You mean 

This does not happen when the option "Load Basic code to edit" is
DISABLED.
Comment 5 ab 2007-02-15 13:45:19 UTC
ab->mav: As discussed, please have a look
Comment 6 mikhail.voytenko 2007-03-21 11:28:05 UTC
The resizing happens because the implementation of the method
"ContainerRecReader::Read()" provides a wrong offset for the SeekRel operation.
This is an old feature that seeking to an offset after the EOF resizes streams
based on SvStream interface. But the stream readonly, so it should be impossible
to resize it.

The SotStorage is fixed now for the issue 75574 so that such seek operation on a
readonly stream does not lead to the stream resizing. 

But I suspect that the mentioned above "Read()" method must be fixed as well,
since it provides the offset  "0x2C000000". Looks pretty like the offset was
wrongly read from the stream ( Big Indian - Little Indian, or a wrong size of
the read data ). The reading happens in msocximax.cxx:699.

MAV->DR: Please take a look. I have introduced a new assertion in cws "fwk64"
for the case when readonly stream is resized by seek operation, because usually
that means that the offset is wrong. The text of the assertion is
"Trying to resize readonly stream by seeking! Could be a wrong offset!".
This assertion was triggered three times during loading of the attached
document. I will attach the stacks including the stack for the original problem.
Comment 7 mikhail.voytenko 2007-03-21 11:32:08 UTC
Created attachment 43830 [details]
Three stacks pointing to tries to resize readonly streams by seeking. The third stack is related to the huge resize of the file.
Comment 8 daniel.rentz 2007-03-21 13:26:08 UTC
started
Comment 9 daniel.rentz 2007-06-13 12:49:19 UTC
Problem with increasing file size has been resolved, have to look somewhat 
deeper into the import of the form controls -> OOo 2.x
Comment 10 utomo99 2007-07-04 05:37:51 UTC
is that correct that the fix for growing file size will be implemented on 2.3, 
but some other issue will be for 2.3 ? 

if yes, it maybe better to create another issue ?

Thanks
Comment 11 Mathias_Bauer 2007-12-04 08:49:40 UTC
target 3.0
Comment 12 Mathias_Bauer 2008-04-21 17:05:22 UTC
Daniel, I think that this issue might need some attention. Or should we change
the target?