Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Changes to the native Open and Save dialogs
Changes to the native Open and Save dialogs
 
   NeoOffice Forum Index -> NeoOffice Testing
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jul 11, 2013 9:44 am    Post subject: Changes to the native Open and Save dialogs

I found a hanging bug when saving under the following conditions:

1. Open a new, empty document and enter some text

2. Select the File :: Quit menu or press the Command-Q keys and in the dialog that appears, press the Save button.

3. In the native Save dialog that appears, check the "Save with password" checkbox and press the OK button

After that, NeoOffice will hang when its underlying OpenOffice.org code tries to display the "Enter password" dialog.

While fixing this bug, I also noticed in the above case that the checkboxes in the native Save dialog were missing their descriptive text (see attached image below) so I fixed that bug as well.

Lastly, I removed the "Version" listbox because it is not compatible with Mac OS X's native Versions feature as it only was used for OOo's rarely used "multiple versions in a single .od* file" feature.

Can anyone install the following test patch and tell us if they see any new bugs in the native Open and Save dialogs? I have tried to minimize the amount of code changes to fix the above bugs but there is always a chance that one of my changes has inadvertently introduced new bugs:

Intel:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-10-Intel.dmg

Edit by pluby: for NeoOffice 2013 Beta users, use the following test patch:

http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-1-Intel.dmg

Patrick


Last edited by pluby on Thu Jul 11, 2013 1:07 pm; edited 1 time in total
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jul 11, 2013 11:34 am    Post subject: Re: Changes to the native Open and Save dialogs

pluby wrote:
Lastly, I removed the "Version" listbox because it is not compatible with Mac OS X's native Versions feature as it only was used for OOo's rarely used "multiple versions in a single .od* file" feature.


I forgot to mention that I also doubled the width of the "File type" listbox so that if the entry with the longest text is selected, very little of the text is truncated.

Patrick
Back to top
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Thu Jul 11, 2013 3:02 pm    Post subject:

Patrick,
I did a test run with NO2013 Beta test 1 using the steps you outlined and it worked fine.

I then tried to use the File::Save command and save the document using the older .sxw format with a password at which point it crashed without saving the file.

I don't see crash logs in Console to share with you.

I reverted back to NO2013 Beta and I was able to use the File::Save process and convert and save the file in the .sxw format. This is not a file format I normally use but I do have some older files that I haven't converted and so was working with them today that's why I've noticed the issue.

Galen
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jul 11, 2013 3:24 pm    Post subject:

revsmitty wrote:
I then tried to use the File::Save command and save the document using the older .sxw format with a password at which point it crashed without saving the file.


I was able to reproduce this only once and I got the attached crash log.

My crash log looks identical to the crash that I fixed in this forum topic so I suspect that my save dialog changes have inadvertently undone my fix for that bug.

I will review my code changes and, if that is the case, I will post another test patch to try tonight or tomorrow.

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Fri Jul 12, 2013 6:25 am    Post subject:

I've installed Patch 7 Test 10 and can confirm that the hang when saving a file with a password no longer occurs.

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat Jul 13, 2013 7:57 am    Post subject:

pluby wrote:
My crash log looks identical to the crash that I fixed in this forum topic so I suspect that my save dialog changes have inadvertently undone my fix for that bug.


Yesterday, I found a way to force the native Save dialog to appear 20 times in a row. When I do this, I almost always see a crash in NeoOffice 2013 within before I get through all 20 dialogs.

After spending a day tweaking code, I now think that the crashing is a bug in the native Save dialog code that Apple's App Sandbox uses. Although the native Open and Save dialogs look the same, NeoOffice 3.3 does not have this crashing bug. The reason is that when running in Apple's App Sandbox, those dialogs are displayed by a separate application that Mac OS X runs in the background called the "PowerBox daemon" or "pboxd".

In other words, when running in App Sandbox, Apple uses completely different, more complex code to display and manage native Open and Save dialogs. From what I can see, the communication between Apple's native dialog code running within NeoOffice 2013 and the PowerBox daemon application gets unstable after our code releases a dialog and creates a new dialog after that.

The good news is that I got the crashing to stop on Mac OS X 10.8 Mountain Lion by never releasing any native dialogs and, instead, reusing an existing dialog instance for successive dialogs. The bad news is that while this avoided Apple's crashing bug, it causes NeoOffice 2013 to hang on the latest Mac OS X 10.9 Mavericks developer preview so we can't use my "reusing existing dialog instances" hack.

