Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroOmega crashes with gfw-whitelist AutoProxy profile #44

Open
Prurite opened this issue Sep 20, 2024 · 8 comments
Open

ZeroOmega crashes with gfw-whitelist AutoProxy profile #44

Prurite opened this issue Sep 20, 2024 · 8 comments
Labels
enhancement New feature or request firefox

Comments

@Prurite
Copy link

Prurite commented Sep 20, 2024

ZeroOmega version / ZeroOmega 版本

3.3.12

Browser version & OS version / 浏览器名称、版本及操作系统版本

Firefox 130.0.1, Windows 11 Pro 23H2

Problem description / 问题描述

(Please provide as much detail as possible. We recommend the following format.)
(请尽可能多提供一些细节。我们推荐使用下面的格式。)

Steps to reproduce issue / 重现错误所需步骤

(What did you do? / 你做了什么?)

  1. Install ZeroOmega, and configure auto switch with https://raw.githubusercontent.com/Rongronggg9/chinalist/main/chinalist_omega.txt
  2. Restart browser
  3. Open some websites, and open ZeroOmega options

Expected behavior / 期望发生的情况

Addon working properly

Actual (or suggested) behavior / 实际发生的情况(或建议修改后的行为)

Unable to open addon options, seems like it has crashed

@zero-top
Copy link
Member

我这边测试了下,可以正常使用,重启也没问题,没办重现你说的情况.

感觉可能是这个文件太大(1M多),加上不同的系统配置/浏览器性能参数配置等原因引起的.

image

@zero-top zero-top added question Further information is requested firefox labels Sep 21, 2024
@Prurite
Copy link
Author

Prurite commented Sep 22, 2024

ZeroOmega works after importing the rule list; However, when I restart the browser and set ZeroOmega to the auto switch mode, it stops working.
图片
Because the options page doesn't open either, no error log could be exported.
图片
The only way I can use ZeroOmega again is restart the browser, and before opening any website, change the proxy mode to another mode (like direct). Changing the mode to the auto switch afterwards will crash it too.

@zero-top
Copy link
Member

I tested it and it was normal after restarting.

Can you provide a reproducible configuration file?

Also, you can check the log file to see if there is any relevant information.

image

@Prurite
Copy link
Author

Prurite commented Sep 22, 2024

The following was found in the log.

----Z-e-r-o-O-m-e-g-a--------------
2024-09-22 19:13:36    [INFO] is private mode: false
2024-09-22 19:15:57    [INFO] globalThis onerror {
    "0": "uncaught exception: out of memory",
    "1": "",
    "2": 0,
    "3": 1,
    "4": "out of memory"
}

And here is the configuration backup file.
OmegaOptions.zip

@zero-top
Copy link
Member

After using your configuration file, I still can't reproduce it.


uncaught exception: out of memory

It is probably caused by the large size of the file https://raw.githubusercontent.com/Rongronggg9/chinalist/main/chinalist_omega.txt. It may also be related to your operating system configuration, memory size, and firefox settings.

Right now, there is no better solution. May be you can try reducing the size of the file chinalist_omega.txt , or change firefox about:config.

@Prurite
Copy link
Author

Prurite commented Sep 23, 2024

Further test shows that, when ZeroOmega is the ONLY enabled extension, it will not crash. However, if I use it with even only one other extension like https://addons.mozilla.org/en-US/firefox/addon/fireshot/, it will crash after opening multiple tabs. And I have around 15 extensions enabled normally (which all worked fine with SwitchyOmega).

Inspecting the memory usage in about:processes, ZeroOmega has used more than 300MB of RAM before it crashes.

Memory usage by the extensions process, with ZeroOmega and a dozen other extensions:

ZeroOmega is set to proxy mode on start.

175MB Firefox started and idling
=> 215MB Opening a new tab of Google
=> 433MB Switching ZeroOmega from proxy mode to auto switch mode
(peak usage is 502MB for a short while, and it stays around 400MB)
ZeroOmega is still responsive at the moment
=> 521MB Opening a new tab of Github
Falls to around 400MB after a while, and ZeroOmega has crashed.

And even with no tabs opened:

185MB Firefox started and idling
=> 428MB Switching ZeroOmega from proxy mode to auto switch mode

I'd definitely consider this abnormal memory usage, there's no rational way it could use 300MB memory for a 1.2MB rulelist.

@Prurite
Copy link
Author

Prurite commented Sep 29, 2024

Any updates for the abnormal memory usage?

@zero-top
Copy link
Member

zero-top commented Oct 5, 2024

I may not have time to optimize the performance of Firefox.

You can try to reduce the size of this file chinalist_omega.txt , or dive into the code yourself, or figure out firefox config flag to increase js memory limit.

@zero-top zero-top added enhancement New feature or request and removed question Further information is requested labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request firefox
Projects
None yet
Development

No branches or pull requests

2 participants