juzibot / donut-tester

40 stars 4 forks source link

Segment fault due to flash-store revert to v0.14.1 #3

Closed su-chang closed 4 years ago

su-chang 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:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. Please search in FAQ List first, and make sure your problem has not been solved before.

  3. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

Give a clear and concise description of what the bug is.

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

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

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: 16:58:27 VERB PuppetServiceImpl stop() 16:58:27 VERB EventStreamManager stop() 16:58:27 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired 16:58:27 VERB EventStreamManager connectPuppetEventToStreamingCall() unconnect() 13 callbacks 16:58:27 VERB PuppetDonut stop() 16:58:27 SILL StateSwitch off() is false 16:58:27 SILL StateSwitch off() is false 16:58:27 VERB StateSwitch off(pending) <- (false) 16:58:27 VERB PuppetDonut stopBridge() 16:58:27 SILL StateSwitch on() is false 16:58:27 VERB Bridge stop() 16:58:27 VERB CacheManager release() 16:58:27 VERB CacheManager releaseCache() 16:58:27 SILL CacheManager releaseCache() closing caches ... npm ERR! code ELIFECYCLE npm ERR! errno 3221225477 npm ERR! wechaty@0.37.5 io-client: `ts-node bin/io-client` npm ERR! Exit status 3221225477 npm ERR! npm ERR! Failed at the wechaty@0.37.5 io-client script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-04-14T08_58_27_608Z-debug.log /c/Program Files (x86)/nodejs/npm: line 34: 960 Segmentation fault "$NODE_EXE" "$NPM_CLI_JS" "$@" ```

7. Additional context

Add any other context about the problem here.

[bug]

su-chang commented 4 years ago
10:52:43 VERB Bridge stop()
10:52:43 VERB CacheManager release()
10:52:43 VERB CacheManager releaseCache()
Stacktrace:
   ptr1=12110911
    ptr2=00000000
    ptr3=00000000
    ptr4=00000000
    failure_message_object=00595AEC

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

    0: ExitFrame [pc: 1EF5209E]
Security context: 0x17692705 <JSObject>
    1: _close [19D2D195] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\rocksdb\leveldown.js:24] [bytecode=3F5359F9 offset=13](this=0x3f90b661 <LevelDOWN map = 1212BB39>,callback=0x336aae45 <JSFunction (sfi = 3F535819)>)
    2: close [055FE0CD] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\rocksdb\node_modules\abstract-leveldown\abstract-leveldown.js:61] [bytecode=3F5358B1 offset=61](this=0x3f90b661 <LevelDOWN map = 1212BB39>,callback=0x336aae01 <JSFunction (sfi = 3F535561)>)
    3: _close [271FF765] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\encoding-down\index.js:61] [bytecode=3F535741 offset=13](this=0x3f90b5f9 <DB map = 1212CE4D>,cb=0x336aae01 <JSFunction (sfi = 3F535561)>)
    4: close [3CF50221] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\abstract-leveldown\abstract-leveldown.js:58] [bytecode=3F5355F9 offset=61](this=0x3f90b5f9 <DB map = 1212CE4D>,callback=0x336aadbd <JSFunction (sfi = 3F53515D)>)
    5: close [1E5F7675] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\levelup\lib\levelup.js:140] [bytecode=3F535291 offset=69](this=0x3f911571 <LevelUP map = 1212CFAD>,callback=0x2870438d <undefined>)
    6: arguments adaptor frame: 0->1
    7: /* anonymous */ [336AA9F9] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:636] [bytecode=3F534FAD offset=68](this=0x3f910e09 <FlashStore map = 1212C951>,_d=0x336aaa8d <Object map = 0455E781>)
    8: step [336AAA6D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:23] [bytecode=2AEC2751 offset=748](this=0x106844a1 <JSGlobal Object>,op=0x336aabf9 <JSArray[2]>)
    9: next [336AAB3D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:~4] [pc=3F7468B3](this=0x336aab01 <Object map = 08205E0D>,v=0x2870438d <undefined>)
   10: arguments adaptor frame: 0->1
   11: /* anonymous */(aka /* anonymous */) [3E4E7601] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:~65] [pc=3F73D60E](this=0x2870438d <undefined>,thisArg=0x3f910e09 <FlashStore map = 1212C951>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336aa8a1 <JSFunction (sfi = 3F534CA9)>)
   12: close [1E5F9651] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:631] [bytecode=3F534D19 offset=20](this=0x3f910e09 <FlashStore map = 1212C951>)
   13: /* anonymous */ [336AA011] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:334] [bytecode=3F5347D1 offset=251](this=0x3f910765 <CacheManager map = 1212D215>)
   14: next [17690275](this=0x336aa245 <JSGenerator>)
   15: /* anonymous */(aka /* anonymous */) [052C89E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:~2] [pc=05A9D8F7](this=0x2870438d <undefined>,thisArg=0x3f910765 <CacheManager map = 1212D215>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336aa011 <JSFunction (sfi = 3F53449D)>)
   16: releaseCache [2E8D5A25] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:321] [bytecode=3F53450D offset=22](this=0x3f910765 <CacheManager map = 1212D215>)
   17: /* anonymous */ [336A9871] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:53] [bytecode=3F534299 offset=155](this=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>)
   18: next [17690275](this=0x336a9a81 <JSGenerator>)
   19: /* anonymous */(aka /* anonymous */) [052C89E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:~2] [pc=05A9D8F7](this=0x2870438d <undefined>,thisArg=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a9871 <JSFunction (sfi = 3F534071)>)
   20: release [2E8D5A4D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:47] [bytecode=3F5340DD offset=22](this=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>)
   21: /* anonymous */ [336A90E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:113] [bytecode=3F533E9D offset=136](this=0x3f9102e1 <EventEmitter map = 1212D8F5>)
   22: next [17690275](this=0x336a92f1 <JSGenerator>)
   23: /* anonymous */(aka /* anonymous */) [3E4D5061] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:~2] [pc=05AFE457](this=0x2870438d <undefined>,thisArg=0x3f9102e1 <EventEmitter map = 1212D8F5>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a90e1 <JSFunction (sfi = 3F533CD9)>)
   24: stop [3F92E9A5] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:107] [bytecode=3F533D45 offset=20](this=0x3f9102e1 <EventEmitter map = 1212D8F5>)
   25: /* anonymous */ [336A8781] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:131] [bytecode=3F533965 offset=203](this=0x3f9436fd <EventEmitter map = 1212D9D1>)
   26: next [17690275](this=0x336a8a19 <JSGenerator>)
   27: /* anonymous */(aka /* anonymous */) [3E4D4FB1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:~2] [pc=3F7497D7](this=0x2870438d <undefined>,thisArg=0x3f9436fd <EventEmitter map = 1212D9D1>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a8781 <JSFunction (sfi = 3F5335ED)>)
   28: stopBridge [3F93BAB5] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:122] [bytecode=3F53365D offset=31](this=0x3f9436fd <EventEmitter map = 1212D9D1>,bridge=0x3f9102e1 <EventEmitter map = 1212D8F5>)
   29: /* anonymous */ [336A76ED] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:71] [bytecode=3F5330F5 offset=288](this=0x3f9436fd <EventEmitter map = 1212D9D1>)
   30: next [17690275](this=0x336a7915 <JSGenerator>)
   31: /* anonymous */(aka /* anonymous */) [3E4D4FB1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:~2] [pc=3F7497D7](this=0x2870438d <undefined>,thisArg=0x3f9436fd <EventEmitter map = 1212D9D1>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a76ed <JSFunction (sfi = 3F532DD9)>)
   32: stop [3F93BA99] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:59] [bytecode=3F532E45 offset=20](this=0x3f9436fd <EventEmitter map = 1212D9D1>)
   33: /* anonymous */ [336A69E9] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\wechaty-puppet-hostie\dist\src\server\puppet-implementation.js:757] [bytecode=3F532501 offset=166](this=0x2590c08d <Object map = 0EC5E049>)
   34: next [17690275](this=0x336a6c0d <JSGenerator>)
   35: /* anonymous */(aka /* anonymous */) [336A6A55] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\wechaty-puppet-hostie\dist\src\server\puppet-implementation.js:8] [bytecode=22876CC1 offset=82](this=0x2870438d <undefined>,resolve=0x336a6ab1 <JSFunction (sfi = 0D98F5E5)>,reject=0x336a6acd <JSFunction (sfi = 0D98F629)>)
   36: new Promise(aka Promise) [1768BABD](this=0x28704421 <the_hole>,0x336a6a55 <JSFunction (sfi = 22876A11)>)
   37: ConstructFrame [pc: 1EF0D933]
   38: StubFrame [pc: 2494AE11]
   39: /* anonymous */(aka /* anonymous */) [2590C0FD] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\wechaty-puppet-hostie\dist\src\server\puppet-implementation.js:4] [bytecode=22876A8D offset=47](this=0x2870438d <undefined>,thisArg=0x2590c08d <Object map = 0EC5E049>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a69e9 <JSFunction (sfi = 3F5322C9)>)
   40: stop [1E5C49BD] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\wechaty-puppet-hostie\dist\src\server\puppet-implementation.js:747] [bytecode=3F53233D offset=38](this=0x1e5c4459 <Object map = 1212AA35>,call=0x336a40fd <ServerUnaryCall map = 08206519>,callback=0x336a69a9 <JSFunction sendUnaryData (sfi = 2287461D)>)
   41: /* anonymous */ [336A43ED] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\grpc\src\server.js:~578] [pc=3F7465E6](this=0x106844a1 <JSGlobal Object>,err=0x28704159 <null>,result=0x336a6681 <Object map = 08206545>)
   42: InternalFrame [pc: 1EF0F204]
   43: EntryFrame [pc: 1EF0A491]

==== Details ================================================

[0]: ExitFrame [pc: 1EF5209E]
[1]: _close [19D2D195] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\rocksdb\leveldown.js:24] [bytecode=3F5359F9 offset=13](this=0x3f90b661 <LevelDOWN map = 1212BB39>,callback=0x336aae45 <JSFunction (sfi = 3F535819)>) {
  // expression stack (top to bottom)
  [07] : 0x2870438d <undefined>
  [06] : 0x04aad4ed <JSFunction close (sfi = 04AAD4A9)>
  [05] : 6
  [04] : 0x28704421 <the_hole>
  [03] : 0x336aae45 <JSFunction (sfi = 3F535819)>
  [02] : 0x3f90be91 <Database map = 1212BB0D>
  [01] : 0x3f90be91 <Database map = 1212BB0D>
  [00] : 0x04aad4ed <JSFunction close (sfi = 04AAD4A9)>
--------- s o u r c e   c o d e ---------
function (callback) {\x0a  this.binding.close(callback)\x0a}
-----------------------------------------
}

[2]: close [055FE0CD] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\rocksdb\node_modules\abstract-leveldown\abstract-leveldown.js:61] [bytecode=3F5358B1 offset=61](this=0x3f90b661 <LevelDOWN map = 1212BB39>,callback=0x336aae01 <JSFunction (sfi = 3F535561)>) {
  // heap-allocated locals
  var callback = 0x336aae01 <JSFunction (sfi = 3F535561)>
  var self = 0x3f90b661 <LevelDOWN map = 1212BB39>
  var oldStatus = 0x176e39a9 <String[4]: open>
  // expression stack (top to bottom)
  [05] : 0x336aae45 <JSFunction (sfi = 3F535819)>
  [04] : 0x3f90b661 <LevelDOWN map = 1212BB39>
  [03] : 0x336aae45 <JSFunction (sfi = 3F535819)>
  [02] : 0x2870438d <undefined>
  [01] : 0x19d2d195 <JSFunction LevelDOWN._close (sfi = 0528D371)>
  [00] : 0x052ba071 <FunctionContext[13]>
--------- s o u r c e   c o d e ---------
function (callback) {\x0a  var self = this\x0a  var oldStatus = this.status\x0a\x0a  if (typeof callback !== 'function') {\x0a    throw new Error('close() requires a callback argument')\x0a  }\x0a\x0a  this.status = 'closing'\x0a  this._close(function (err) {\x0a    if (err) {\x0a      self.status = oldStatus\x0a      return callback(err)\x0a    ...

-----------------------------------------
}

[3]: _close [271FF765] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\encoding-down\index.js:61] [bytecode=3F535741 offset=13](this=0x3f90b5f9 <DB map = 1212CE4D>,cb=0x336aae01 <JSFunction (sfi = 3F535561)>) {
  // expression stack (top to bottom)
  [03] : 0x336aae01 <JSFunction (sfi = 3F535561)>
  [02] : 0x3f90b661 <LevelDOWN map = 1212BB39>
  [01] : 0x3f90b661 <LevelDOWN map = 1212BB39>
  [00] : 0x055fe0cd <JSFunction AbstractLevelDOWN.close (sfi = 0528F221)>
--------- s o u r c e   c o d e ---------
function (cb) {\x0a  this.db.close(cb)\x0a}
-----------------------------------------
}

[4]: close [3CF50221] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\abstract-leveldown\abstract-leveldown.js:58] [bytecode=3F5355F9 offset=61](this=0x3f90b5f9 <DB map = 1212CE4D>,callback=0x336aadbd <JSFunction (sfi = 3F53515D)>) {
  // heap-allocated locals
  var callback = 0x336aadbd <JSFunction (sfi = 3F53515D)>
  var self = 0x3f90b5f9 <DB map = 1212CE4D>
  var oldStatus = 0x176e39a9 <String[4]: open>
  // expression stack (top to bottom)
  [05] : 0x336aae01 <JSFunction (sfi = 3F535561)>
  [04] : 0x3f90b5f9 <DB map = 1212CE4D>
  [03] : 0x336aae01 <JSFunction (sfi = 3F535561)>
  [02] : 0x2870438d <undefined>
  [01] : 0x271ff765 <JSFunction DB._close (sfi = 052931ED)>
  [00] : 0x3e4e5b7d <FunctionContext[14]>
--------- s o u r c e   c o d e ---------
function (callback) {\x0a  var self = this\x0a  var oldStatus = this.status\x0a\x0a  if (typeof callback !== 'function') {\x0a    throw new Error('close() requires a callback argument')\x0a  }\x0a\x0a  this.status = 'closing'\x0a  this._close(function (err) {\x0a    if (err) {\x0a      self.status = oldStatus\x0a      return callback(err)\x0a    ...

-----------------------------------------
}

[5]: close [1E5F7675] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\levelup\lib\levelup.js:140] [bytecode=3F535291 offset=69](this=0x3f911571 <LevelUP map = 1212CFAD>,callback=0x2870438d <undefined>) {
  // stack-allocated locals
  var promise = 0x336aacf5 <Promise map = 04504FF5>
  // heap-allocated locals
  var callback = 0x336aad89 <JSFunction callback (sfi = 054EA6E1)>
  var self = 0x3f911571 <LevelUP map = 1212CFAD>
  // expression stack (top to bottom)
  [07] : 0x336aadbd <JSFunction (sfi = 3F53515D)>
  [06] : 0x3f90b5f9 <DB map = 1212CE4D>
  [05] : 0x2870438d <undefined>
  [04] : 0x336aadbd <JSFunction (sfi = 3F53515D)>
  [03] : 0x3f90b5f9 <DB map = 1212CE4D>
  [02] : 0x3cf50221 <JSFunction AbstractLevelDOWN.close (sfi = 05295035)>
  [01] : 0x052b1575 <FunctionContext[21]>
--------- s o u r c e   c o d e ---------
function (callback) {\x0a  var self = this\x0a  var promise\x0a\x0a  if (!callback) {\x0a    callback = promisify()\x0a    promise = callback.promise\x0a  }\x0a\x0a  if (this.isOpen()) {\x0a    this.db.close(function () {\x0a      self.emit('closed')\x0a      callback.apply(null, arguments)\x0a    })\x0a    this.emit('closing')\x0a    this.db = new Def...

-----------------------------------------
}

[6]: arguments adaptor frame: 0->1 {
}

[7]: /* anonymous */ [336AA9F9] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:636] [bytecode=3F534FAD offset=68](this=0x3f910e09 <FlashStore map = 1212C951>,_d=0x336aaa8d <Object map = 0455E781>) {
  // expression stack (top to bottom)
  [05] : 0x3f911571 <LevelUP map = 1212CFAD>
  [04] : 0x3f911571 <LevelUP map = 1212CFAD>
  [03] : 0x1e5f7675 <JSFunction LevelUP.close (sfi = 2E8B98CD)>
  [02] : 1
  [01] : 0x336aac91 <JSArray[2]>
  [00] : 0
--------- s o u r c e   c o d e ---------
function (_d) {\x0a                    switch (_d.label) {\x0a                        case 0:\x0a                            log.verbose('FlashStore', 'close()');\x0a                            return [4 /*yield*/, this.levelDb.close()];\x0a                        case 1:\x0a                            _d.sent();\x0a            ...

-----------------------------------------
}

[8]: step [336AAA6D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:23] [bytecode=2AEC2751 offset=748](this=0x106844a1 <JSGlobal Object>,op=0x336aabf9 <JSArray[2]>) {
  // expression stack (top to bottom)
  [09] : 0x336aaa8d <Object map = 0455E781>
  [08] : 0x3f910e09 <FlashStore map = 1212C951>
  [07] : 0x336aaa8d <Object map = 0455E781>
  [06] : 0x3f910e09 <FlashStore map = 1212C951>
  [05] : 0x336aa9f9 <JSFunction (sfi = 3F534DD5)>
  [04] : 0x1768588d <JSFunction call (sfi = 0D98BFAD)>
  [03] : 0x336aaa19 <FunctionContext[11]>
  [02] : 0x336aaa19 <FunctionContext[11]>
  [01] : 0x2870438d <undefined>
  [00] : 0x2870438d <undefined>
--------- s o u r c e   c o d e ---------
function step(op) {\x0a        if (f) throw new TypeError("Generator is already executing.");\x0a        while (_) try {\x0a            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\x0a            if (y = 0, t) op...

-----------------------------------------
}

[9]: next [336AAB3D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:~4] [pc=3F7468B3](this=0x336aab01 <Object map = 08205E0D>,v=0x2870438d <undefined>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (v) { return step([n, v]); }
-----------------------------------------
}
[10]: arguments adaptor frame: 0->1 {
}

[11]: /* anonymous */(aka /* anonymous */) [3E4E7601] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:~65] [pc=3F73D60E](this=0x2870438d <undefined>,thisArg=0x3f910e09 <FlashStore map = 1212C951>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336aa8a1 <JSFunction (sfi = 3F534CA9)>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (thisArg, _arguments, P, generator) {\x0a        return new (P || (P = Promise))(function (resolve, reject) {\x0a            function fulfilled(value) { try {\x0a                step(generator.next(value));\x0a            }\x0a            catch (e) {\x0a                reject(e);\x0a            } }\x0a            function ...

-----------------------------------------
}
[12]: close [1E5F9651] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:631] [bytecode=3F534D19 offset=20](this=0x3f910e09 <FlashStore map = 1212C951>) {
  // expression stack (top to bottom)
  [09] : 0x336aa8a1 <JSFunction (sfi = 3F534CA9)>
  [08] : 0x2870438d <undefined>
  [07] : 0x2870438d <undefined>
  [06] : 0x3f910e09 <FlashStore map = 1212C951>
  [05] : 0x2870438d <undefined>
  [04] : 0x336aa8a1 <JSFunction (sfi = 3F534CA9)>
  [03] : 0x2870438d <undefined>
  [02] : 0x2870438d <undefined>
  [01] : 0x3f910e09 <FlashStore map = 1212C951>
  [00] : 0x3e4e7601 <JSFunction __awaiter (sfi = 1E5F7A2D)>
--------- s o u r c e   c o d e ---------
function () {\x0a            return __awaiter(this, void 0, void 0, function () {\x0a                return __generator(this, function (_d) {\x0a                    switch (_d.label) {\x0a                        case 0:\x0a                            log.verbose('FlashStore', 'close()');\x0a                            return ...

-----------------------------------------
}

[13]: /* anonymous */ [336AA011] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:334] [bytecode=3F5347D1 offset=251](this=0x3f910765 <CacheManager map = 1212D215>) {
  // stack-allocated locals
  var .generator_object = 0x336aa245 <JSGenerator>
  // heap-allocated locals
  var this = 0x3f910765 <CacheManager map = 1212D215>
  // expression stack (top to bottom)
  [08] : 0x3f910e09 <FlashStore map = 1212C951>
  [07] : 0x3f910e09 <FlashStore map = 1212C951>
  [06] : 0x1e5f9651 <JSFunction FlashStore.close (sfi = 1E5F8BDD)>
  [05] : 0
  [04] : 0x336aa86d <JSArray[5]>
  [03] : 0x1768babd <JSFunction Promise (sfi = 0D98F32D)>
  [02] : 0x1768bb81 <JSFunction all (sfi = 0D98F3D5)>
  [01] : 0x2e8dbe15 <BlockContext[5]>
--------- s o u r c e   c o d e ---------
function () {\x0a            config_1.log.verbose(PRE, 'releaseCache()');\x0a            if (this.cacheContactRawPayload\x0a                && this.cacheRoomMemberRawPayload\x0a                && this.cacheRoomRawPayload\x0a                && this.cacheFriendshipRawPayload\x0a                && this.cacheRoomInvitationRawPayl...

-----------------------------------------
}

[14]: next [17690275](this=0x336aa245 <JSGenerator>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
[15]: /* anonymous */(aka /* anonymous */) [052C89E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:~2] [pc=05A9D8F7](this=0x2870438d <undefined>,thisArg=0x3f910765 <CacheManager map = 1212D215>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336aa011 <JSFunction (sfi = 3F53449D)>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (thisArg, _arguments, P, generator) {\x0a    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\x0a    return new (P || (P = Promise))(function (resolve, reject) {\x0a        function fulfilled(value) { try { step(generator.next(value)); } catch (e) {...

-----------------------------------------
}
[16]: releaseCache [2E8D5A25] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:321] [bytecode=3F53450D offset=22](this=0x3f910765 <CacheManager map = 1212D215>) {
  // expression stack (top to bottom)
  [09] : 0x336aa011 <JSFunction (sfi = 3F53449D)>
  [08] : 0x2870438d <undefined>
  [07] : 0x2870438d <undefined>
  [06] : 0x3f910765 <CacheManager map = 1212D215>
  [05] : 0x2870438d <undefined>
  [04] : 0x336aa011 <JSFunction (sfi = 3F53449D)>
  [03] : 0x2870438d <undefined>
  [02] : 0x2870438d <undefined>
  [01] : 0x3f910765 <CacheManager map = 1212D215>
  [00] : 0x052c89e1 <JSFunction __awaiter (sfi = 22229BF1)>
--------- s o u r c e   c o d e ---------
function releaseCache() {\x0a        return __awaiter(this, void 0, void 0, function* () {\x0a            config_1.log.verbose(PRE, 'releaseCache()');\x0a            if (this.cacheContactRawPayload\x0a                && this.cacheRoomMemberRawPayload\x0a                && this.cacheRoomRawPayload\x0a                && this.cacheFriendshi...

-----------------------------------------
}

[17]: /* anonymous */ [336A9871] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:53] [bytecode=3F534299 offset=155](this=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>) {
  // stack-allocated locals
  var .generator_object = 0x336a9a81 <JSGenerator>
  // heap-allocated locals
  var this = 0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>
  // expression stack (top to bottom)
  [06] : 0x3f910765 <CacheManager map = 1212D215>
  [05] : 0x3f534165 <String[9]: release()>
  [04] : 0x3f5d6e11 <String[12]: CacheManager>
  [03] : 0x3f910765 <CacheManager map = 1212D215>
  [02] : 0x2e8d5a25 <JSFunction releaseCache (sfi = 2222A905)>
  [01] : 0x2e8dbe15 <BlockContext[5]>
--------- s o u r c e   c o d e ---------
function () {\x0a            config_1.log.verbose(PRE, `release()`);\x0a            if (!this._instance) {\x0a                config_1.log.verbose(PRE, `release() CacheManager not exist, no need to release it.`);\x0a                return;\x0a            }\x0a            yield this._instance.releaseCache();\x0a            this._...

-----------------------------------------
}

[18]: next [17690275](this=0x336a9a81 <JSGenerator>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
[19]: /* anonymous */(aka /* anonymous */) [052C89E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:~2] [pc=05A9D8F7](this=0x2870438d <undefined>,thisArg=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a9871 <JSFunction (sfi = 3F534071)>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (thisArg, _arguments, P, generator) {\x0a    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\x0a    return new (P || (P = Promise))(function (resolve, reject) {\x0a        function fulfilled(value) { try { step(generator.next(value)); } catch (e) {...

-----------------------------------------
}
[20]: release [2E8D5A4D] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:47] [bytecode=3F5340DD offset=22](this=0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>) {
  // expression stack (top to bottom)
  [09] : 0x336a9871 <JSFunction (sfi = 3F534071)>
  [08] : 0x2870438d <undefined>
  [07] : 0x2870438d <undefined>
  [06] : 0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>
  [05] : 0x2870438d <undefined>
  [04] : 0x336a9871 <JSFunction (sfi = 3F534071)>
  [03] : 0x2870438d <undefined>
  [02] : 0x2870438d <undefined>
  [01] : 0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>
  [00] : 0x052c89e1 <JSFunction __awaiter (sfi = 22229BF1)>
--------- s o u r c e   c o d e ---------
function release() {\x0a        return __awaiter(this, void 0, void 0, function* () {\x0a            config_1.log.verbose(PRE, `release()`);\x0a            if (!this._instance) {\x0a                config_1.log.verbose(PRE, `release() CacheManager not exist, no need to release it.`);\x0a                return;\x0a            }\x0a     ...

-----------------------------------------
}

[21]: /* anonymous */ [336A90E1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:113] [bytecode=3F533E9D offset=136](this=0x3f9102e1 <EventEmitter map = 1212D8F5>) {
  // stack-allocated locals
  var .generator_object = 0x336a92f1 <JSGenerator>
  // heap-allocated locals
  var this = 0x3f9102e1 <EventEmitter map = 1212D8F5>
  // expression stack (top to bottom)
  [06] : 0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>
  [05] : 0x3f532235 <String[6]: stop()>
  [04] : 0x3cf69625 <String[6]: Bridge>
  [03] : 0x052ceeb5 <JSFunction CacheManager (sfi = 22229DE1)>
  [02] : 0x2e8d5a4d <JSFunction release (sfi = 22229E95)>
  [01] : 0x11505ead <FunctionContext[19]>
--------- s o u r c e   c o d e ---------
function () {\x0a            config_1.log.verbose(PRE, 'stop()');\x0a            if (!this.donut) {\x0a                throw new Error(`no donut`);\x0a            }\x0a            // await this.donut.DestroyWeChat()\x0a            yield cache_manager_1.CacheManager.release();\x0a        }
-----------------------------------------
}

[22]: next [17690275](this=0x336a92f1 <JSGenerator>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
[23]: /* anonymous */(aka /* anonymous */) [3E4D5061] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:~2] [pc=05AFE457](this=0x2870438d <undefined>,thisArg=0x3f9102e1 <EventEmitter map = 1212D8F5>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a90e1 <JSFunction (sfi = 3F533CD9)>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (thisArg, _arguments, P, generator) {\x0a    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\x0a    return new (P || (P = Promise))(function (resolve, reject) {\x0a        function fulfilled(value) { try { step(generator.next(value)); } catch (e) {...

-----------------------------------------
}
[24]: stop [3F92E9A5] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:107] [bytecode=3F533D45 offset=20](this=0x3f9102e1 <EventEmitter map = 1212D8F5>) {
  // expression stack (top to bottom)
  [09] : 0x336a90e1 <JSFunction (sfi = 3F533CD9)>
  [08] : 0x2870438d <undefined>
  [07] : 0x2870438d <undefined>
  [06] : 0x3f9102e1 <EventEmitter map = 1212D8F5>
  [05] : 0x2870438d <undefined>
  [04] : 0x336a90e1 <JSFunction (sfi = 3F533CD9)>
  [03] : 0x2870438d <undefined>
  [02] : 0x2870438d <undefined>
  [01] : 0x3f9102e1 <EventEmitter map = 1212D8F5>
  [00] : 0x3e4d5061 <JSFunction __awaiter (sfi = 3F5D78CD)>
--------- s o u r c e   c o d e ---------
function stop() {\x0a        return __awaiter(this, void 0, void 0, function* () {\x0a            config_1.log.verbose(PRE, 'stop()');\x0a            if (!this.donut) {\x0a                throw new Error(`no donut`);\x0a            }\x0a            // await this.donut.DestroyWeChat()\x0a            yield cache_manager_1.CacheManager...

-----------------------------------------
}

[25]: /* anonymous */ [336A8781] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:131] [bytecode=3F533965 offset=203](this=0x3f9436fd <EventEmitter map = 1212D9D1>) {
  // stack-allocated locals
  var .generator_object = 0x2870438d <undefined>
  // heap-allocated locals
  var this = 0x3f9436fd <EventEmitter map = 1212D9D1>
  // expression stack (top to bottom)
  [10] : 0x3f9102e1 <EventEmitter map = 1212D8F5>
  [09] : 0x2870438d <undefined>
  [08] : 0x2870438d <undefined>
  [07] : 0x2870438d <undefined>
  [06] : 0x3f5336ed <String[12]: stopBridge()>
  [05] : 0x3f9102e1 <EventEmitter map = 1212D8F5>
  [04] : 0x3f92e9a5 <JSFunction stop (sfi = 3F5D7A35)>
  [03] : 0x336a8975 <FunctionContext[5]>
  [02] : 0x336a8765 <FunctionContext[5]>
  [01] : 0x336a8a19 <JSGenerator>
--------- s o u r c e   c o d e ---------
function () {\x0a            config_1.log.verbose(PRE, 'stopBridge()');\x0a            if (this.state.on()) {\x0a                const e = new Error('stopBridge() found targetState != off, no stop anymore');\x0a                config_1.log.warn(PRE, e.message);\x0a                throw e;\x0a            }\x0a            bridge.r...

-----------------------------------------
}

[26]: next [17690275](this=0x336a8a19 <JSGenerator>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
[27]: /* anonymous */(aka /* anonymous */) [3E4D4FB1] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:~2] [pc=3F7497D7](this=0x2870438d <undefined>,thisArg=0x3f9436fd <EventEmitter map = 1212D9D1>,_arguments=0x2870438d <undefined>,P=0x2870438d <undefined>,generator=0x336a8781 <JSFunction (sfi = 3F5335ED)>) {
// optimized frame
--------- s o u r c e   c o d e ---------
function (thisArg, _arguments, P, generator) {\x0a    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\x0a    return new (P || (P = Promise))(function (resolve, reject) {\x0a        function fulfilled(value) { try { step(generator.next(value)); } catch (e) {...

-----------------------------------------
}
[28]: stopBridge [3F93BAB5] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:122] [bytecode=3F53365D offset=31](this=0x3f9436fd <EventEmitter map = 1212D9D1>,bridge=0x3f9102e1 <EventEmitter map = 1212D8F5>) {
  // heap-allocated locals
  var bridge = 0x3f9102e1 <EventEmitter map = 1212D8F5>
  // expression stack (top to bottom)
  [10] : 0x336a8781 <JSFunction (sfi = 3F5335ED)>
  [09] : 0x2870438d <undefined>
  [08] : 0x2870438d <undefined>
  [07] : 0x3f9436fd <EventEmitter map = 1212D9D1>
  [06] : 0x2870438d <undefined>
  [05] : 0x336a8781 <JSFunction (sfi = 3F5335ED)>
  [04] : 0x2870438d <undefined>
  [03] : 0x2870438d <undefined>
  [02] : 0x3f9436fd <EventEmitter map = 1212D9D1>
  [01] : 0x3e4d4fb1 <JSFunction __awaiter (sfi = 3F919AD5)>
  [00] : 0x11514c19 <FunctionContext[26]>
--------- s o u r c e   c o d e ---------
function stopBridge(bridge) {\x0a        return __awaiter(this, void 0, void 0, function* () {\x0a            config_1.log.verbose(PRE, 'stopBridge()');\x0a            if (this.state.on()) {\x0a                const e = new Error('stopBridge() found targetState != off, no stop anymore');\x0a                config_1.log.warn(PRE, e.m...

-----------------------------------------
}

[29]: /* anonymous */ [336A76ED] [C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:71] [bytecode=3F5330F5 offset=288](this=0x3f9436fd <EventEmitter map = 1212D9D1>) {
  // stack-allocated locals
  var .generator_object = 0x336a7915 <JSGenerator>
  // heap-allocated local...
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! wechaty@0.37.5 io-client: `ts-node bin/io-client`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the wechaty@0.37.5 io-client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-04-16T02_52_43_358Z-debug.log
/c/Program Files (x86)/nodejs/npm: line 34:  1337 Segmentation fault      "$NODE_EXE" "$NPM_CLI_JS" "$@"
huan commented 4 years ago

Cloud you please upgrade to flash-store@0.12.7 to see if it behaves better?

We have upgraded the leveldown from 4.0.1 to 5.6.0

https://github.com/huan/flash-store/commit/4c27a37d5452e014bc6f42e7b5243c341a9a48d8

huan commented 4 years ago

And also give flash-store@0.14.5 a try because we also upgrade the RocksDB from 3.1.0 to 4.1.0 too.

https://github.com/huan/flash-store/commit/b3028d750d70e11879a31d31263751f7e8238392

su-chang commented 4 years ago

OK, I will do it in local env with reset() to test.

huan commented 4 years ago

flash-store@0.19.1 has been published as the first version that using the SQLite3.

Please have a try with it and let me know if it is as stable as we expected.

See: https://github.com/huan/flash-store/issues/75

su-chang commented 4 years ago

Good news: flash-store@0.12.7 work nice

Bad news: flash-store@0.14.5 could not installed successfully in Windows, but work nice in wechaty-puppet-padplus

huan commented 4 years ago

Great to know flash-store@0.12 are good now! The new version of LevelDB saved it.

So for the flash-store@0.14 with RocksDB, I want to confirm that do you mean it can work without the segfault and it is good too except the Windows platform?

su-chang commented 4 years ago

I could not install flash-store@0.14 successfully in Windows platform, so I'm not sure about it.

I have test flash-store@0.14 in Mac platform for wechaty-puppet-padplus, and it work nice.

su-chang commented 4 years ago

This bug has already been fixed in wechaty-puppet-donut@0.0.24.

Update flash-store to v0.12.7.