I use Apple M1 and IntelIJ keeps shut down often when I login into the computer in the morning and I need to restart the app. Also, sometimes the IntelliJ just freezes and I need to force quit to start over. This is the error log that I receive:
------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: idea [76230] Path: /Applications/IntelliJ Identifier: com.jetbrains.intellij Version: 2021.3.3 (IU-213.7172.25) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2022-03-24 11:36:30.1965 +0600 OS Version: macOS 12.2.1 (21D62) Report Version: 12 Anonymous UUID: 541B5190-6726-9EDB-BC2A-7C9CE3CA560D Sleep/Wake UUID: 202043C5-1819-45A0-B38C-FC2F621576C1 Time Awake Since Boot: 930000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY VM Region Info: 0 is not in any region. Bytes before following region: 4369022976 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 1046a0000-1046a8000 [ 32K] r-x/r-x SM=COW ...ts/MacOS/idea Application Specific Information: *** Terminating app due to uncaught exception 'NSGenericException', reason: 'java.lang.NullPointerException (LWWindowPeer.java:458) (LWWindowPeer.java:713) (CPlatformWindow.java:1243)' terminating with uncaught exception of type NSException abort() called Application Specific Backtrace 0: 0 CoreFoundation 0x000000018881c1cc __exceptionPreprocess + 240 1 libobjc.A.dylib 0x000000018856d7b8 objc_exception_throw + 60 2 CoreFoundation 0x000000018881c018 +[NSException exceptionWithName:reason:userInfo:] + 0 3 libawt_lwawt.dylib 0x000000013fb1ef0c -[AWTWindow _deliverMoveResizeEvent] + 1104 4 CoreFoundation 0x0000000188791200 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 5 CoreFoundation 0x0000000188834b84 ___CFXRegistrationPost_block_invoke + 52 6 CoreFoundation 0x0000000188834af0 _CFXRegistrationPost + 456 7 CoreFoundation 0x000000018875feb0 _CFXNotificationPost + 720 8 Foundation 0x0000000189615e3c -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 9 AppKit 0x000000018b343f40 -[NSWindow _setFrameCommon:display:fromServer:] + 3264 10 AppKit 0x000000018bb89cdc -[NSWindow(NSScreenLayout) _setFrame:fromAdjustmentToScreen:anchorIfNeeded:animate:] + 660 11 AppKit 0x000000018b67717c -[NSWindow _adjustWindowToScreen] + 1292 12 AppKit 0x000000018b69ddb8 -[NSWindow _displayChangedSoAdjustWindows:] + 116 13 AppKit 0x000000018be3329c ___NSApplicationPerformScreenInvalidationReactions_block_invoke + 92 14 AppKit 0x000000018b2eb188 -[NSApplication enumerateWindowsWithOptions:usingBlock:] + 292 15 AppKit 0x000000018be32d2c ___NSApplicationReactToScreenInvalidation_block_invoke + 640 16 AppKit 0x000000018be32828 _NSApplicationReactToScreenInvalidation + 300 17 AppKit 0x000000018be32a24 -[NSApplication(ScreenHandling) _reactToDisplayChanges:] + 408 18 AppKit 0x000000018b9d0a40 _NSCGSDisplayConfigurationUpdateAndInvokeObservers + 456 19 AppKit 0x000000018b9d0e04 _NSCGSDisplayConfigurationDidReconfigureNotificationHandler + 328 20 SkyLight 0x000000018d8a8ca4 _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 920 21 SkyLight 0x000000018db99aac _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 228 22 SkyLight 0x000000018db999a8 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 28 23 libdispatch.dylib 0x0000000188510e60 _dispatch_call_block_and_release + 32 24 libdispatch.dylib 0x0000000188512bac _dispatch_client_callout + 20 25 libdispatch.dylib 0x00000001885210ac _dispatch_main_queue_callback_4CF + 944 26 CoreFoundation 0x00000001887ddf00 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 27 CoreFoundation 0x000000018879b8c0 __CFRunLoopRun + 2540 28 CoreFoundation 0x000000018879a734 CFRunLoopRunSpecific + 600 29 HIToolbox 0x0000000191332f68 RunCurrentEventLoopInMode + 292 30 HIToolbox 0x0000000191332cdc ReceiveNextEventCommon + 552 31 HIToolbox 0x0000000191332a9c _BlockUntilNextEventMatchingListInModeWithFilter + 72 32 AppKit 0x000000018b2f1000 _DPSNextEvent + 844 33 AppKit 0x000000018b2ef8a4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332 34 libosxapp.dylib 0x0000000106e9bc10 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 144 35 AppKit 0x000000018b2e19b4 -[NSApplication run] + 596 36 libosxapp.dylib 0x0000000106e9b9c8 +[NSApplicationAWT runAWTLoopWithApp:] + 216 37 libawt_lwawt.dylib 0x000000013fb76f4c +[AWTStarter starter:headless:] + 508 38 libosxapp.dylib 0x0000000106e9d974 +[ThreadUtilities invokeBlockCopy:] + 28 39 Foundation 0x0000000189690914 __NSThreadPerformPerform + 212 40 CoreFoundation 0x000000018879cc5c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 41 CoreFoundation 0x000000018879cba8 __CFRunLoopDoSource0 + 208 42 CoreFoundation 0x000000018879c894 __CFRunLoopDoSources0 + 268 43 CoreFoundation 0x000000018879b208 __CFRunLoopRun + 820 44 CoreFoundation 0x000000018879a734 CFRunLoopRunSpecific + 600 45 idea 0x00000001046a49c4 main + 3332 46 dyld 0x00000001047f90f4 start + 520 Kernel Triage: VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x18869d9b8 __pthread_kill + 8 1 libsystem_pthread.dylib 0x1886d0eb0 pthread_kill + 288 2 libsystem_c.dylib 0x18860e314 abort + 164 3 libc++abi.dylib 0x18868db50 abort_message + 132 4 libc++abi.dylib 0x18867ef64 demangling_terminate_handler() + 332 5 libobjc.A.dylib 0x188576140 _objc_terminate() + 144 6 libc++abi.dylib 0x18868cee4 std::__terminate(void (*)()) + 20 7 libc++abi.dylib 0x18868ce80 std::terminate() + 64 8 libdispatch.dylib 0x188512bc0 _dispatch_client_callout + 40 9 libdispatch.dylib 0x1885210ac _dispatch_main_queue_callback_4CF + 944 10 CoreFoundation 0x1887ddf00 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 11 CoreFoundation 0x18879b8c0 __CFRunLoopRun + 2540 12 CoreFoundation 0x18879a734 CFRunLoopRunSpecific + 600 13 HIToolbox 0x191332f68 RunCurrentEventLoopInMode + 292 14 HIToolbox 0x191332cdc ReceiveNextEventCommon + 552 15 HIToolbox 0x191332a9c _BlockUntilNextEventMatchingListInModeWithFilter + 72 16 AppKit 0x18b2f1000 _DPSNextEvent + 844 17 AppKit 0x18b2ef8a4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332 18 libosxapp.dylib 0x106e9bc10 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 144 19 AppKit 0x18b2e19b4 -[NSApplication run] + 596 20 libosxapp.dylib 0x106e9b9c8 +[NSApplicationAWT runAWTLoopWithApp:] + 216 21 libawt_lwawt.dylib 0x13fb76f4c +[AWTStarter starter:headless:] + 508 22 libosxapp.dylib 0x106e9d974 +[ThreadUtilities invokeBlockCopy:] + 28 23 Foundation 0x189690914 __NSThreadPerformPerform + 212 24 CoreFoundation 0x18879cc5c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 25 CoreFoundation 0x18879cba8 __CFRunLoopDoSource0 + 208 26 CoreFoundation 0x18879c894 __CFRunLoopDoSources0 + 268 27 CoreFoundation 0x18879b208 __CFRunLoopRun + 820 28 CoreFoundation 0x18879a734 CFRunLoopRunSpecific + 600 29 idea 0x1046a49c4 main + 3332 30 dyld 0x1047f90f4 start + 520 Thread 1: 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107687398 os::PlatformEvent::park() + 156 3 libjvm.dylib 0x107654860 Monitor::IWait(Thread*, long) + 144 4 libjvm.dylib 0x107654df0 Monitor::wait(bool, long, bool) + 252 5 libjvm.dylib 0x107781454 Threads::destroy_vm() + 96 6 libjvm.dylib 0x107489688 jni_DestroyJavaVM + 248 7 idea 0x1046a5b60 -[Launcher launch] + 896 8 Foundation 0x1896682e8 __NSThread__start__ + 808 9 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 10 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 2:: Java: GC Thread#0 0 libsystem_kernel.dylib 0x188695990 semaphore_wait_trap + 8 1 libjvm.dylib 0x1076f8094 OSXSemaphore::wait() + 24 2 libjvm.dylib 0x1077e9f00 SemaphoreGangTaskDispatcher::worker_wait_for_task() + 24 3 libjvm.dylib 0x1077e9894 GangWorker::loop() + 36 4 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 5 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 6 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 7 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 3:: Java: G1 Main Marker 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107687398 os::PlatformEvent::park() + 156 3 libjvm.dylib 0x107654860 Monitor::IWait(Thread*, long) + 144 4 libjvm.dylib 0x107654d74 Monitor::wait(bool, long, bool) + 128 5 libjvm.dylib 0x1073897ac G1ConcurrentMarkThread::sleep_before_next_cycle() + 76 6 libjvm.dylib 0x107389284 G1ConcurrentMarkThread::run_service() + 276 7 libjvm.dylib 0x1072d1ec0 ConcurrentGCThread::run() + 56 8 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 9 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 10 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 11 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 4:: Java: G1 Conc#0 0 libsystem_kernel.dylib 0x188695990 semaphore_wait_trap + 8 1 libjvm.dylib 0x1076f8094 OSXSemaphore::wait() + 24 2 libjvm.dylib 0x1077e9f00 SemaphoreGangTaskDispatcher::worker_wait_for_task() + 24 3 libjvm.dylib 0x1077e9894 GangWorker::loop() + 36 4 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 5 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 6 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 7 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 5:: Java: G1 Refine#0 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107687398 os::PlatformEvent::park() + 156 3 libjvm.dylib 0x107654860 Monitor::IWait(Thread*, long) + 144 4 libjvm.dylib 0x107654d74 Monitor::wait(bool, long, bool) + 128 5 libjvm.dylib 0x10738aae8 G1ConcurrentRefineThread::wait_for_completed_buffers() + 100 6 libjvm.dylib 0x10738acb0 G1ConcurrentRefineThread::run_service() + 156 7 libjvm.dylib 0x1072d1ec0 ConcurrentGCThread::run() + 56 8 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 9 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 10 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 11 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 6:: Java: G1 Young RemSet Sampling 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107685eb8 os::PlatformEvent::park(long) + 228 3 libjvm.dylib 0x107654850 Monitor::IWait(Thread*, long) + 128 4 libjvm.dylib 0x107654d74 Monitor::wait(bool, long, bool) + 128 5 libjvm.dylib 0x1073bc4b8 G1YoungRemSetSamplingThread::sleep_before_next_cycle() + 64 6 libjvm.dylib 0x1073bc510 G1YoungRemSetSamplingThread::run_service() + 72 7 libjvm.dylib 0x1072d1ec0 ConcurrentGCThread::run() + 56 8 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 9 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 10 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 11 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 7:: Java: VM Thread 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107685eb8 os::PlatformEvent::park(long) + 228 3 libjvm.dylib 0x107654850 Monitor::IWait(Thread*, long) + 128 4 libjvm.dylib 0x107654d74 Monitor::wait(bool, long, bool) + 128 5 libjvm.dylib 0x1077cf240 VMThread::loop() + 316 6 libjvm.dylib 0x1077ceffc VMThread::run() + 124 7 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 8 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 9 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 10 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 Thread 8:: Java: Reference Handler 0 libsystem_kernel.dylib 0x1886990c0 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x1886d1808 _pthread_cond_wait + 1228 2 libjvm.dylib 0x107687398 os::PlatformEvent::park() + 156 3 libjvm.dylib 0x107654860 Monitor::IWait(Thread*, long) + 144 4 libjvm.dylib 0x107654e34 Monitor::wait(bool, long, bool) + 320 5 libjvm.dylib 0x1074c0e68 JVM_WaitForReferencePendingList + 248 6 ??? 0x10b313bfc ??? 7 ??? 0x11cd3bb98 ??? 8 ??? 0x10b308144 ??? 9 libjvm.dylib 0x10742bc20 JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*) + 732 10 libjvm.dylib 0x10742af84 JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 236 11 libjvm.dylib 0x10742b04c JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*) + 100 12 libjvm.dylib 0x1074bead8 thread_entry(JavaThread*, Thread*) + 120 13 libjvm.dylib 0x10777cd3c JavaThread::thread_main_inner() + 128 14 libjvm.dylib 0x10777cb68 JavaThread::run() + 296 15 libjvm.dylib 0x10777a8d0 Thread::call_run() + 120 16 libjvm.dylib 0x10767df34 thread_native_entry(Thread*) + 316 17 libsystem_pthread.dylib 0x1886d1240 _pthread_start + 148 18 libsystem_pthread.dylib 0x1886cc024 thread_start + 8 With the error provided, can anyone point out the issue and how can I get rid of it?
PS: The error stack is too large, so I only provide the early lines of it.
11 Answer
That crash log indicates that Java chose to abort because it caught its code for moving or resizing windows trying to make use of a pointer variable that had not been set to point at whatever address it should have been pointing at. There was no way for the Java engine to know where that pointer was meant to point, so it chose to crash rather than risk screwing up worse.
It's hard for us to guess why the window-resizing code was trying to use a null pointer. It could be a bug in the window-drawing code, or it could be a bug in how IntelliJ called that code, or it could be something else.
Make sure you have the latest Java for M1 Macs, and the latest IntelliJ.
If this is not a widespread problem among people running IntelliJ on M1 Macs, then I guess you could try to see if it's something specific to your setup. For example, maybe you sometimes use IntelliJ with an external display connected, and leave some windows on that external display, and IntelliJ remembers those window locations, and then later you ran it without the external display connected, and when it tried to redraw those windows in their previous locations, it was unable to because that would be offscreen without the external display attached, so it somehow choked when trying to find a new place to put those windows that would be on-screen. Or, now that you know it has something to do with window moving or resizing, maybe you can figure out what you were doing that triggered it, and try to avoid doing that again. Like maybe it has buggy code when you try to maximize or un-maximize a window, so maybe you can find a way to live without doing that particular kind of window move/resize behavior.
I'm just grasping at straws at this point. This seems like a bug that someone at JetBrains will need to debug.
1