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 - Neo Hanging in the background
Neo Hanging in the background
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Fri Mar 02, 2012 7:35 am    Post subject: Neo Hanging in the background

At least twice recently, Neo has hung while sitting in the background for an extended period of time.

If I click on Neo, I'll get only the NeoOffice menu, none of the other menu options. And choosing Quit from either the menu or the dock menu doesn't work.

Last time this happened, Neo was using 99% of CPU. I've attached a sample.

I'm using Lion (10.7.3)

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Mar 02, 2012 10:03 am    Post subject:

From your sample, it appears that you tried to quit NeoOffice but the native quit code is waiting for your document to finish closing and the document closing is in an infinite loop in a shape object named "Svx3DLightDirection".

I haven't looked at NeoOffice's underlying OpenOffice.org code yet, but did you have a document open that had any shapes or objects in it the are 3Dish in appearance? If so, can you attach the document that this hanging is happening in?

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Mar 02, 2012 10:31 am    Post subject:

pluby wrote:
I haven't looked at NeoOffice's underlying OpenOffice.org code yet, but did you have a document open that had any shapes or objects in it the are 3Dish in appearance? If so, can you attach the document that this hanging is happening in?


I forgot to mention that most likely the hanging document's window will have already closed before the infinite loop occurs so don't be surprised if the hanging appears to be occurring with no document's open as the infinite loop is being called in the OpenOffice.org code's closed window cleanup code.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Fri Mar 02, 2012 2:50 pm    Post subject:

Hmm.. That's got me stumped. I certainly haven't created any 3D objects in Neo recently, if ever. I looked through the Recent Documents list, and the closest I could come was a docx file of an WSJ article that someone sent me. The Navigator indicated there was a picture in the document, but nothing with that name. And I had no problem quitting Neo when I had that document open.

Sorry I can't be of more help. Looks like it's going to be one of those flukely hangs we can't track down.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Mar 02, 2012 4:19 pm    Post subject:

Lorinda wrote:
Sorry I can't be of more help. Looks like it's going to be one of those flukely hangs we can't track down.


I will be putting a test patch within the next few days and I will try to remember to add some debug statements in that test patch so that will hopefully log some useful messages in the Console application if this problem occurs again.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Mar 05, 2012 6:03 pm    Post subject:

I took a close look at the code and while I don't see anything that would obviously cause the infinite that you saw, I do have a test patch for you to try.

In this test patch, I changed some to code to prevent NeoOffice's underlying OpenOffice.org code from post internal events to process. My theory is that in your case, the OpenOffice.org code keeps posting new events and so the queue of undispatched event never clears and, as a result, NeoOffice never finishes shutting down.

Can you install the following test patch and if the problem reoccurs, can you post another sample?:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-4-Test-1-Intel.dmg

Note: this test patch also contains the new, completely non-Java printing code described in this post.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Mon Mar 05, 2012 7:36 pm    Post subject:

Installing as I type. I'll keep you posted.

Lorinda
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Sun Apr 29, 2012 4:15 am    Post subject:

It happened to me again this morning.

Neo had been running for some time. It's possible I had told it to quit earlier, I don't remember clearly. (If I did, it would have been yesterday or the day before)

The computer had been asleep shortly before I tried to switch to Neo. All I got was the NeoOffice menu highlighted in blue.
Activity Monitor showed hardly any CPU usage (A change from the last incident)

I installed Patch 5 the other day, so I'm at Neo 3.2.1 Patch 5, My OS is 10.7.3.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Apr 29, 2012 1:36 pm    Post subject:

Like your first sample, your latest sample shows that NeoOffice is in the process of quitting. However, the code is your latest sample shows a different hanging location than before.

In the latest sample, the hanging is a deadlock between two OpenOffice.org threads. Both threads are both trying to write unsaved user preference changes to disk and, due to how the OpenOffice.org engineers wrote the code in each thread differently, their code deadlocks.

To prevent this deadlock from occurring, in the following test I have modified the OpenOffice.org shutdown code to hopefully write all pending changes just before the code that the deadlock occurs in.

Does the hanging still occur with the following test patch? I am not sure if this will stop the deadlocking so if the hanging still occurs, please post another sample:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-5-Test-1-Intel.dmg

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Sun Apr 29, 2012 2:35 pm    Post subject:

Thanks, Patrick. I'll apply the test patch and let you know if it's hangs again. Since I haven't found the trigger to reproduce it, it will be hard for me to know very quickly if this fixes it.

Your last explanation has me wondering if my use of Dropbox is part of the problem. Last fall I started using Dropbox to sync files between my two MacBooks and (in some cases) the Windows machine at my worksite. Sometimes I forget to close a particular document in Neo on one computer before opening it in Neo, OOo, or Word on another computer. Could this be triggering the deadlock?

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Apr 29, 2012 2:46 pm    Post subject:

Lorinda wrote:
Your last explanation has me wondering if my use of Dropbox is part of the problem. Last fall I started using Dropbox to sync files between my two MacBooks and (in some cases) the Windows machine at my worksite. Sometimes I forget to close a particular document in Neo on one computer before opening it in Neo, OOo, or Word on another computer. Could this be triggering the deadlock?


It may help trigger the deadlock, but the deadlock itself is due to a common coding problem: inverse locking order. From what I found, each of the threads ends up locking two locks. The problem is the one thread locks the first lock then tries to lock the second lock and meanwhile, the other thread locked the second first and is trying to lock the first lock. This results in the deadlock.

I think that the only reason that this OpenOffice.org deadlock is not common is that the first tread only tries to obtain the locks once every long while so the probability of the deadlock is low.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Sun Apr 29, 2012 7:42 pm    Post subject:

Thanks for the clarification.

Another piece of information, that may or may not be helpful. My daughter reported that she had the same problem with Neo in her account on one of our Macs. I thought at first that it was happening on the same Macbook I had it happen on this morning, but I think now it must have been the other one. (I wish the Samples listed the hard drive name somewhere. I need to remember to start indicating which machine is which when I save the Sample files. I dont' always remember which machine I was using when I have problems.)

She does not use Dropbox. She logged out of her account to resolve the issue (I wasn't around when she was having problems) I've told her to let me know the next time it happens before she logs out or forces Neo to quit to I can take a sample.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jun 18, 2012 5:44 am    Post subject:

FYI. I have included the fix that was in the previous test patch in NeoOffice 3.2.1 Patch 6. You can download the patch from the NeoOffice 3.2.1 patch download page.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jun 27, 2012 9:55 pm    Post subject:

Another case of this deadlocking bug was reported in NeoOffice 3.3 Beta in this forum topic. In that forum topic, the location of the deadlock is in the update checking code, not when quitting, but the cause of the deadlock is the same timer thread in NeoOffice's underlying OpenOffice.org code.

Since my fix in NeoOffice 3.2.1 Patch 6 only fixes one instance of this bug, I implemented a new fix to hopefully prevent this deadlocking bug from occurring in both your case and the other new case.

Can you install the test patch and tell us if the bug is still fixed for you?:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.3_Beta-Patch-0-Test-3-Intel.dmg

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Jul 13, 2012 10:26 am    Post subject:

FYI. I have included the refactored fix for this bug in NeoOffice 3.3 Beta Patch 1. You can download the patch from the NeoOffice 3.3 Beta patch download page.

I have also included the fix in NeoOffice 3.2.1 Patch 7. You can download the patch from the NeoOffice 3.2.1 patch download page.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases 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.