Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86691200CD6 for ; Mon, 31 Jul 2017 18:39:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 835971658C1; Mon, 31 Jul 2017 16:39:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C7C301658BC for ; Mon, 31 Jul 2017 18:39:17 +0200 (CEST) Received: (qmail 215 invoked by uid 500); 31 Jul 2017 16:39:16 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 204 invoked by uid 99); 31 Jul 2017 16:39:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2017 16:39:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 33066180707 for ; Mon, 31 Jul 2017 16:39:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.907 X-Spam-Level: X-Spam-Status: No, score=0.907 tagged_above=-999 required=6.31 tests=[HK_RANDOM_ENVFROM=0.626, HK_RANDOM_FROM=0.001, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id q4i1ShLBrwP5 for ; Mon, 31 Jul 2017 16:39:12 +0000 (UTC) Received: from mail2.vodafone.ie (mail2.vodafone.ie [213.233.128.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 167FA5FBE2 for ; Mon, 31 Jul 2017 16:39:12 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYOAIceUldtT7I+/2dsb2JhbABEGoM6HgQ0fYJ2ikyYVAgCAQEBAQEBAgUBEH+VIhcNhWoCgThMAQEBAQEBZieEXihXEIECASYiiBEKLaExhUeYK4M6hV+JOAEBgmQLQIIqHAWIBYVhik4RgTCEU4gXgXOHbwyFOI9SVIIHHIFMOzIBAQGISw8XBIEaAQEB Received: from unknown (HELO 100AkerWood) ([109.79.178.62]) by mail2.vodafone.ie with SMTP; 31 Jul 2017 17:39:05 +0100 Date: Mon, 31 Jul 2017 17:39:05 +0100 From: Rory O'Farrell To: dev@openoffice.apache.org Subject: Save process and files turned to hashes Message-Id: <20170731173905.14f0603464a432c2d81c6b7f@iol.ie> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit archived-at: Mon, 31 Jul 2017 16:39:18 -0000 John_Ha, a valued contributor to the OO User Forum, has asked me to post this to the developer list. It is a continuation of a previous thread with the same title at http://www.mail-archive.com/dev@openoffice.apache.org/msg15177.html ----------------------- John_Ha writes I think that the hashtags are misleading. The problem is that occasionally Writer creates a flat ASCII file which is full of NULL characters and saves the file as a .odt file. This .odt file is NOT a zipped file and it does NOT have any of the usual (content.xml or styles.xml) files. This .odt file is just a flat ASCII file, often very large (the same size as the original document?), but completely full of NULL characters. Go to https://forum.openoffice.org/en/forum/ucp.php?i=pm&mode=view&f=0&p=11590 for an example file - crappyfile.odt is 24 kBytes of NULL characters. Go to [Hint] How did I fix my ODT file at https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=1532. The thread has been viewed 194,820 times suggesting this is a serious problem of considerable interest to users. No other thread in the forum has been read as often. When the user attempts to open what is effectively a flat ASCII file, Writer recognises it is an ASCII file and opens it as if it was a .txt file, and offers the filter pop-up. The NULL characters are then displayed as hashtags. I think that the questions the developers ought to be asking include: 1 At what point in the save process is space on the disk reserved to write the .odt file? 2 Why is this space full of NULL characters - why isn't it random junk from the disk? How are the NULL characters written? 3 What happens to prevent the genuine file being written? 4 Why is the file full of NULL characters saved as a .odt file? 5 How can Writer save a file as a .odt file which is not a ZIP file? Why was the ZIP process not activated before the file was saved? 6 Note that Writer continues to write to the disk long after (as much as 30 seconds after on a slow network installation) the blue dotted bar crossing the bottom of the screen has stopped. Does this have an effect? What happens if something interrupts Writer while it is doing these silent writes? 7 There are many, many problems seen on the forum (e.g. spell check stops working) which are fixed by creating a new User Profile. As parts of the User Profile (eg registrymodifications.xcu and others) seem to get written AFTER the .odt file has been written, is a corrupted User Profile a manifestation of the same, or similar, problem? 8 Can the .odt file be written as an atomic process such that either "the file as it was when it opened for editing" is saved; or "the file as it is now" is saved. Note that the temporary file C:\Users\my_name\AppData\Local\Temp\svftc2x7.tmp\svftdera.tmp (or similar random name) is a copy of the .odt file as it was opened; and is only deleted when the file is saved. Can a check be made and this temporary file not be deleted until it is known that the proper .odt file has been successfully saved? 9 It is only GUESSING which suggests that over hasty shutting of a laptop lid could be the cause of this. I struggle to see how this could cause it because I understood that hibernation / shutting a laptop lid causes a graceful shut down, and not one where data might be lost. If this is the problem, then is the long delay after the blue bar has ceased causing the problem, and any data waiting to be written is lost? Does Writer handle the "graceful shutdown" instruction from Windows properly? 10 I also think that USB sticks are a red-herring. Later versions of Windows come with the default setting of not using cacheing (the user has to switch it on) so USB sticks can be withdrawn very soon. In conclusion: I think it needs an analysis of what happens during a Save to understand a) at what point is a large, flat ASCII file full of NULL characters created? b) how can this file be saved as a .odt file when .odt files are ZIPped files? I think that this analysis will lead to a better understanding of where the problem lies. John_Ha ----------------------------------- -- Rory O'Farrell --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org For additional commands, e-mail: dev-help@openoffice.apache.org