Issue 127157 - Styles and Formatting window does not open - apparent cause is corrupted registrymodifications.xcu file
Summary: Styles and Formatting window does not open - apparent cause is corrupted regi...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 4.1.2
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-08 08:42 UTC by John
Modified: 2017-06-30 14:55 UTC (History)
4 users (show)

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


Attachments
Styles and Formatting pop-up (press F11) does not open when this file is used in the profile (297.47 KB, application/xml)
2016-10-08 08:42 UTC, John
no flags Details
Screenshots of testing the bug with various AOO Configuration Files (296.10 KB, application/x-zip-compressed)
2016-10-13 04:51 UTC, Stephen L'Allier
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description John 2016-10-08 08:42:37 UTC
Created attachment 85717 [details]
Styles and Formatting pop-up (press F11) does not open when this file is used in the profile

1  Press F11.  Styles and Formatting pop-up window does not open.

2  Delete user profile and allow AOO to create a new user profile

3  Press F11.  Styles and Formatting pop-up window now opens

4  Replace new registrymodifications.xcu file with original registrymodifications.xcu file.  Styles and Formatting pop-up window does not open.

It therefore appears that the original registrymodifications.xcu file (uploaded here) is somehow corrupted.  See [Solved] Styles and Formatting will not open (Mac) at https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=85461

This bug report has been raised following Issue 126846 - Analysis Task: Major Recurring Data/Operation Loss/Corruption Situations where it was reported that many problems with AOO can be fixed by "rebuilding the user profile" - spell checker not working is regularly reported on the forum and is invariably fixed by rebuilding the profile.

In fact, I believe that the profile itself is undamaged and the only damaged item is the registrymodifications.xcu file.  Note that this file appears to be written AFTER the document is saved so is particularly vulnerable to any "slam the laptop lid shut ..." actions.

It may be linked to Issue 126762 - Analysis+solution: Damaged "registrymodifications.xcu" causing problems with backups and spell checker
Comment 1 Stephen L'Allier 2016-10-13 04:50:06 UTC
I have successfully replicated this issue. Additionally, I have also found the corrupted lines of registrymodifications.xcu (which I will hereby refer to as the AOO configuration file) that are causing the Styles and Formatting to not open when F11 is pressed. Below I have listed the specifications of my test machine, the steps taken to reproduce the bug, and information about the corrupted lines in the AOO configuration file.

Test Machine Specifications

AOO Version: 4.0.1
CPU: AMD FX-8350 4.0 GHz
GPU: AMD Radeon HD 7870
RAM: 8 GB DDR4
OS: Windows 10 w/ Anniversary Update

Steps taken to reproduce failure

1.	Open AOO Writer and press F11 to ensure Styles and Formatting window opens regularly.
2.	Close AOO Writer.
3.	Download potentially corrupted AOO file from the Bug Report.
4.	Replace current AOO configuration file with the downloaded one while OpenOffice Writer is closed. Current file located at: C:\Users\USER\AppData\Roaming\OpenOffice\4\user\registrymodifcations.xcu
5.	Open AOO Writer.
6.	Press F11 and see that the Styles and Formatting window does not appear.
7.	Close AOO Writer.
8.	Replace corrupted AOO configuration file with the old one.
9.	Open AOO Writer.
10.	Pres F11 and see that the Styles and Formatting windows appears as it is supposed to.

Steps taken to fix failure

I noticed that the size of the corrupted AOO configuration file was much larger than my original one, so I decided to open it to look inside. It is in XML format, but I had to use an XML Formatter online in order to get the indentation to show up. After doing so, the number of lines in the corrupted file was 8148. For comparison, my fresh AOO configuration file was 372 lines.

With such a drastic difference in size, I knew the issue could be anywhere. I decided to manually perform a Binary Search on the corrupted file in order to see if I could isolate the corrupted lines. I did so by repeating the following steps until finding the corrupted lines.

