我刚刚使用Ember版本9将版本11和CLI从0.1.15移动到0.2.2的Ember-CLI项目。虽然我现在有一个应用程序开始提供文件,然后立即与Segmentation fault: 11
崩溃,所以在这里和那里做了所有必要的调整。据我所知,任何地方都没有日志,我对如何调试实际导致故障的方法感到茫然。
非常感谢任何帮助。
答案 0 :(得分:0)
了解segfault
的一个好方法是在github上安装ddobson的调试工具:https://github.com/ddopson/node-segfault-handler。
您可以使用 npm 安装:
npm install segfault-handler
然后只需将以下两行添加到server/index.js
文件中:
var segfaultHandler = require('segfault-handler');
segfaultHandler.registerHandler();
这将为您的node_modules生成堆栈跟踪,这些跟踪正在浸入本机代码中(这可能是您获取 segfault 的原因)。
就我的情况而言,问题显然源于SASS编译:
PID 30497 received SIGSEGV for address: 0x71
0 segfault-handler.node 0x00000001040f890f _ZL16segfault_handleriP9__siginfoPv + 287
1 libsystem_platform.dylib 0x00007fff90fd7f1a _sigtramp + 26
2 ??? 0x000000010141c6a0 0x0 + 4316055200
3 binding.node 0x00000001078a6fb3 _ZN4Sass6Parser16parse_expressionEv + 25
4 binding.node 0x00000001078a6e11 _ZN4Sass6Parser14parse_relationEv + 25
5 binding.node 0x00000001078a6bd1 _ZN4Sass6Parser17parse_conjunctionEv + 23
6 binding.node 0x00000001078a6aef _ZN4Sass6Parser17parse_disjunctionEv + 23
7 binding.node 0x00000001078a27b1 _ZN4Sass6Parser16parse_space_listEv + 23
8 binding.node 0x00000001078a2ccd _ZN4Sass6Parser14parse_argumentEv + 349
9 binding.node 0x00000001078a2a8a _ZN4Sass6Parser15parse_argumentsEv + 182
10 binding.node 0x00000001078a8a30 _ZN4Sass6Parser19parse_function_callEv + 186
11 binding.node 0x00000001078a7747 _ZN4Sass6Parser12parse_factorEv + 623
12 binding.node 0x00000001078a714d _ZN4Sass6Parser10parse_termEv + 25
13 binding.node 0x00000001078a6fb3 _ZN4Sass6Parser16parse_expressionEv + 25
14 binding.node 0x00000001078a6e11 _ZN4Sass6Parser14parse_relationEv + 25
15 binding.node 0x00000001078a6bd1 _ZN4Sass6Parser17parse_conjunctionEv + 23
16 binding.node 0x00000001078a6aef _ZN4Sass6Parser17parse_disjunctionEv + 23
17 binding.node 0x00000001078a27b1 _ZN4Sass6Parser16parse_space_listEv + 23
18 binding.node 0x00000001078a2ccd _ZN4Sass6Parser14parse_argumentEv + 349
19 binding.node 0x00000001078a2a8a _ZN4Sass6Parser15parse_argumentsEv + 182
20 binding.node 0x000000010789de19 _ZN4Sass6Parser16parse_mixin_callEv + 211
21 binding.node 0x00000001078a1949 _ZN4Sass6Parser11parse_blockEv + 1103
22 binding.node 0x000000010789f864 _ZN4Sass6Parser13parse_rulesetE18Selector_Lookahead + 174
23 binding.node 0x00000001078a1cfb _ZN4Sass6Parser11parse_blockEv + 2049
24 binding.node 0x000000010789f864 _ZN4Sass6Parser13parse_rulesetE18Selector_Lookahead + 174
25 binding.node 0x00000001078a1cfb _ZN4Sass6Parser11parse_blockEv + 2049
26 binding.node 0x000000010789f864 _ZN4Sass6Parser13parse_rulesetE18Selector_Lookahead + 174
27 binding.node 0x000000010789b98b _ZN4Sass6Parser5parseEv + 1651
28 binding.node 0x00000001078402c1 _ZN4Sass7Context10parse_fileEv + 375
29 binding.node 0x00000001078c1a69 _Z16sass_parse_blockP12Sass_ContextPN4Sass7ContextE + 162
30 binding.node 0x00000001078c144c _Z20sass_compile_contextP12Sass_ContextN4Sass7Context4DataE + 343
31 binding.node 0x00000001078c1715 sass_compile_file_context + 487
Abort trap: 6