Browser-laptop: Pressing cmd/ctrl + w sometimes makes entire UI unresponsive

Created on 26 May 2017  路  27Comments  路  Source: brave/browser-laptop

- Did you search for similar issues before submitting this one?

Yes

- Describe the issue you encountered:

After opening a lot of tabs (> 20) , I then try to close them rapidly with a key-combo of cmd/ctrl + w

- Platform (Win7, 8, 10? macOS? Linux distro?):

macOS 10.12.6 x64 - Reproduced
Win 10 x64 - Reproduced

- Brave Version (revision SHA):

Brave: 0.18.29 
rev: 85f059d83b8861b3a7e127c42b2fe9d574be5810 
Muon: 4.3.16 
libchromiumcontent: 60.0.3112.113
Brave: 0.18.32 
rev: e94738d9f289e9fb1a0e95aea29ee2c37196a271 
Muon: 4.3.18 
libchromiumcontent: 61.0.3163.71

- Steps to reproduce:

  • open Brave 0.18.32 rev: e94738d9f289e9fb1a0e95aea29ee2c37196a271
  • open a page of two worth of tabs by holding ctrl+t
  • while you're holding ctrl+t, quickly switch over to ctrl+w and start closing tabs
  • you'll notice after closing a few tabs, the entire UI will become unresponsive

The following erros appear in the terminal when running Brave locally:

(node:3642) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 app-state-change listeners added. Use emitter.setMaxListeners() to increase limit
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 app-state-change listeners added. Use emitter.setMaxListeners() to increase limit
    at _addListener (events.js:262:19)
    at AppStore.addListener (events.js:279:10)
    at AppStore.addChangeListener (/Users/kjozwiak/projects/browser-laptop/js/stores/appStore.js:290:10)
    at EventEmitter.ipcMain.on (/Users/kjozwiak/projects/browser-laptop/app/browser/tabs.js:125:12)
    at emitOne (events.js:96:13)
    at EventEmitter.emit (events.js:191:7)
    at WebContents.<anonymous> (/Users/kjozwiak/projects/browser-laptop/node_modules/electron-prebuilt/dist/Brave.app/Contents/Resources/electron.asar/browser/api/web-contents.js:182:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:194:7)
An uncaught exception occurred in the main process Uncaught Exception:
Error: Object has been destroyed
    at getTabValue (/Users/kjozwiak/projects/browser-laptop/app/browser/tabs.js:53:38)
    at tabState.getTabsByWindowId.forEach (/Users/kjozwiak/projects/browser-laptop/app/browser/tabs.js:992:27)
    at List.__iterate (/Users/kjozwiak/projects/browser-laptop/node_modules/immutable/dist/immutable.js:2208:13)
    at List.forEach (/Users/kjozwiak/projects/browser-laptop/node_modules/immutable/dist/immutable.js:4383:19)
    at Object.updateTabsStateForWindow (/Users/kjozwiak/projects/browser-laptop/app/browser/tabs.js:988:49)
    at Object.updateTabsStateForAttachedTab (/Users/kjozwiak/projects/browser-laptop/app/browser/tabs.js:985:16)
    at tabsReducer (/Users/kjozwiak/projects/browser-laptop/app/browser/reducers/tabsReducer.js:74:20)
    at reducers.reduce (/Users/kjozwiak/projects/browser-laptop/js/stores/appStore.js:382:24)
    at Array.reduce (<anonymous>)
    at applyReducers (/Users/kjozwiak/projects/browser-laptop/js/stores/appStore.js:380:68)

- Actual result:

After a period, Brave will stop responding and you will be stuck on a particular tab.
Pausing and trying to use ctrl/cmd + w will have no effect. The entire Brave UI will also become unresponsive.

- Expected result:

Tabs should be closed without the entire UI becoming unresponsive.

- Will the steps above reproduce in a fresh profile? If not what other info can be added?

Yes

- Is this an issue in the currently released version?

Yes

- Can this issue be consistently reproduced?

Yes

- Screenshot if needed:

unresponsiveui

Qchecked-Linux Qchecked-Win32 Qchecked-Win64 Qchecked-macOS Qtest-plan-specified bug featurkeyboard-shortcuts release-noteinclude

Most helpful comment

I can still reproduce on 0.17.14

All 27 comments

+1 from me. Brave 0.15.310 on macOS 10.12.x. Cmd+W doesn't have to be rapid to cause this problem.

Possibly related: #9065 and #45.

So far, I haven't been able to reproduce with 0.16.6, but I'll keep trying just to be sure.

Wasn't this fixed with https://github.com/brave/browser-laptop/issues/8740? (which deployed with 0.15.314)

@Liunkae you might try the 0.15.314 and see if you can make it happen. If unable to reproduce, let's remove milestone / close issue 馃槃

Yeah, I think it was fixed in 0.15.314. Closing.

Never mind, I was just able to reproduce with 0.16.6.

Cmd+W does not work.
Closing the tab from the tabbar works.
Closing from the menu works.

I'm still trying to get a consistent STR.

I get this error in the browser-level console:
Unchecked runtime.lastError while running guestViewInternal.destroyGuest: Unknown error. index.html:1

@alexwykoff @Liunkae Could this be mac only? I tried to reproduce this with 0.16.9 by going as fast as I could and I couldn't on Linux and Windows.

It may have been fixed for Windows and Linux with #8740. I can still reproduce with 0.16.9 on Mac after some browsing (with the error above).

I'm getting the same error message when I encounter #9385. These problems may be related. Maybe something goes wrong with the tab state.

@bbondy pointed that #9539 might have fixed it and I confirm I no longer see this running macOS. @alexwykoff mind confirming that?

Moving to 0.18.x I'm not able to reproduce.
I do notice some lag that makes it seems like cmd+w doesn't work, but it works if you wait for the pages to load. See steps below that I tried to reproduce with.

Alex shared these steps:

using keyrepeat (holding down cmd + w) i can repro pretty easily under the following scenario:
1. set homepage to reddit.com/r/random [and homepage for newtab setting]
2. use keyrepeat with cmd+t to open 5-6 tab pages worth of tabs (don't wait for tabs to finish loading)
3. use keyrepeat with cmd+w to close tabs
after what feels like 10-20 tabs, it appears to stop responding

similar scenario
1. same as ^
2. use keyrepeat with cmd+n to open ~20-30 windows (don't wait for windows to finish loading)
3. use keyrepeat with cmd+w to close windows
after what feels like 5-10 windows, it appears to stop responding


I have not been able to reproduce with 0.17.3. I think it was fixed in 0.17.x.

Just reproduced with 0.17.4. Definitely much rarer than 0.16.x, though.

Per @NejcZdovc, if someone is trying to reproduce, try launching from command line... this way the browser process will log stdout with something like window ID not found

Just reproduced with the console up. No output.

When it gets in that state, the tab cannot be closed with Cmd+W, but it can be closed with the tabbar close button. Maybe it's related to the keyboard shortcut. I started noticing the problem around 0.15.x, which is when #45 was implemented.

OK I'm able to reproduce this... I don't see any errors being logged though (to browser dev tools or to command line)

Here are my steps:

  1. Have a fresh session w/ Brave
  2. On the new tab page, middle click (or cmd/ctrl click) on the new tab icons until you have about 5 tab pages worth of tabs
  3. Go to the last tab page
  4. Hold down Cmd/Ctrl + w
  5. eventually you'll have a white page

What happens is: the tabs are being close so fast it doesn't seem to pick a new active tab

This may be related to https://github.com/brave/browser-laptop/issues/9306

I can still reproduce. 馃槙

Brave: 0.17.12
rev: 0095c359d27c5387a07152fdec161dfc54c5fef4
Muon: 4.1.6
libchromiumcontent: 59.0.3071.109
V8: 5.9.211.38
Node.js: 7.9.0
Update Channel: dev
os.platform: darwin
os.release: 16.6.0
os.arch: x64

thanks for the confirmation, @Liunkae 馃槃 I'll reopen and remove the QA/required tag

Found STR! Brave 0.17.13 on macOS 10.12.x.

  1. Create a new window.
  2. Create a new tab (so there are now two tabs).

Scenario A

  1. Tear off the active tab.
  2. Close the current window.

The original window is blank and no tab is selected.

Scenario B

  1. Tear off the inactive tab.
  2. Close the current window.

The original window's tab cannot be closed with Ctrl/Cmd+W.

More STR. Brave 0.17.13 on macOS 10.12.x

  1. Create a new window.
  2. Open a new tab (there should be two tabs open now).
  3. Close the first (inactive) tab.

The current tab cannot be closed with Ctrl/Cmd+W.

@bsclifton @bbondy @alexwykoff Can anyone else reproduce with the STR above? I can't be the only one with this annoying problem.

I can still reproduce on 0.17.14

Why was this reopened?

0.18.x: 78a0757497c86f8a9002dbe155c1bb9dbfcc0093
0.19.x: 747176c17368799648a51be4c0784f23a79d3305
0.20.x: cbea3e010092ff86a5e71040c8f4b5ecb0f00019
master: 43ff261fd0d715737c9fdcae7fba59c3691a9d7f

Can leave dead tabs still but doesn't freeze up entire UI anymore. 馃憤

Can leave dead tabs still but doesn't freeze up entire UI anymore. 馃憤

Same results. The dead tabs issue will be covered in #10905.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mykkymk picture mykkymk  路  3Comments

shortstuffsushi picture shortstuffsushi  路  3Comments

jonathansampson picture jonathansampson  路  3Comments

luixxiul picture luixxiul  路  3Comments

stevespringett picture stevespringett  路  3Comments