npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@licq/nwjs-minidump

v2.0.3

Published

decode a nwjs crashed dump file

Downloads

2

Readme

@licq/nwjs-minidump

decode a nwjs crashed dump file

NPM version NPM downloads

Install

npm add @licq/nwjs-minidump

Usage

const minidump = require("@licq/nwjs-minidump");

const testCases = [
  ["./dump-examples/0.57.1-osx64.dmp", "0.57.1-sdk"],
  ["./dump-examples/0.57.1-win64.dmp", "0.57.1-sdk"],
  ["./dump-examples/0.54.1-arm64.dmp", "0.54.1-sdk"],
];

getSymbols

(async function () {
  await minidump.getSymbols({
    dumpFile: testCases[0][0],
    nwVersion: testCases[0][1],
  });
})();

decodeDmp

(async function () {
  const res = await main.decodeDmp({
    dumpFile: testCases[0][0],
    nwVersion: testCases[0][1],
    symbolsPath: 'path/to/symbols', // optional
    tagetDumpTxtPath: 'path/to/dumpTxt' // optional
  });
  console.log(res);
})();

CLI

  • dmp -f [dumpFilePath] -v [nwjsVersion] -o [outputPath] -s [symbolsPath]

    • -f required
    • -v required
    • -o optional
  • help

$ dmp -h
Usage: dmp [options] [command]

Options:
  -V, --version     output the version number
  -h, --help        display help for command

Commands:
  decode [options]  decode a nwjs dump file
  help [command]    display help for command

$ dmp decode -h
Usage: dmp decode [options]

decode a nwjs dump file

Options:
  -f, --dumpFile <path>     path of the .dmp file, eg: /path/to/demo.dmp or https://cos.xxx.com/path/to/demo.dmp
  -v, --nwVersion <semver>  nwjs version eg: 0.57.1|0.57.1-sdk. see <https://dl.nwjs.io/>
  -s, --symbolsPath <path>  path of the symbols. If this parameter is not specified, it will be downloaded by default
  -o, --output <path>       path of the output. The default value is the same as the .dmp file
  -h, --help                display help for command
  • example
$ npm i -g @licq/nwjs-minidump
$ dmp decode -f path/to/xxx.dmp -v 0.57.1 # support url: dmp decode -f https://miniapp.gtimg.cn/qqdevtools/crash_dump_files/cc25ec86-5346-4a4d-b442-74a3de9fd4ee.dmp -v 0.57.1-sdk

# output example:

Operating system: Mac OS X
                  12.3.1 21E258
CPU: amd64
     family 6 model 165 stepping 5
     16 CPUs

GPU: UNKNOWN

Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0x0
Process uptime: 1063 seconds

Thread 0 (crashed)
 0  nwjs Framework!GetRenderWidgetHost [render_frame_host_impl.cc : 10935 + 0x0]
    rax = 0x0000000119b067a8   rdx = 0x00000000000c81b0
    rcx = 0x00000000430254d1   rbx = 0x00007fe040073e00
    rsi = 0x00007fdfeeff84b8   rdi = 0x0000000000000000
    rbp = 0x00007ff7bf664f40   rsp = 0x00007ff7bf664f30
     r8 = 0x0000000000000427    r9 = 0x0000000000000029
    r10 = 0x00007fdfcff00000   r11 = 0x0000000000000000
    r12 = 0x00007fdfcf16e720   r13 = 0x00007fe040880438
    r14 = 0x0000000000000000   r15 = 0x00007ff7bf664f78
    rip = 0x0000000110d288e7
    Found by: given as instruction pointer in context
 1  nwjs Framework!GetView [render_frame_host_impl.cc : 4171 + 0x9]
    rbp = 0x00007ff7bf664f50   rsp = 0x00007ff7bf664f50
    rip = 0x0000000110d2894d
    Found by: previous frame's frame pointer

References

Note

On linux system, May report this error:

libstdc++.so.6: version `GLIBCXX_3.4.20’ not found

Solution

# find / -name "libstdc++.so.6*"

wget http://www.vuln.cn/wp-content/uploads/2019/08/libstdc.so_.6.0.26.zip
unzip libstdc.so_.6.0.26.zip
cp libstdc.so_.6.0.26 /usr/lib64
cd /usr/lib64
rm -f libstdc.so_.6
ln -f libstdc.so_.6.0.26 libstdc.so_.6

Verify

strings libstdc++.so.6.0 | grep GLIBCXX_*