s5bug / discord-intellij

A plugin for interaction between JetBrains IDEs and Discord RPC
http://plugins.jetbrains.com/plugin/10217-intellij-discord-integration
24 stars 4 forks source link

Causes "quit unexpectedly" on Mac when exiting WebStorm without Discord #2

Closed e3-cerruti closed 6 years ago

e3-cerruti commented 6 years ago

Installed on WebStorm 2017.2 on Mac OS X 10.12.6 without Discord installed. When enabled WebStorm always exits with "Quit Unexpectedly". If disabled WebStorm exits normally after restart.

scerruti commented 6 years ago

idea.log

I've attached the log. I don't see anything obvious. More data below.

Process:               webstorm [19497]
Path:                  /Applications/WebStorm.app/Contents/MacOS/webstorm
Identifier:            com.jetbrains.WebStorm
Version:               2017.2.5 (WS-172.4343.25)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           webstorm [19497]
User ID:               502

Date/Time:             2017-11-27 19:29:59.991 -0800
OS Version:            Mac OS X 10.12.6 (16G1036)
Report Version:        12
Anonymous UUID:        17793431-E206-3C42-52B4-22AC86DA3C3A

Sleep/Wake UUID:       66B08C47-73E7-45B5-BEF0-5B2F8B3A394A

Time Awake Since Boot: 210000 seconds
Time Since Wake:       860 seconds

System Integrity Protection: enabled

Crashed Thread:        7

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

Application Specific Information:
terminating
abort() called
Thread 7 Crashed:
0   libsystem_kernel.dylib          0x00007fffa8466d42 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fffa8554457 pthread_kill + 90
2   libsystem_c.dylib               0x00007fffa83cc420 abort + 129
3   libc++abi.dylib                 0x00007fffa6f1f94a abort_message + 266
4   libc++abi.dylib                 0x00007fffa6f44b52 default_terminate_handler() + 46
5   libc++abi.dylib                 0x00007fffa6f41d49 std::__terminate(void (*)()) + 8
6   libc++abi.dylib                 0x00007fffa6f41dd0 std::terminate() + 64
7   libsystem_c.dylib               0x00007fffa83cd178 __cxa_finalize_ranges + 332
8   libsystem_c.dylib               0x00007fffa83cd4b2 exit + 55
9   libjvm.dylib                    0x000000010d0d5536 vm_direct_exit(int) + 28
10  libjvm.dylib                    0x000000010d37e45d VM_Operation::evaluate() + 79
11  libjvm.dylib                    0x000000010d37cdab VMThread::evaluate_operation(VM_Operation*) + 223
12  libjvm.dylib                    0x000000010d37d1f8 VMThread::loop() + 808
13  libjvm.dylib                    0x000000010d37cb17 VMThread::run() + 121
14  libjvm.dylib                    0x000000010d254072 java_start(Thread*) + 246
15  libsystem_pthread.dylib         0x00007fffa855193b _pthread_body + 180
16  libsystem_pthread.dylib         0x00007fffa8551887 _pthread_start + 286
17  libsystem_pthread.dylib         0x00007fffa855108d thread_start + 13
scerruti commented 6 years ago
Thread 33:
0   libsystem_kernel.dylib          0x00007fffa8466bf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fffa85527fa _pthread_cond_wait + 712
2   libc++.1.dylib                  0x00007fffa6ecf572 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 126
3   jna1775750682942348622.tmp      0x0000000113f2c9ae std::__1::cv_status std::__1::condition_variable::wait_for<long long, std::__1::ratio<1l, 1000l> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > const&) + 3742
4   jna1775750682942348622.tmp      0x0000000113f294db DiscordRpcIo() + 219
5   jna1775750682942348622.tmp      0x0000000113f2f4e6 void* std::__1::__thread_proxy<std::__1::tuple<void (*)()> >(void*) + 390
6   libsystem_pthread.dylib         0x00007fffa855193b _pthread_body + 180
7   libsystem_pthread.dylib         0x00007fffa8551887 _pthread_start + 286
8   libsystem_pthread.dylib         0x00007fffa855108d thread_start + 13
crmarsh commented 6 years ago

This looks like a crash from exiting the process without calling Discord_Shutdown

s5bug commented 6 years ago

@crmarsh It happens on startup when Discord is not installed. I will see about fixing the Discord_Shutdown issue though?

s5bug commented 6 years ago

The reason I believe this is because on my computer, the app works fine without calling Discord_Shutdown.

s5bug commented 6 years ago

(As well, what happens when Discord_Shutdown is called when Discord_Initialize is never called?)

s5bug commented 6 years ago

Ah. It was my misunderstanding that it was on startup.

crmarsh commented 6 years ago

std::thread in C++ has an assert in its destructor that you have joined the thread already. That abort_message really should have printed a message or something? Anyways, I wrapped my instance of std::thread in a thing that joins in it's destructor, so this shouldn't come up.