evancohen / sonus

:speech_balloon: /so.nus/ STT (speech to text) for Node with offline hotword detection
MIT License
618 stars 79 forks source link

Crashes when built inside electron app #89

Closed danielKugler closed 5 years ago

danielKugler commented 5 years ago

I am building an electron app. electron@2.0.8 sonus@0.1.9

When i run it in dev mode everything works fine. If i build it for mac and start the app it crashes and i receive an error report as following:

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
terminating with uncaught exception of type std::runtime_error
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff536bab66 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff53885080 pthread_kill + 333
2   libsystem_c.dylib               0x00007fff536161ae abort + 127
3   libc++abi.dylib                 0x00007fff51510f8f abort_message + 245
4   libc++abi.dylib                 0x00007fff5151112b default_terminate_handler() + 265
5   libobjc.A.dylib                 0x00007fff52952eab _objc_terminate() + 105
6   libc++abi.dylib                 0x00007fff5152c7c9 std::__terminate(void (*)()) + 8
7   libc++abi.dylib                 0x00007fff5152c843 std::terminate() + 51
8   snowboy.node                    0x0000000112481664 snowboy::Input::Input(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 612
9   snowboy.node                    0x00000001124782c1 snowboy::UnpackPipelineResource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 65
10  snowboy.node                    0x000000011247cc34 snowboy::PipelineItf::SetResource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 372
11  snowboy.node                    0x0000000112492126 snowboy::SnowboyDetect::SnowboyDetect(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 118
12  snowboy.node                    0x000000011243624d SnowboyDetect::SnowboyDetect(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 77 (snowboy.cc:37)
13  snowboy.node                    0x0000000112436a9f SnowboyDetect::New(Nan::FunctionCallbackInfo<v8::Value> const&) + 873 (string:1221)
14  snowboy.node                    0x0000000112437ea4 Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) + 136 (nan_callbacks_12_inl.h:175)
15  libnode.dylib                   0x000000010e77b8c1 0x10e304000 + 4683969
16  libnode.dylib                   0x000000010e8317c6 0x10e304000 + 5429190
17  libnode.dylib                   0x000000010e8311ba 0x10e304000 + 5427642
18  ???                             0x000012f32078463d 0 + 20835431106109
19  ???                             0x000012f32083c1bd 0 + 20835431858621
20  ???                             0x000012f320875d87 0 + 20835432095111
21  ???                             0x000012f32083f9ce 0 + 20835431872974
22  ???                             0x000012f320785743 0 + 20835431110467
23  ???                             0x000012f320875d87 0 + 20835432095111
24  ???                             0x000012f32083f9ce 0 + 20835431872974
25  ???                             0x000012f32087474a 0 + 20835432089418
26  ???                             0x000012f32083f9ce 0 + 20835431872974
27  ???                             0x000012f3208744c9 0 + 20835432088777
28  ???                             0x000012f32083f9ce 0 + 20835431872974
29  ???                             0x000012f320785743 0 + 20835431110467
30  ???                             0x000012f320875d87 0 + 20835432095111
31  ???                             0x000012f32083f9ce 0 + 20835431872974
32  ???                             0x000012f320874048 0 + 20835432087624
33  ???                             0x000012f32083f9ce 0 + 20835431872974
34  ???                             0x000012f320874048 0 + 20835432087624
35  ???                             0x000012f32083f9ce 0 + 20835431872974
36  ???                             0x000012f32087474a 0 + 20835432089418
37  ???                             0x000012f32083f9ce 0 + 20835431872974
38  ???                             0x000012f32087474a 0 + 20835432089418
39  ???                             0x000012f32083f9ce 0 + 20835431872974
40  ???                             0x000012f3208745fc 0 + 20835432089084
41  ???                             0x000012f32083f9ce 0 + 20835431872974
42  ???                             0x000012f320875002 0 + 20835432091650
43  ???                             0x000012f32083f9ce 0 + 20835431872974
44  ???                             0x000012f320891dc8 0 + 20835432209864
45  ???                             0x000012f32083f9ce 0 + 20835431872974
46  ???                             0x000012f320874048 0 + 20835432087624
47  ???                             0x000012f32083f9ce 0 + 20835431872974
48  ???                             0x000012f320874048 0 + 20835432087624
49  ???                             0x000012f32083f9ce 0 + 20835431872974
50  ???                             0x000012f32087474a 0 + 20835432089418
51  ???                             0x000012f32083f9ce 0 + 20835431872974
52  ???                             0x000012f32087474a 0 + 20835432089418
53  ???                             0x000012f32083f9ce 0 + 20835431872974
54  ???                             0x000012f3208745fc 0 + 20835432089084
55  ???                             0x000012f32083f9ce 0 + 20835431872974
56  ???                             0x000012f320875002 0 + 20835432091650
57  ???                             0x000012f32083f9ce 0 + 20835431872974
58  ???                             0x000012f320874048 0 + 20835432087624
59  ???                             0x000012f32083f9ce 0 + 20835431872974
60  ???                             0x000012f320892229 0 + 20835432210985
61  ???                             0x000012f32083f9ce 0 + 20835431872974
62  ???                             0x000012f320874da1 0 + 20835432091041
63  ???                             0x000012f32083f9ce 0 + 20835431872974
64  ???                             0x000012f32083e479 0 + 20835431867513
65  ???                             0x000012f32078410d 0 + 20835431104781
66  libnode.dylib                   0x000000010e9e3d77 0x10e304000 + 7208311
67  libnode.dylib                   0x000000010e9e3aac v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 140
68  libnode.dylib                   0x000000010e79ee5c v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 492
69  libnode.dylib                   0x000000010e3ee612 node::LoadEnvironment(node::Environment*) + 386
70  com.github.electron.framework   0x0000000109aa30d2 atom::NodeBindings::LoadEnvironment(node::Environment*) + 18
71  com.github.electron.framework   0x0000000109a0c91d atom::AtomBrowserMainParts::PostEarlyInitialization() + 525
72  com.github.electron.framework   0x0000000109e77479 0x109967000 + 5309561
73  com.github.electron.framework   0x0000000109e7d092 0x109967000 + 5333138
74  com.github.electron.framework   0x0000000109e76c44 0x109967000 + 5307460
75  com.github.electron.framework   0x0000000109dc0050 0x109967000 + 4558928
76  com.github.electron.framework   0x000000010b9d10f4 0x109967000 + 33988852
77  com.github.electron.framework   0x0000000109dbee64 0x109967000 + 4554340
78  com.github.electron.framework   0x0000000109968f84 AtomMain + 68
79  de.monrow.app                   0x0000000109964f26 main + 38
80  libdyld.dylib                   0x00007fff5356a015 start + 1

seems like the snowboy component fails. Can anyone help?

evancohen commented 5 years ago

This looks like #86. Unfortunately I wasn't able to get my hands on a mac before leaving for Asia so there's not much I can do to try and repro. On the bright side this does help @vishal-android-freak because now we know it's not just an issue with his app.

I'm going to close this issue so we can consolidate the conversation over on #86.