I have another idea that I think will avoid Apple's crashing bug, but it will take me a couple days to implement. Once I have it implemented, I will post the results of my testing of that implementation. If it works, I will also post a test patch at that time.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jul 15, 2013 9:24 am    Post subject:

pluby wrote:
Yesterday, I found a way to force the native Save dialog to appear 20 times in a row. When I do this, I almost always see a crash in NeoOffice 2013 within before I get through all 20 dialogs.

After spending a day tweaking code, I now think that the crashing is a bug in the native Save dialog code that Apple's App Sandbox uses. Although the native Open and Save dialogs look the same, NeoOffice 3.3 does not have this crashing bug. The reason is that when running in Apple's App Sandbox, those dialogs are displayed by a separate application that Mac OS X runs in the background called the "PowerBox daemon" or "pboxd".


I think that I have found a way to avoid this native Save dialog crashing bug when running in Apple's App Sandbox on both Mac OS X 10.8 Mountain Lion and Mac OS X 10.9 Mavericks latest developer preview. I avoid this bug by delaying the release of native Open and Save dialogs for at least 60 seconds after the dialog has closed. Apparently Apple's App Sandbox code does some operations with the native Open and Save dialogs after they are closed so Apple's code expects us to keep the dialog in memory for some unknown period of time after we are done using it.

I also found that when running in Apple's App Sandbox, NeoOffice would crash if Apple's PowerBox daemon background application crashes or quits. To protect against that scenario, I rewrote a large chunk of our native Open and Save dialog code to catch all exceptions that the native Open and Save dialogs might throw and gracefully make NeoOffice behave as if the dialog was cancelled by the user.

Can anyone try the following NeoOffice 2013 Beta test patch and see if the crashing is fixed for you? The crashing bug was most likely to happen when using the native Save dialog so I am interested if anyone is able to run NeoOffice 2013 Beta for several days and using both the Open and Save dialogs periodically during that time:

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-2-Intel.dmg

Note: even though NeoOffice 3.3 was not affected by the crashing bug, I believe that the NeoOffice 2013 Beta changes make our native Open and Save dialog code more robust so I backported the changes to NeoOffice 3.3 in the following test patch:

NeoOffice 3.3:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-11-Intel.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jul 15, 2013 9:50 pm    Post subject:

Correction: if you downloaded the NeoOffice 2013 Beta test patch in my last post, please install this one as the last one did not include all of the binaries files that changed:

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-4-Intel.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jul 18, 2013 9:43 pm    Post subject:

I found a hanging bug when using the native Open and Save dialogs on the latest Mac OS X 10.9 Mavericks developer preview. I found that some of my code that was used to work around limitations in Mac OS X 10.5 and earlier were causing the hanging and, since we only support Mac OS X 10.6 and higher, I was able to fix the hanging bug by removing that the old code and replacing it with much simpler code.

Can anyone try the following NeoOffice 2013 Beta test patch and confirm that the crashing bug I fixed in my previous test patch is still fixed? The crashing bug was most likely to happen when using the native Save dialog so I am interested if anyone is able to run NeoOffice 2013 Beta for several days and using both the Open and Save dialogs periodically during that time:

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-5-Intel.dmg

Also, I have backported the changes to NeoOffice 3.3 in the following test patch:

NeoOffice 3.3:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-12-Intel.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jul 19, 2013 1:17 pm    Post subject:

While testing this morning, I experienced the crashing bug that I thought that I had fixed so it was clear to me that my original fix didn't work.

Fortunately, after a few hours of troubleshooting, I was able to find the specific Cocoa object that was triggering this crash. From that, it appears to me that the problem is that Apple's App Sandbox code is occasionally releasing that Cocoa object too soon so I implemented a new fix that caches that object immediately after the native Open or Save dialog appears and retains that object until after the native dialog has completely finished running. Hopefully my latest fix for this Apple App Sandbox bug will work better than my last fix.

Can anyone try the following NeoOffice 2013 Beta test patch and confirm that the crashing bug is fixed? The crashing bug was most likely to happen when using the native Save dialog so I am interested if anyone is able to run NeoOffice 2013 Beta for several days and using both the Open and Save dialogs periodically during that time:

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-6-Intel.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jul 26, 2013 12:31 am    Post subject:

Unfortunately, I have found that native Open and Save dialogs to be very prone to crashing when running in Apple's App Sandbox.

The good news, though, is that over the last week I have reimplemented NeoOffice's native Open and Save dialogs to display as "sheets" attached to a window instead of as a separate modal window and that appears to have made the dialogs significantly more stable when running in the App Sandbox.

