Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 15 Replies) BookMacster window hidden (quasi-background state) (Read 24870 times)
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #19 - Nov 22nd, 2016 at 10:32am
Print Post  
Thanks to the persistence of user Neurokraft, this issue has been, to make up a word, quasi-resolved Smiley

It does have to do with our apps' Preference setting to Launch in background, which is used by some tiny number of users.  To offer this feature, our apps always start up in the background, and then, for the 99.9% of users who have this preference setting OFF, our apps immediately ask macOS to bring me to the foreground.  It turns out that, if there are insufficient system resources, and in particular, if there are more than 75-100 Safari tabs open, macOS will refuse to do this momentarily, which sets up a condition that prevents document windows from opening.

Beginning in version 2.2.17, our apps will detect this refusal, and ask the user to close Safari tabs or otherwise free up system resources.  Although our apps are particularly susceptible as explained above, in my experience, having 75-100 Safari tabs open, for example, makes all apps run slowly.  Therefore our apps are being helpful in pointing this out to the user.

We may take up this issue with Apple someday.
  

Jerry Krinock
Back to top
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #18 - Nov 4th, 2016 at 9:37pm
Print Post  
Thanks to the persistence of Neurokraft, we are now able to reproduce this issue.  It appears to be a weird bug in macOS.  Unfortunately, we have not yet been able to reproduce it in a clean macOS user account, so we're not sending it to Apple yet.

However, we can detect when the issue occurs.  When it does, the next version of BookMacster and its siblings, version 2.2.17, will present the following workaround to the user:

• Quit the app.
• Close unnecessary tabs in web browsers such as Safari.
• Relaunch the app.

In the meantime, any user seeing that BookMacster or one of its siblings is not opening windows as expected should please try that.

In our case, we find that the trouble occurs if we have more than about 95 Safari tabs open – pretty close to the 84 reported by Neurokraft.
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #17 - Oct 28th, 2016 at 2:27pm
Print Post  
Opening 84 tabs of about:blank will also do the trick. I right-click a folder in Safari's Bookmark Editor containing the duplicate bookmarks and select Open in New Tabs. Weirdness confirmed.
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #16 - Oct 27th, 2016 at 11:09pm
Print Post  
OK, I didn't understand what you were getting at, but now I do.  You think it might be just tabs being open, not the CPU or whatever they are using.  Or something like that.  Of course, we don't know yet.  Seems weird, but since this whole thing is weird, I'll test it!
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #15 - Oct 27th, 2016 at 9:46pm
Print Post  
Yeah, I also use Wunderground, though more frequently via the iPhone app or BusyCal integration.

If I wasn't clear, I was using this method to open tabs precisely because it didn't download and render everything, but immediately affected BookMacster just the same. In fact, I've found right-clicking a folder in Safari's Bookmark Editor and selecting Open in New Tabs to be equally effective; I can go from working BookMacster to broken in 40 seconds. This is much quicker than opening the same websites via .webloc files or script. Thought it might be useful in your debugging.
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #14 - Oct 27th, 2016 at 9:28pm
Print Post  
I'd be surprised if those 100 tabs were actually downloaded and rendered in a few seconds.  I don't usually save tabs, but when I do I see progress spinners in the tabs for tens of seconds.

Modern web pages use a lot of resources not only for loading but to keep themselves loaded, because the servers are constantly pushing updates to the content and, of course, advertisements.  Some are worse than others.  The Weather Underground is my favorite source for weather info.  But I always close their tab after I'm done looking at it, especially if I plan to be on battery power.
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #13 - Oct 27th, 2016 at 8:07pm
Print Post  
Yeah, no doubt. I ask because, on my computer, Safari can restore (as opposed to initially open) about 100 tabs in just a few seconds, but the effect on BookMacster is the same.
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #12 - Oct 27th, 2016 at 7:55pm
Print Post  
Neurokraft wrote on Oct 27th, 2016 at 7:11pm:
If you quit and reopen Safari, do the restored tabs introduce the same resource burden on your other apps?
I don't know.  I did not quit Safari, just closed the window that had the 157 tabs.  I shall keep this in mind for tomorrow.  It's kind of a disruptive test Wink
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #11 - Oct 27th, 2016 at 7:11pm
Print Post  
If you quit and reopen Safari, do the restored tabs introduce the same resource burden on your other apps?
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #10 - Oct 27th, 2016 at 6:57pm
Print Post  
Thanks again, Neurokraft.

I think you've got something there.  I just grepped together a script to load all of the 157 web pages I visited yesterday and today into tabs in a new Safari window.  I then found that, in BookMacster, the Preferences and Inspector window would open.  But File > Open Recent failed to open the selected document, and File New Bookmarkshelf failed after I clicked Save in the initial dialog which asked for a document name.  Very similar to or maybe exactly what you reported.

With these 157 tabs, however, other apps were having trouble too.  Even the cmd-tab application switcher took 45 seconds to show its face after I hit cmd-tab.  So apparently 157 is too many for my MacBook Air with 4 GB RAM.

But showing a new document in BookMacster does appear to be more sensitive to system overload than other operations in other apps.  I shall set up a debugging session and try it again, probably tomorrow.
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #9 - Oct 27th, 2016 at 5:15pm
Print Post  
Closing a bunch of tabs in Safari cleared up the issue. I had a separate Safari window and when BookMacster stopped opening, I stopped bookmarking and closing, which in retrospect only exacerbated the issue. Once those 84 (!) tabs were closed, I tested opening a lot of windowed applications and BookMacster opened fine. Still, the count from ps -u was only 315. So I brought the saved tab bookmarks over to Chrome and when I opened them there, the issue resurfaced.

At this point I have a practical solution (don’t open a silly number of tabs) but I’m curious if this can be replicated.
  
Back to top
 
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #8 - Oct 27th, 2016 at 4:39pm
Print Post  
The test version appears to be damaged. I downloaded it with two different browsers and unzipped it with two different programs. It would either crash immediately or I received the message that the app is damaged and can't be opened.
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #7 - Oct 27th, 2016 at 4:22pm
Print Post  
Thank you for the tip on Backblaze.   I made myself a note to check it out.

I just opened my /Applications folder and launched a bunch of apps, so that my cmd-tab application switcher showed 62 apps running.  I then relaunched BookMacster a couple times.  Both times, it worked fine.

Here's another idea.  Because there are a few users who like to run BookMacster in the background, BookMacster has this capability, and in order for this to work in macOS, the technique is that the app has a "key" in its package which tells macOS to launch it in the background.  Immediately after launch, it is "transformed" to the foreground.  I just uploaded a special BookMacster 2.2.15-test version which has that key removed.  Please see if that works any better for you.
  

Jerry Krinock
Back to top
IP Logged
 
Neurokraft
Member
Offline
Posts: 11
Joined: Oct 14th, 2016
Re: BookMacster window hidden (quasi-background state)
Reply #6 - Oct 27th, 2016 at 4:10pm
Print Post  
BookMacster can work when Dictionary.app is running. As an aside, I was very happy with BackBlaze but stopped using it on Macs when I discovered it didn’t backup most HFS metadata. I generally keep the numbered of Windowed Processes fewer than around 15. When I just tested it the issue started happening when the output of ps -u <username> reached around 345 lines (ps -e around 485). Not necessarily triggered by a specific quantity of processes, but there’s some sort of correlation here.
  
Back to top
 
IP Logged
 
Jerry Krinock
Admin
Offline
Posts: 1683
Location: San Jose, California, USA
Joined: Sep 29th, 2008
Re: BookMacster window hidden (quasi-background state)
Reply #5 - Oct 27th, 2016 at 4:25am
Print Post  
Thank you for the follow-up, Neurokraft.

One of the users who had the problem before upgrading to 10.12 sent me a list of about a dozen applications, and he said that if any of these applications was running, he had the problem.  This list was a total grab bag, including, I remember, Dictionary.app, which comes with macOS from Apple, clearly not a culprit.

What you describe, that it is the number of programs which are running, and not any program in particular, is consistent with the grab bag reported by this other user, except that you did more testing and figured this out.

But there clearly is some kind of culprit, though, because by the end of the day after a restart I always have typically 25 or more apps running, and I only restart once every week or two to install macOS beta updates from Apple.  Right now my app switcher shows 29 apps running, and this does not include all of my faceless non-Apple daemons – QuicKeys (ancient and unsupported but still works!), Dropbox, BackBlaze, Jettison, NoSleep, etc..  And I have never seen this issue occur.

If what you say about the number of apps is true, then BookMacster should work fine in your Guest account, unless maybe if you launch a bunch of apps first?

Sorry I'm just kind of thinking out loud.  I'm going to have to think about this, and maybe ask around.  What are the approximate numbers of apps/programs, do you think, that causes the problem?
  

Jerry Krinock
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint