[Bug] Freezing when closing tab
This bug appeared a few days after installing CMG. Sometimes, I did not complete to determine why, closing a tab with CMG makes my browser (Vivaldi) freeze for few seconds.
Here are the logs:
Closing tab:
Pushed button 2 Showing gestures circle... text selection: hovered element: DIV parent element: SHREDDIT-APP child element: <div class="... setting up canvas... CMG circle redrawn CMG circle redrawn CMG circle redrawn showing hint tooltip for Close tab action to perform by CMG: closeCurrentTab Action to perform: closeCurrentTab
Parent tab:
content.js:1
[Violation] Handling of 'wheel' input event was delayed for 4839 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive.
I could not recreate this issue, but it seems like the extension thinks you continue pressing the right mouse button, and tries to call the scroll wheel action. Does it still happen if you disable the Hide menu on mouse up if nothing selected option?
I confirm it still happens if I disable the Hide menu on mouse up if nothing selected option.
But a weird thing happened earlier today: when I closed a tab, the menu shown on the parent tab. But I did not use the RMB menu on this tab.
This makes me think this freezing bug may occur because releasing RMB behavior is not properly handled (maybe depending on the case, or the browser Chrome integration).
Maybe restrict the call of the menu on the currently focused tab might be a clue. Also, find a way to handle RMB releasing globally not to be interpreted by another tab as "the user press RMB" when switching on another tab (because of closing it) could be a thing.
That's interesting, I never saw a tab catching mouse events from another tab. Could you try this test version and check if the issue still persists? This build also contains a possible fix for your another issue ticket.
The tab I return to after closing one still freezes.
Unfortunately, this doesn't change anything.
Then, I'm afraid, for now I'm out of ideas why it could happen. What you've described (content script in one page intercepts mouse event from another page) shouldn't really be allowed by the browser.
But I already had Vivaldi-specific bug report previously, which I couldn't resolve as well. Probably Vivaldi messes with mouse events under the hood in some manner, which messes up the CMG's ~~spaghetti code~~ finely tuned and fragile mouse event handling mechanism.
I wouldn't be surprised if it turns out to be a Vivaldi specific issue... Thanks for trying to fix it, I'll keep you informed if the situation evolves in any way!
Sure, thanks.
In my case, even the hovered segment highlight is not working in Vivaldi, and mouse events are handled weirdly. But I just tried in latest version of Chrome and everything seems to work fine, as well as in Firefox.
What I can suggest for now, is to disable Continuous vertical scroll detection. It will break the mouse wheel gestures, but probably will fix the stuttering.
That's what I thought too, but it doesn't seem to change anything. I kept that option disabled though.
Hm... How about this one? test_3.zip
With the test_3 build, I tried:
- Both
Hide menu on mouse up if nothing selectedenabled and disabled; - Both
Show regular menu if no action selectedenabled and disabled; - Both
Continuous vertical scroll detectionenabled and disabled.
In all case, the freeze occurs.
Hm, okay. So, my last idea is to disable passive attribute of scroll listener if continuous scroll detection is disabled, and horizontal scroll events are disabled as well.
Here's a test build with this change: test_4.zip
It seems fixed on the majority of websites! The few remaining are maybe only a problem from the Vivaldi side, not yours. This is even difficult for me to know exactly what to do to make it freezes...
Okay, great! It's not a great fix, as it requires you to disable the continuous scroll detection, but at least that's something
I uploaded new 1.5.2 version with these fixes, as well as an additional check to not execute actions if page is not currently focused. I hope this will resolve the problem.
To be sure, I disabled every extension installed. Unfortunately, Vivaldi is still freezing. I tried under Chrome, with my config imported, no freeze has occurred. So I sent a bug report to Vivaldi. Thank you again for taking the time to try to solve the problem.