Since displaying as sheets is a change that will be visible to users, I have backported this change to NeoOffice 3.3.

Can anyone install either of the following test patches and tell us if the native Open and Save dialogs are working the same as the old dialogs?:

NeoOffice 3.3:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-14-Intel.dmg

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-7-Intel.dmg

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Fri Jul 26, 2013 8:44 am    Post subject:

I've installed NeoOffice 3.3 Patch 7 Test 14. So far the Open and Save dialogues seem to work fine - I've experienced no crashes.

A few observations (which I raise for discussion rather than necessarily as bugs).

1. The tiny NeoOffice window that appears when you try to Open a document when none is already open, is a little unusual, but I can see that it is necessary.

2. If you try to open a document when all windows are minimised to the doc, one of them is zoomed back to show the Open sheet on. I don't often minimise windows, but I can see that this might annoy some people.

3. Open and Save sheets are covered by floating palettes (i.e. Styles & Formatting, Table, etc), whereas the modal dialogues were on top of everything.

4. Open sheets don't really make much sense as an interface design as what you are opening does not (necessarily) relate to the current document.

I guess these are probably all limitations of the Open and Save Sheets as implemented by Apple. If they stop an otherwise unfixable crashing bug, then I'll live with them.

Just my 2p.

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jul 26, 2013 9:30 am    Post subject:

IIRC, one thing that I found during my testing while running in Apple's App Sandbox was that all of the crashes I saw occurred when displaying a native Save dialog.

Personally, making this much change makes me very nervous as code changes inevitably results in some amount of new bugs. So I am willing to risk changing the native Open dialog back to a modal window as it will reduce the amount of code changes significantly.

My only concern about changing the native Open dialog back to a modal window is that I really want to be sure that that won't doom 2013 Beta users to a risk of crashing every time they display the native Open dialog. I am hopeful that the crashing was only limited to the native Save dialog but I would feel much more comfortable, once I post new test patches, if you and/or anyone else can test it in 2013 Beta over the next few days to ensure that the Open dialog does not cause crashing.

Changing the native Open dialog back to modal and leaving the native Save dialog as a sheet should affect your observations as described below:

amayze wrote:
1. The tiny NeoOffice window that appears when you try to Open a document when none is already open, is a little unusual, but I can see that it is necessary.


This behavior will go away since I don't know of any cases where the native Save dialog will be displayed when no document windows are open.

amayze wrote:
2. If you try to open a document when all windows are minimised to the doc, one of them is zoomed back to show the Open sheet on. I don't often minimise windows, but I can see that this might annoy some people.


This behavior will go away when displaying the native Open dialog but will remain when you display the native Save dialog.

amayze wrote:
3. Open and Save sheets are covered by floating palettes (i.e. Styles & Formatting, Table, etc), whereas the modal dialogues were on top of everything.

4. Open sheets don't really make much sense as an interface design as what you are opening does not (necessarily) relate to the current document.


This behavior will go away when displaying the native Open dialog but will remain when you display the native Save dialog. While I understand that you don't like that behavior at all, this is normal behavior in Apple applications and has been the behavior in NeoOffice for the native Print and Page Layout dialogs for many years.

By making the native Open dialog modal and the native Save dialog a sheet, NeoOffice's behavior will actually be more consistent with Apple's applications that before.

I will post a test patch later today. Again, for this particular change, NeoOffice 2013 Beta is where testing needs to be done.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jul 26, 2013 12:08 pm    Post subject:

FYI. I have changed the native Open dialog back to a modal window as discussed in my previous post earlier today.

I am hopeful that the crashing while running in Apple's Mac App Sandbox does not appear in native Open dialogs, but to be sure can anyone test the NeoOffice 2013 Beta test patch over the next few days to ensure that the Open dialog does not cause crashing (NeoOffice 3.3 does not have the crashing bug since it does not run in Apple's Mac App Sandbox):

NeoOffice 3.3:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-7-Test-15-Intel.dmg

NeoOffice 2013 Beta:
http://juliette.neooffice.org/test/NeoOffice-2013_Beta-Test-8-Intel.dmg

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Sat Jul 27, 2013 7:18 am    Post subject:

Patrick, thanks for considering the points I raised. I've installed NeoOffice 3.3 Patch 7 Test 15 and it all seems to work ok so far. Having modal Open dialogues and Save sheets feels less quirky than the previous test patch.

I also installed the Beta Test 8 patch and will try to use it as much as I can over the next few days. Quite a lot of what I do requires Java though, so I can't run it all the time.

Andy
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Testing All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.