1.	Remove one half of the N lines (where N is 8148 to start) from the corrupted AOO configuration file.
2.	Save the file.
3.	Open AOO Writer.
4.	Press F11 to see if the problem is fixed.
5.	If the problem is fixed, the sample size of the lines is reduced to only the half that was tested, as the corrupted lines are in that sample. N is half the size that it was. Repeat steps 1-4 until the corrupted lines are found.
6.	If the problem is not fixed, perform steps 1-4 on the other half of the lines and proceed.

This method worked excellently, and after following the procedure outlined above, I narrowed down the corrupted lines to lines 6189-6193. Those lines are pasted below.

<item oor:path="/org.openoffice.Office.Views/Windows/org.openoffice.Office.Views:WindowType['5539']/UserData">
    <prop oor:name="Data" oor:op="fuse" oor:type="xs:string">
        <value>V2,H,0,AL:(5,16,0/1/1/430,1;917)</value>
    </prop>
</item>

I experimented with leaving different parts of this item entry in place and only removing small parts. If I removed the “/UserData” at the end of the oor:path, F11 began functioning correctly again. I did a search for the string “/UserData” in the configuration file and found one more instance of it, on line 6014. I removed that one as well, and found that a sidepane that had been hidden was no longer hidden.

Because the corrupted AOO configuration file was so large, it is possibly filled with other issues as well. Some of the effects of these changes are noticeable when comparing the screenshots I have attached. Hopefully this new information helps to track down the bug that is causing the lines above in the AOO configuration file to be corrupted.
Comment 2 Stephen L'Allier 2016-10-13 04:51:11 UTC
Created attachment 85723 [details]
Screenshots of testing the bug with various AOO Configuration Files
Comment 3 Stephen L'Allier 2016-10-13 05:03:12 UTC
In regards to the last paragraph in my first comment:

When comparing screenshot 1 (Before pressing F11 with my original AOO config file) and screenshot 3 (Before pressing F11 with the corrupted AOO config file), there are many noticeable changes to the page layout and side panels. These could be regular configuration changes made by the user of the corrupted AOO config file, or other possible corruptions in the file.
Comment 4 Stephen L'Allier 2016-10-13 05:06:50 UTC
Correction to Comment 1 (because I cannot edit it): Version of AOO Tested was 4.1.2, not 4.0.1
Comment 5 Keith N. McKenna 2016-10-13 15:53:47 UTC
Marking this as confirmed based on Stephen's excellent analysis.
Comment 6 Keith N. McKenna 2016-10-13 16:11:53 UTC
(In reply to Stephen L'Allier from comment #1)
> I have successfully replicated this issue. Additionally, I have also found
> the corrupted lines of registrymodifications.xcu (which I will hereby refer
> to as the AOO configuration file) that are causing the Styles and Formatting
> to not open when F11 is pressed. Below I have listed the specifications of
> my test machine, the steps taken to reproduce the bug, and information about
> the corrupted lines in the AOO configuration file.
> 
> Test Machine Specifications
> 
> AOO Version: 4.0.1
> CPU: AMD FX-8350 4.0 GHz
> GPU: AMD Radeon HD 7870
> RAM: 8 GB DDR4
> OS: Windows 10 w/ Anniversary Update
> 
> Steps taken to reproduce failure
> 
> 1.	Open AOO Writer and press F11 to ensure Styles and Formatting window
> opens regularly.
> 2.	Close AOO Writer.
> 3.	Download potentially corrupted AOO file from the Bug Report.
> 4.	Replace current AOO configuration file with the downloaded one while
> OpenOffice Writer is closed. Current file located at:
> C:\Users\USER\AppData\Roaming\OpenOffice\4\user\registrymodifcations.xcu
> 5.	Open AOO Writer.
> 6.	Press F11 and see that the Styles and Formatting window does not appear.
> 7.	Close AOO Writer.
> 8.	Replace corrupted AOO configuration file with the old one.
> 9.	Open AOO Writer.
> 10.	Pres F11 and see that the Styles and Formatting windows appears as it is
> supposed to.
> 
> Steps taken to fix failure
> 
> I noticed that the size of the corrupted AOO configuration file was much
> larger than my original one, so I decided to open it to look inside. It is
> in XML format, but I had to use an XML Formatter online in order to get the
> indentation to show up. After doing so, the number of lines in the corrupted
> file was 8148. For comparison, my fresh AOO configuration file was 372 lines.
> 
> With such a drastic difference in size, I knew the issue could be anywhere.
> I decided to manually perform a Binary Search on the corrupted file in order
> to see if I could isolate the corrupted lines. I did so by repeating the
> following steps until finding the corrupted lines.
> 
> 1.	Remove one half of the N lines (where N is 8148 to start) from the
> corrupted AOO configuration file.
> 2.	Save the file.
> 3.	Open AOO Writer.
> 4.	Press F11 to see if the problem is fixed.
> 5.	If the problem is fixed, the sample size of the lines is reduced to only
> the half that was tested, as the corrupted lines are in that sample. N is
> half the size that it was. Repeat steps 1-4 until the corrupted lines are
> found.
> 6.	If the problem is not fixed, perform steps 1-4 on the other half of the
> lines and proceed.
> 
> This method worked excellently, and after following the procedure outlined
> above, I narrowed down the corrupted lines to lines 6189-6193. Those lines
> are pasted below.
> 
> <item
> oor:path="/org.openoffice.Office.Views/Windows/org.openoffice.Office.Views:
> WindowType['5539']/UserData">
>     <prop oor:name="Data" oor:op="fuse" oor:type="xs:string">
>         <value>V2,H,0,AL:(5,16,0/1/1/430,1;917)</value>
>     </prop>
> </item>
> 
> I experimented with leaving different parts of this item entry in place and
> only removing small parts. If I removed the “/UserData” at the end of the
> oor:path, F11 began functioning correctly again. I did a search for the
> string “/UserData” in the configuration file and found one more instance of
> it, on line 6014. I removed that one as well, and found that a sidepane that
> had been hidden was no longer hidden.
> 
> Because the corrupted AOO configuration file was so large, it is possibly
> filled with other issues as well. Some of the effects of these changes are
> noticeable when comparing the screenshots I have attached. Hopefully this
> new information helps to track down the bug that is causing the lines above
> in the AOO configuration file to be corrupted.

Stephen I would strongly urge you to subscribe to the QA mailing list and ask to be added to the QA team on Bugzilla. This will allow you to set the Status of Items as Confirmed. Also if you have not already read through the Orientation Guide for QA at http://openoffice.apache.org/orientation/intro-qa.html.
Comment 7 John 2016-10-26 16:28:38 UTC
(In reply to Stephen L'Allier from comment #1)
 
> I noticed that the size of the corrupted AOO configuration file was much
> larger than my original one

See Issue 125340 - registrymodifications.xcu file - starts as 17 kBytes, grows to 500 kBytes, where this growth is confirmed as working as designed.  

In fact, it appears that registrymodifications.xcu retains the names of more files saved than are listed in File > Recently saved ..., which lists only the 10 most recent files saved.
Comment 8 billp 2016-11-01 14:40:17 UTC
I don't see an issue here. No Styles and Formatting pop-up window appears when F11 is pressed because the Styles and Formatting window is set to be docked and the docked window doesn't become apparent because it is set to have zero width.

I downloaded the attached registrymodifications.xcu file and put it in my user profile then started AOO Writer. The Styles and Formatting icon on the toolbar was highlighted, indicating that Styles and Formatting was already open. I found the handle for a docked window against the right side of Writer's window. After F11 was pressed, the Styles and Formatting icon was no longer highlighted and the handle disappeared. After F11 was pressed a second time, the Styles and Formatting icon was again highlighted and the handle reappeared. Dragging that handle revealed the docked Styles and Formatting window.