juzibot / wechaty-puppet-macpro

One puppet based on Mac WeChat for Wechaty.
Apache License 2.0
38 stars 10 forks source link

内存问题, 用提供的Demo抓取消息,运行一段时间就报错退出 #45

Open rongcheng opened 4 years ago

rongcheng commented 4 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
npm install wechaty-puppet-macpro
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

运行Demo代码,打印接收到的消息,过一会儿就报错退出, 退出时机不确定,有时只一条消息就退出,有时20条消息退出。

3. To Reproduce

我用过两个号, 一个联系人和群很少,感觉比较稳定,偶尔也报这个错误 另一个一百多个群,运行一会儿就报错

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

<--- Last few GCs --->

[5856:00000000002C85E0] 76053 ms: Mark-sweep 991.3 (1456.0) -> 991.3 (1440.0) MB, 37.0 / 0.1 ms (average mu = 0.005, current mu = 0.001) last resort GC in o ld space requested [5856:00000000002C85E0] 76095 ms: Mark-sweep 991.3 (1440.0) -> 991.3 (1440.0) MB, 42.5 / 0.1 ms (average mu = 0.003, current mu = 0.001) last resort GC in o ld space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 000003476C419C20]

Security context: 0x03233c91e6e9 1: / anonymous / [000002C7D81DF2D1] [D:\cqq\private\macpro3\node_modules\f lash-store\bundles\flash-store.umd.js:~169] [pc=000003476C45D7F2](this=0x02dc63e 88841 ,_d=0x02c7d81df3f9 <Object map = 000003 3FB226FD89>) 2: step [000002C7D81DF379] [D:\cqq\private\macpro3\node_modules\flash-store\ bundles\flash-store.umd.j...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memo ry 1: 000000013F59F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114 2: 000000013F57A0C6 node::MakeCallback+4518 3: 000000013F57AA30 node_module_register+2032 4: 000000013F8020EE v8::internal::FatalProcessOutOfMemory+846 5: 000000013F80201F v8::internal::FatalProcessOutOfMemory+639 6: 000000013FD22BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556 7: 000000013FD210CB v8::internal::Heap::MaxHeapGrowingFactor+2651 8: 000000013F8DCA3B v8::internal::Factory::AllocateRawWithImmortalMap+59 9: 000000013F8DF4ED v8::internal::Factory::NewRawTwoByteString+77 10: 000000013FAE9AA8 v8::internal::Smi::SmiPrint+536 11: 000000013F7F582B v8::internal::StringHasher::UpdateIndex+219 12: 000000013F81AB26 v8::String::Utf8Length+22 13: 000007FED63BFD63 14: 000007FED63BB774 15: 000003476C419C20

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```

7. Additional context

Add any other context about the problem here.

[bug]

su-chang commented 4 years ago

Thank you for your issue, we will try to reproduce and resolve it sooner.