CanvasBlocker icon indicating copy to clipboard operation
CanvasBlocker copied to clipboard

The site freezes for a while and uses more RAM than usual on certain whitelisted sites.

Open Iz-zzzzz opened this issue 1 year ago • 4 comments

The extension causes the site to become unresponsive for a while and uses more RAM than usual on certain sites, such as youtube.com, mail.google.com, translate.google.com , etc. ~~Eventually, the tab crashes~~.

Firefox 134 update

After the Firefox 134 update, it partially resolved the issue, changing tab crashes to temporary tab freezes.

Description (How to reproduce on youtube.com)

  1. Install new fresh Firefox profile
  2. Set Enhanced Tracking Protection to Strict
  3. Install latest version of CanvasBlocker from CanvasBlocker Beta
  4. Add youtube.com to CanvasBlocker's whilelist
  5. Go to video page on youtube.com -> click next video/backward/refresh/hard refresh until noticing page is freeze.
  6. Go to about:processes to see memory using more than usual (up to 5 GB)

[!Note]

  • Possibility to get memory leak on Windows is about 30%, and 80% on Android according to my tests.

Expected Behaviour

  1. Tab should not freeze
  2. CPU and Memory usage should be normal.

Current Behaviour

Firefox 133.0.3 64-bit Windows 11

image image

https://github.com/user-attachments/assets/82a474e0-fe14-4a12-92be-16917d1337b8

Firefox 134 Beta on Android 13

https://github.com/user-attachments/assets/8f3e4efd-1139-4233-9ae7-cac028878224

Possible Solution

  • (Temporary Solution) Kill related web processes
  • (Permanent Solution) Completely disable CanvasBlocker
  • Don't Touch Site List: New while-list list which ensures the extension does not interact with the DOM on sites listed in the list.
  • Do not add youtube.com to CanvasBlocker's whilelist

Context

~~I have been testing in various environments to identify what exactly causes the issue(which part of FPP or CanvasBlocker), but I still cannot figure it out. I think I need help from others.~~ I'm pretty sure the cause is CanvasBlocker itself. I have tried various combinations of Firefox settings (Default, enable FPP .etc), but the issue still occurs if I enable CanvasBlocker.

Your Environment

  • CanvasBlocker Version used: Version 1.11.20241222
  • Firefox 133.0.3 and 134 and 134.0.1 and 135.0.1 64-bit Windows 10, 11(Intel i5 Gen9) and Firefox 134 and 135 and 136 Beta on Android 12, 13, 14 and 15
  • Enabled extension only CanvasBlocker beta
  • ETP strict mode.
  • Browser Privacy > Website Privacy Preferences
    • Checked Tell websites not to sell or share my data

Your Settings

Stock setting but add youtube.com to CanvasBlocker's whilelist.

{
	"logLevel": 1,
	"urlSettings": [],
	"hiddenSettings": {},
	"expandStatus": {},
	"displayHiddenSettings": false,
	"whiteList": "youtube.com",
	"sessionWhiteList": "",
	"blackList": "",
	"blockMode": "fake",
	"protectedCanvasPart": "readout",
	"minFakeSize": 1,
	"maxFakeSize": 0,
	"rng": "nonPersistent",
	"protectedAPIFeatures": {},
	"useCanvasCache": true,
	"ignoreFrequentColors": 0,
	"minColors": 0,
	"fakeAlphaChannel": false,
	"webGLVendor": "",
	"webGLRenderer": "",
	"webGLUnmaskedVendor": "",
	"webGLUnmaskedRenderer": "",
	"persistentRndStorage": "",
	"persistentIncognitoRndStorage": "",
	"storePersistentRnd": false,
	"persistentRndClearIntervalValue": 0,
	"persistentRndClearIntervalUnit": "days",
	"lastPersistentRndClearing": 1735298609352,
	"sharePersistentRndBetweenDomains": false,
	"askOnlyOnce": "individual",
	"askDenyMode": "block",
	"showCanvasWhileAsking": true,
	"showNotifications": true,
	"highlightPageAction": "none",
	"highlightBrowserAction": "color",
	"displayBadge": true,
	"storeNotificationData": false,
	"storeImageForInspection": false,
	"ignoreList": "",
	"ignoredAPIs": {},
	"showCallingFile": false,
	"showCompleteCallingStack": false,
	"enableStackList": false,
	"stackList": "",
	"protectAudio": true,
	"audioFakeRate": "100",
	"audioNoiseLevel": "minimal",
	"useAudioCache": true,
	"audioUseFixedIndices": true,
	"audioFixedIndices": "25",
	"historyLengthThreshold": 2,
	"protectWindow": false,
	"allowWindowNameInFrames": false,
	"protectDOMRect": true,
	"domRectIntegerFactor": 4,
	"protectSVG": true,
	"protectTextMetrics": true,
	"blockDataURLs": false,
	"protectNavigator": false,
	"navigatorDetails": {},
	"protectScreen": true,
	"screenSize": "",
	"fakeMinimalScreenSize": true,
	"displayAdvancedSettings": true,
	"displayDescriptions": false,
	"theme": "auto",
	"showPresetsOnInstallation": true,
	"dontShowOptionsOnUpdate": false,
	"disruptSessionOnUpdate": false,
	"updatePending": false,
	"isStillDefault": false,
	"storageVersion": 1
}

Iz-zzzzz avatar Dec 27 '24 17:12 Iz-zzzzz

This issue may be resolved by https://bugzilla.mozilla.org/show_bug.cgi?id=1939295. I will recheck it further.

Iz-zzzzz avatar Jan 16 '25 13:01 Iz-zzzzz

This issue may be resolved by https://bugzilla.mozilla.org/show_bug.cgi?id=1939295. I will recheck it further.

The issue still occurs but much more rarely than before. If it occurs again, I will do my best to profile it.

Iz-zzzzz avatar Jan 19 '25 11:01 Iz-zzzzz

I recently profiled the browser while experiencing this issue, although this is not a new browser profile(this is from my everyday profile). I have already sent it to the email. Could you please take a look? . If you need any other kind of debugging information, please feel free to ask me.

Edit After the Firefox 134 update, it partially resolved the issue, changing tab crashes to temporary tab freezes but still consuming a lot of ram.

Iz-zzzzz avatar Jan 22 '25 14:01 Iz-zzzzz

This bug continue...

Arch Linux, XFCE (xorg),

It happens more with YouTube, I first get a message that Canvas Blocker is slowing down the browser, and after a few seconds, everything starts to freeze, 100% of the RAM being used.

Edit: The bug occurs much more frequently when accessing videos from a specific profile, for example: https://www.youtube.com/@USERPROFILE/videos

procobain avatar Sep 04 '25 06:09 procobain