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

微信小程序崩溃 #23

Closed
transtone opened this issue Nov 21, 2023 · 8 comments
Closed

微信小程序崩溃 #23

transtone opened this issue Nov 21, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@transtone
Copy link

transtone commented Nov 21, 2023

不知道是更新了什么组件,还是页面多了,现在代码稍微保存频繁一点,就自动崩溃了,说内存不足。

怎么增加内存设置?

​Generated an empty chunk: "utils/apijson".​
DONE  Build complete. Watching for changes...
开始差量编译...

<--- Last few GCs --->

[30108:000001BD5F036480]  1230115 ms: Mark-Compact (reduce) 4054.7 (4143.0) -> 4054.0 (4143.5) MB, 2608.70 / 0.01 ms  (average mu = 0.419, current mu = 0.010) allocation failure; scavenge might not succeed
[30108:000001BD5F036480]  1232789 ms: Mark-Compact (reduce) 4055.5 (4143.8) -> 4054.8 (4144.3) MB, 2669.42 / 0.01 ms  (average mu = 0.251, current mu = 0.002) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF63C0B433F node::SetCppgcReference+15695
 2: 00007FF63C02EC26 EVP_MD_meth_get_input_blocksize+78566
 3: 00007FF63C030A11 EVP_MD_meth_get_input_blocksize+86225
 4: 00007FF63CA9A7E1 v8::Isolate::ReportExternalAllocationLimitReached+65
 5: 00007FF63CA83F78 v8::Function::Experimental_IsNopFunction+1336
 6: 00007FF63C8E57E0 v8::Platform::SystemClockTimeMillis+659552
 7: 00007FF63C8E2868 v8::Platform::SystemClockTimeMillis+647400
 8: 00007FF63C8F7B7A v8::Platform::SystemClockTimeMillis+734202
 9: 00007FF63C8F83F7 v8::Platform::SystemClockTimeMillis+736375
10: 00007FF63C906D1F v8::Platform::SystemClockTimeMillis+796063
11: 00007FF63C5C72E5 v8::CodeEvent::GetFunctionName+116773
12: 00007FF5DCB1AAFA

https://www.cnblogs.com/GoodMemoryBlog/p/17325015.html
这里有人说是 unocss 的 icon 插件问题,测试中 无效

@KeJunMao
Copy link
Member

KeJunMao commented Nov 21, 2023

请问 node 版本是多少呢?

可以尝试下在生成 pages.json 和 manifest.json 后把 pages 和 manifest 插件禁用了看看是不是这辆插件的锅?

@transtone
Copy link
Author

node-v20.9.0

@KeJunMao
Copy link
Member

您好,能辛苦提供下稳定复现吗

@chengazhen
Copy link

猜测是 uni helper的插件有问题, 例如自动生成路由的插件, 这个肯定要监测文件变化的

@KeJunMao
Copy link
Member

KeJunMao commented Jan 16, 2024

猜测是 uni helper的插件有问题, 例如自动生成路由的插件, 这个肯定要监测文件变化的

watch 文件为啥会有问题,不 watch 的话怎么自动更新 pages.json 呢

@chengazhen
Copy link

我的意思是, 有可能是 watch 的过程中触发了太多的逻辑导致卡顿崩溃.. 我只是猜测

@transtone
Copy link
Author

您好,能辛苦提供下稳定复现吗

尝试提供一个稳定复现,但似乎只有在内部项目上才能复现(页面比较多,不方便提供)。尝试加大内存,崩溃就没那么频繁了。

@ModyQyW ModyQyW added the enhancement New feature or request label Aug 28, 2024
@transtone
Copy link
Author

已修复。
应该是 unocss 插件的问题,好像是监听错了路径。上次找问题的时候看到了,但一下子又找不到原贴,就不再找了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants