[Hint] How did I fix my ODT file
Re: [Hint] How did I fix my ODT file
Depending on a lot of things, the first thing to try is to make (on a working machine) a bootable linux USB key; if the broken computer has a functioning motherboard, it may then be booted from the linux USB key and the files in question copied to another USB key. If that does not work because the motherboard is broken, the next step is to remove the hard disk and put it in a working desktop.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: [Hint] How did I fix my ODT file
I have never before seen a file like your two files.tazzy1981 wrote:Can anyone help me fix these files and maybe tell me how, so if I find more files I can reconstruct them myself?
They are not .xls or .xlsx files - they are flat ASCII files but strangely they are full of the " U " character so they cannot contain any user information, not even in encrypted form. I cannot understand how AOO could have created these files. When opened in a Hex editor the both look like this:
You could see [Tutorial] How to find and un-delete AOO temporary files for detailed instructions on how to
a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);
b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;
c) find previous versions of the file in the folder it is located in, but which have since been deleted;
d) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it.
All .odt, .doc, .docx, .xls and .xlsx files are actually ZIP files and can be unzipped. For example this is what a .odt file looks like when unzipped:
You should ask someone with good computer skills to analyse all the files on the disk. Some files and/or folders may be set to Hidden in which case you need to make them visible by Start > Control Panel > Folder options > View > Advanced settings ..., where you tick Show hidden files and folders.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
I confirm what John_Ha says: they are both flat files full of U's. They suggest to me that a hard disk failure occurred, and that a recovery program tried to clean the damaged area of the hard disk, but this is only a guess.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: [Hint] How did I fix my ODT file
Hello! can someone here help me fix this file? same READ ERROR, I will be forever grateful as I worked on tis essay for the past 5 hours before loosing it all.
- Attachments
-
- Essay Michela Filzi 4.odt
- (71.82 KiB) Downloaded 5326 times
Open Office 4.1.3 on MacOS Sierra Version 10.12.6
Re: [Hint] How did I fix my ODT file
@Mic90: there is no need to post twice, and certainly if you do it, post a link to your other topic to prevent that the discussion splits over several threads and that people waste their time. Thank you.
Solution offered there.
Edit: viewtopic.php?f=5&t=99550 |
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: [Hint] How did I fix my ODT file
Please check the attached file and ensure content and formatting are as you require.
- Attachments
-
- Essay Michela Filzi 4_repaired.odt
- (71.2 KiB) Downloaded 5361 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: [Hint] How did I fix my ODT file
Hello,
new here, I found this page after a long desperate search and trying for hours with recovery etc. Got a file prepared in June, now finally need it but it seems corrupted.
Not sure if I'm right here with this file, and I understand if nothing can be done, but I would appreciate if someone could give it a shot.
Sorry , had to attach it as a rar. since its 5mb so exceeds the limitation. (Lots of inserted pictures, but if only the text can be recovered I'm just fine)
Any help appreciated!
new here, I found this page after a long desperate search and trying for hours with recovery etc. Got a file prepared in June, now finally need it but it seems corrupted.
Not sure if I'm right here with this file, and I understand if nothing can be done, but I would appreciate if someone could give it a shot.
Sorry , had to attach it as a rar. since its 5mb so exceeds the limitation. (Lots of inserted pictures, but if only the text can be recovered I'm just fine)
Any help appreciated!
- Attachments
-
- NewStoryboardEtc.rar
- (411 Bytes) Downloaded 5345 times
OpenOffice 4.1.5 on Windows 10
Re: [Hint] How did I fix my ODT file
A quick examination suggests that your file is completely corrupt. Wait for confirmation from another before panicking.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: [Hint] How did I fix my ODT file
I cannot open neither the unpacked .ods file, nor unpack the zip archive of the ODF fileformat...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: [Hint] How did I fix my ODT file
That does not meat the file you loaded up: it's 411 Bytes, not 5 Megabytes, means 1/12756 of the filesize expected. Even rar will never compress something by a factor of 12756!!!Medivh wrote:Sorry , had to attach it as a rar. since its 5mb so exceeds the limitation. (Lots of inserted pictures, but if only the text can be recovered I'm just fine)
R
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: [Hint] How did I fix my ODT file
In fact your 411 byte RAR file is a compression of NewStoryboardEtc.ods which is 5.11 MBytes. The file is full of NUL characters which is why it compresses so well. There is no user data in your file.
See [Tutorial] How to find and un-delete AOO temporary files for detailed instructions on how to
a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);
b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;
c) find previous versions of the file in the folder it is located in, but which have since been deleted;
d) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it.
See [Tutorial] How to find and un-delete AOO temporary files for detailed instructions on how to
a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);
b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;
c) find previous versions of the file in the folder it is located in, but which have since been deleted;
d) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
Thank you everyone for trying.
I was already surprised that the file compressed down t only about 400 byte rar file.
Thank you John for posting the Link, I tried the said guide before as well.
Can't be helped. But I apppreaciate the input, thank you all!
I was already surprised that the file compressed down t only about 400 byte rar file.
Thank you John for posting the Link, I tried the said guide before as well.
Can't be helped. But I apppreaciate the input, thank you all!
OpenOffice 4.1.5 on Windows 10
Re: [Hint] How did I fix my ODT file
Keme gave me an idea at Re: one of Calc file broken and RoryOF found me the source.
While I have no serious coding experience I think the NULLs we see in broken .odt files are probably written by a routine called Deflater.cxx in the package bit of AOO which writes files at [Apache-SVN]/openoffice/trunk/main/package/source/package/zipapi/Deflater.cxx. The source is as below. Deflater is the routine which Zips the file.
Note that line 52 appears to set something (the memory for the file? the disk space to be used for the file?) to zeros or NULLs. I think these are the NULLs we see in the broken .odt files. Line 51 is a comment explaining that NULLs are about to be written.
My hypothesis is therefore that AOO executes line 52 and the NULLs are written. Then, at some point after line 52 is executed, but before the data is written, AOO receives a shutdown? hibernate? command from Windows because the user closes the laptop lid. Normally, AOO would execute a graceful shutdown/hibernate where AOO would prevent the shutdown/hibernate until all data had been written and the AOO program had reached a stable place at which it could safely be paused. However, I suspect that AOO mishandles this shutdown/hibernate command and does not do a graceful shutdown instead allowing the shutdown to happen before AOO has finished writing the file and made AOO safe. The file is therefore full of nulls.
I have done some testing where I have found that AOO does slightly different things depending on when a laptop lid is closed which supports my suspicion.
I realise this is unlikely ever to be fixed with the lack of AOO development but thought it worthwhile to record my thoughts just in case. It supports our idea that too quick shutting of a laptop lid could be causing problem and also explains why it is fairly infrequent - it has to occur at exactly the wrong time to catch the fault in the AOO coding.
I have never seen a report of LibreOffice causing this corruption so I think that LO may have fixed the bug.
I could be completely wrong ...
While I have no serious coding experience I think the NULLs we see in broken .odt files are probably written by a routine called Deflater.cxx in the package bit of AOO which writes files at [Apache-SVN]/openoffice/trunk/main/package/source/package/zipapi/Deflater.cxx. The source is as below. Deflater is the routine which Zips the file.
Note that line 52 appears to set something (the memory for the file? the disk space to be used for the file?) to zeros or NULLs. I think these are the NULLs we see in the broken .odt files. Line 51 is a comment explaining that NULLs are about to be written.
Code: Select all
51 /* Memset it to 0...sets zalloc/zfree/opaque to NULL */
52 memset (pStream, 0, sizeof(*pStream));
I have done some testing where I have found that AOO does slightly different things depending on when a laptop lid is closed which supports my suspicion.
Code: Select all
/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_package.hxx"
26 #include <Deflater.hxx>
27 #ifndef _ZLIB_H
28 #ifdef SYSTEM_ZLIB
29 #include <zlib.h>
30 #else
31 #include <external/zlib/zlib.h>
32 #endif
33 #endif
34 #include <com/sun/star/packages/zip/ZipConstants.hpp>
35 #include <string.h> // for memset
36
37 using namespace com::sun::star::packages::zip::ZipConstants;
38 using namespace com::sun::star;
39
40 /** Provides general purpose compression using the ZLIB compression
41 * library.
42 */
43
44 Deflater::~Deflater(void)
45 {
46 end();
47 }
48 void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, sal_Bool bNowrap)
49 {
50 pStream = new z_stream;
51 /* Memset it to 0...sets zalloc/zfree/opaque to NULL */
52 memset (pStream, 0, sizeof(*pStream));
53
54 switch (deflateInit2(pStream, nLevelArg, Z_DEFLATED, bNowrap? -MAX_WBITS : MAX_WBITS,
55 DEF_MEM_LEVEL, nStrategyArg))
56 {
57 case Z_OK:
58 break;
59 case Z_MEM_ERROR:
60 delete pStream;
61 break;
62 case Z_STREAM_ERROR:
63 delete pStream;
64 break;
65 default:
66 break;
67 }
68 }
69
70 Deflater::Deflater(sal_Int32 nSetLevel, sal_Bool bNowrap)
71 : bFinish(sal_False)
72 , bFinished(sal_False)
73 , bSetParams(sal_False)
74 , nLevel(nSetLevel)
75 , nStrategy(DEFAULT_STRATEGY)
76 , nOffset(0)
77 , nLength(0)
78 {
79 init(nSetLevel, DEFAULT_STRATEGY, bNowrap);
80 }
81
82 sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
83 {
84 sal_Int32 nResult;
85 if (bSetParams)
86 {
87 pStream->next_in = (unsigned char*) sInBuffer.getConstArray() + nOffset;
88 pStream->next_out = (unsigned char*) rBuffer.getArray()+nNewOffset;
89 pStream->avail_in = nLength;
90 pStream->avail_out = nNewLength;
91
92 #if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX
93 nResult = deflateParams(pStream, nLevel, nStrategy);
94 #else
95 nResult = z_deflateParams(pStream, nLevel, nStrategy);
96 #endif
97 switch (nResult)
98 {
99 case Z_OK:
100 bSetParams = sal_False;
101 nOffset += nLength - pStream->avail_in;
102 nLength = pStream->avail_in;
103 return nNewLength - pStream->avail_out;
104 case Z_BUF_ERROR:
105 bSetParams = sal_False;
106 return 0;
107 default:
108 return 0;
109 }
110 }
111 else
112 {
113 pStream->next_in = (unsigned char*) sInBuffer.getConstArray() + nOffset;
114 pStream->next_out = (unsigned char*) rBuffer.getArray()+nNewOffset;
115 pStream->avail_in = nLength;
116 pStream->avail_out = nNewLength;
117
118 #if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX
119 nResult = deflate(pStream, bFinish ? Z_FINISH : Z_NO_FLUSH);
120 #else
121 nResult = z_deflate(pStream, bFinish ? Z_FINISH : Z_NO_FLUSH);
122 #endif
123 switch (nResult)
124 {
125 case Z_STREAM_END:
126 bFinished = sal_True;
127 case Z_OK:
128 nOffset += nLength - pStream->avail_in;
129 nLength = pStream->avail_in;
130 return nNewLength - pStream->avail_out;
131 case Z_BUF_ERROR:
132 bSetParams = sal_False;
133 return 0;
134 default:
135 return 0;
136 }
137 }
138 }
139
140 void SAL_CALL Deflater::setInputSegment( const uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength )
141 {
142 OSL_ASSERT( !(nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength()));
143
144 sInBuffer = rBuffer;
145 nOffset = nNewOffset;
146 nLength = nNewLength;
147 }
148 void SAL_CALL Deflater::setLevel( sal_Int32 nNewLevel )
149 {
150 if ((nNewLevel < 0 || nNewLevel > 9) && nNewLevel != DEFAULT_COMPRESSION)
151 {
152 // do error handling
153 }
154 if (nNewLevel != nLevel)
155 {
156 nLevel = nNewLevel;
157 bSetParams = sal_True;
158 }
159 }
160 sal_Bool SAL_CALL Deflater::needsInput( )
161 {
162 return nLength <=0;
163 }
164 void SAL_CALL Deflater::finish( )
165 {
166 bFinish = sal_True;
167 }
168 sal_Bool SAL_CALL Deflater::finished( )
169 {
170 return bFinished;
171 }
172 sal_Int32 SAL_CALL Deflater::doDeflateSegment( uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength )
173 {
174 OSL_ASSERT( !(nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength()));
175 return doDeflateBytes(rBuffer, nNewOffset, nNewLength);
176 }
177 sal_Int32 SAL_CALL Deflater::getTotalIn( )
178 {
179 return pStream->total_in;
180 }
181 sal_Int32 SAL_CALL Deflater::getTotalOut( )
182 {
183 return pStream->total_out;
184 }
185 void SAL_CALL Deflater::reset( )
186 {
187 #if defined SYSTEM_ZLIB || !defined ZLIB_PREFIXB
188 deflateReset(pStream);
189 #else
190 z_deflateReset(pStream);
191 #endif
192 bFinish = sal_False;
193 bFinished = sal_False;
194 nOffset = nLength = 0;
195 }
196 void SAL_CALL Deflater::end( )
197 {
198 if (pStream != NULL)
199 {
200 #if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX
201 deflateEnd(pStream);
202 #else
203 z_deflateEnd(pStream);
204 #endif
205 delete pStream;
206 }
207 pStream = NULL;
208 }
I have never seen a report of LibreOffice causing this corruption so I think that LO may have fixed the bug.
I could be completely wrong ...
Last edited by John_Ha on Mon Nov 23, 2020 9:45 pm, edited 2 times in total.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
I doubt that there is any possible fix for this; an interrupt calling for a closedown can be inhibited (locked out, or postponed in software), but an actual physical loss of power, be it by power failure or by forced switch off of the power, can only be managed with an Uninterruptible Power Supply (UPS), the weight (and extra expense of which) prevent its inclusion in a laptop, and indeed, in most desktop computers.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: [Hint] How did I fix my ODT file
I had a thought how my hypothesis could be tested.John_Ha wrote:I realise this is unlikely ever to be fixed with the lack of AOO development ...
Someone with coding experience could code a "pause" immediately after the nulls are written so AOO pauses after the nulls have been written but before the content gets written. If the tester then issued a sleep, hibernate or power off command, or shut the laptop lid, AOO should prevent the sleep or hibernate, and prevent the power off from happening, because AOO has a file open which has not been written.
On restarting the PC the file should be found to be full of nulls.
Last edited by John_Ha on Mon Nov 16, 2020 2:11 pm, edited 1 time in total.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
I need your Urgent help
I am a Freelancer Journalist and I was using OpenOffice 3.1.4 until 08 June 2020. All my writing are and were in Farsi / Persian, as you may say.
All my writings were automatically saved as ODT format.
I was working on a new project that i need to read and refer to a lot books as my resources. I need to do search on E-book to go on faster. I tried some new software on my desktop that runs by Windows 10.
usually i do not turn off my pc. but on the June 08 I need to restart. Then I find out that All of my written files are working as before just the last one that I was working on. It is encrypted.
I am not familiar with formats or file codes. I just do open the Text Write and change to Farsi/Persian alphabets and do my job and just push Save button when i need. It does automatically do saving in the same format as always do.
I tried to open and recover it in different ways for example in Western Europe series, Unicodes, Arabics too but they did not worked for me.
Would you please help me.
Ensaf
hedayatensafali!gmail.com
I am a Freelancer Journalist and I was using OpenOffice 3.1.4 until 08 June 2020. All my writing are and were in Farsi / Persian, as you may say.
All my writings were automatically saved as ODT format.
I was working on a new project that i need to read and refer to a lot books as my resources. I need to do search on E-book to go on faster. I tried some new software on my desktop that runs by Windows 10.
usually i do not turn off my pc. but on the June 08 I need to restart. Then I find out that All of my written files are working as before just the last one that I was working on. It is encrypted.
I am not familiar with formats or file codes. I just do open the Text Write and change to Farsi/Persian alphabets and do my job and just push Save button when i need. It does automatically do saving in the same format as always do.
I tried to open and recover it in different ways for example in Western Europe series, Unicodes, Arabics too but they did not worked for me.
Would you please help me.
Ensaf
hedayatensafali!gmail.com
oPENoFFICE 4.1.7 On Windows 10 home
Re: [Hint] How did I fix my ODT file
I seems your file has been corrupted and cannot be recovered. You can post it here for someone to look at it but I am not hopeful. To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a response.
There is also a tutorial here that explains about recovering temporary versions of files.
There is also a tutorial here that explains about recovering temporary versions of files.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: [Hint] How did I fix my ODT file
IfEnsaf wrote:usually i do not turn off my pc. but on the June 08 I need to restart.
- you had one or more files (fred.odt, tom.odt etc) open in AOO/LO and
- the PC got restarted without your saving these files first
All edits since the file was opened will have been lost because they were stored in memory. They had not been saved to disk by your saving the file; nor by AutoRecovery as it was not enabled. As Always create a backup copy was not enabled there is no backup of the previously saved version.
See Why is my file full of #####? for a discussion.
[Tutorial] How to find and un-delete AOO temporary files gives detailed instructions on how to
a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);
b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;
c) find previous versions of the file in the folder it is located in, but which have since been deleted;
d) find any temporary files AOO wrote while you were editing the file but which have not yet been deleted;
e) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. d) and e) will recover your file as it was when you last opened or you last saved it.
If you cannot follow the instructions ask someone with more PC skills to help you. Act quickly - the longer you wait the more likely any temporary files are to be deleted.
If you have some files which you can upload, upload them here (128 kb max) or to a file share website like Dropbox, Google Drive or MediaFire etc. If the file has confidential information send it to me - I have sent you an email with my ID.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
I am not sure that "those" NULLs are "the same" NULLs that were reported.John_Ha wrote:While I have no serious coding experience I think the NULLs we see in broken .odt files are probably written by a routine called Deflater.cxx in the package bit of AOO which writes files at [Apache-SVN]/openoffice/trunk/main/package/source/package/zipapi/Deflater.cxx. The source is as below. Deflater is the routine which Zips the file.
Note that line 52 appears to set something (the memory for the file? the disk space to be used for the file?) to zeros or NULLs. I think these are the NULLs we see in the broken .odt files. Line 51 is a comment explaining that NULLs are about to be written.
Code: Select all
51 /* Memset it to 0...sets zalloc/zfree/opaque to NULL */ 52 memset (pStream, 0, sizeof(*pStream));
According to the zlib manual the structure pStream contains support data for the compression algorithm. It is zeroed at the beginning in order to have it in a "known state".
The compressed (i.e. output for zlib) data are written in another method:
Code: Select all
82 sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
83 {
84 sal_Int32 nResult;
85 if (bSetParams)
86 {
87 pStream->next_in = (unsigned char*) sInBuffer.getConstArray() + nOffset;
88 pStream->next_out = (unsigned char*) rBuffer.getArray()+nNewOffset;
89 pStream->avail_in = nLength;
90 pStream->avail_out = nNewLength;
In case it could be interesting for other forum readers, we are trying to reproduce the problem on the bug report #126869....
It supports our idea that too quick shutting of a laptop lid could be causing problem and also explains why it is fairly infrequent - it has to occur at exactly the wrong time to catch the fault in the AOO coding.
Me too, of course! Any help, suggestions etc. are appreciated!I could be completely wrong ...
OpenOffice 4.1.13 on various platforms
Re: [Hint] How did I fix my ODT file
I will defer to your vastly greater coding expertise!!ardovm wrote:I am not sure that "those" NULLs are "the same" NULLs that were reported.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: [Hint] How did I fix my ODT file
If you want to be puzzled have a peep at Format error discovered in the file in sub-document.ardovm wrote:Any help, suggestions etc. are appreciated!
It is by no means the "normal" format error bug, with its repeated attributes or single bit error, which you seem to have fixed. It is something which I cannot even begin to guess what has happened as there are hundreds if not thousands of corruptions in content.xml!!
My head aches if I think about it so I have stopped thinking about it and I have put it down to alien life from outer space messing with us.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.