[ESS-bugs] Emacs crashing under poly-R after clicking on menu bar
Braun, Michael
br@unm @end|ng |rom m@||@@mu@edu
Wed Sep 11 00:01:28 CEST 2019
After upgrading to polymode 2.0, I am finding that Emacs crashes after loading poly-R, opening an ess R session, and clicking on the menubar. I am running MacOS 10.14.6 Mojave, R 3.6.1, and ess 18.10.3 (from MELPA). These crashes occur with both GNU Emacs 26.3, and Aquamacs 3.5 (based on Emacs 25.3).
Here is the simplest sequence of steps that replicates the crash with Emacs 26.3:
In Terminal (to open a clean emacs with no configurations):
cd /Applications/Emacs.app/Contents/MacOS
./Emacs -Q
In Emacs:
M-: (require 'package)
M-x package-initialize
M-: (require 'poly-R)
M-x R
<click on menu bar>
Crash!
I have narrowed the problem to lines 218-225 in poly-R.el. If I comment these lines out,
(easy-menu-define poly-markdown+R-menu (list ess-mode-map
inferior-ess-mode-map
poly-markdown+r-mode-map)
"Menu for poly-r+markdown-mode"
'("RMarkdown"
("Templates"
:active (ess-get-next-available-process "R" t)
:filter poly-r-rmarkdown-templates-menu)))
byte-compile the edited file, and reload, the problem goes away. Editing poly-R.el is a fine workaround for me at the moment, but it’s a crash nonetheless. The maintainer of poly-R referred me to the GNU Emacs bug reporting list, but since the crashes seem to be R-related, I thought I’d go here next.
Here’s some more information that might be relevant. After emacs crashes, the following appears in the Terminal window:
braunm: /Applications/Emacs.app/Contents/MacOS $ ./Emacs -Q
2019-09-10 16:10:44.624 Emacs-x86_64-10_14[8824:196256] Failed to initialize color list unarchiver: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver}
objc[8824]: Invalid or prematurely-freed autorelease pool 0x1010081d0.
Fatal error 6: Abort trapAbort trap: 6
And I’ve pasted the complete stack trace below this email.
Thanks,
Michael
--------------------------
Michael Braun, Ph.D.
Associate Professor of Marketing, and
Corrigan Research Professor
Cox School of Business
Southern Methodist University
Dallas, TX 75275
braunm using smu.edu
Process: Emacs-x86_64-10_14 [9055]
Path: /Applications/Emacs.app/Contents/MacOS/./Emacs-x86_64-10_14
Identifier: org.gnu.Emacs
Version: Version 26.3 (9.0)
Code Type: X86-64 (Native)
Parent Process: bash [8420]
Responsible: Emacs-x86_64-10_14 [9055]
User ID: 501
Date/Time: 2019-09-10 16:35:32.923 -0500
OS Version: Mac OS X 10.14.6 (18G95)
Report Version: 12
Bridge OS Version: 3.6 (16P6571)
Anonymous UUID: 860C53EE-36BE-943F-6133-DBA1B5CBD87E
Time Awake Since Boot: 10000 seconds
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
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6919b2c6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff69256bf1 pthread_kill + 284
2 libsystem_c.dylib 0x00007fff690b8d8a raise + 26
3 Emacs-x86_64-10_14 0x00000001000bb789 terminate_due_to_signal + 153
4 Emacs-x86_64-10_14 0x00000001000d8e03 emacs_abort + 19
5 Emacs-x86_64-10_14 0x00000001001c102a ns_term_shutdown + 122
6 Emacs-x86_64-10_14 0x00000001000bb976 shut_down_emacs + 262
7 Emacs-x86_64-10_14 0x00000001000bb756 terminate_due_to_signal + 102
8 Emacs-x86_64-10_14 0x00000001000dba0e handle_fatal_signal + 14
9 Emacs-x86_64-10_14 0x00000001000dba91 deliver_thread_signal + 129
10 Emacs-x86_64-10_14 0x00000001000da629 deliver_fatal_thread_signal + 9
11 libsystem_platform.dylib 0x00007fff6924bb5d _sigtramp + 29
12 com.apple.CoreFoundation 0x00007fff3d0db92c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1762
13 libsystem_kernel.dylib 0x00007fff691ae589 abort_with_reason + 22
14 libobjc.A.dylib 0x00007fff678948dd _objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 108
15 libobjc.A.dylib 0x00007fff6789478f _objc_fatal(char const*, ...) + 135
16 libobjc.A.dylib 0x00007fff67887563 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 941
17 com.apple.CoreFoundation 0x00007fff3d0da5ea _CFAutoreleasePoolPop + 22
18 com.apple.Foundation 0x00007fff3f3530e3 -[NSAutoreleasePool release] + 144
19 Emacs-x86_64-10_14 0x00000001001db235 ns_update_menubar + 2341
20 Emacs-x86_64-10_14 0x00000001001db27e x_activate_menubar + 14
21 Emacs-x86_64-10_14 0x00000001000c53c2 read_char + 9634
22 Emacs-x86_64-10_14 0x00000001000c106a read_key_sequence + 1722
23 Emacs-x86_64-10_14 0x00000001000bf872 command_loop_1 + 1234
24 Emacs-x86_64-10_14 0x000000010013f16c internal_condition_case + 268
25 Emacs-x86_64-10_14 0x00000001000cef60 command_loop_2 + 48
26 Emacs-x86_64-10_14 0x000000010013e760 internal_catch + 272
27 Emacs-x86_64-10_14 0x00000001000be81e command_loop + 158
28 Emacs-x86_64-10_14 0x00000001000be72f recursive_edit_1 + 111
29 Emacs-x86_64-10_14 0x00000001000bea16 Frecursive_edit + 406
30 Emacs-x86_64-10_14 0x00000001000bd32d main + 6477
31 libdyld.dylib 0x00007fff690603d5 start + 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 2:
0 libsystem_kernel.dylib 0x00007fff6919c61a __select + 10
1 Emacs-x86_64-10_14 0x00000001001c26d8 -[EmacsApp fd_handler:] + 264
2 com.apple.Foundation 0x00007fff3f361112 __NSThread__start__ + 1194
3 libsystem_pthread.dylib 0x00007fff692542eb _pthread_body + 126
4 libsystem_pthread.dylib 0x00007fff69257249 _pthread_start + 66
5 libsystem_pthread.dylib 0x00007fff6925340d thread_start + 13
Thread 3:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 5:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff6919522a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6919576c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff3d1081ee __CFRunLoopServiceMachPort + 328
3 com.apple.CoreFoundation 0x00007fff3d10775c __CFRunLoopRun + 1612
4 com.apple.CoreFoundation 0x00007fff3d106ebe CFRunLoopRunSpecific + 455
5 com.apple.AppKit 0x00007fff3a7064c2 _NSEventThread + 175
6 libsystem_pthread.dylib 0x00007fff692542eb _pthread_body + 126
7 libsystem_pthread.dylib 0x00007fff69257249 _pthread_start + 66
8 libsystem_pthread.dylib 0x00007fff6925340d thread_start + 13
Thread 6:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 9:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 10:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 11:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 12:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 13:
0 libsystem_pthread.dylib 0x00007fff692533f0 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000000010ffbd5c0 rcx: 0x00007ffeefbfdcf8 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffeefbfdd30 rsp: 0x00007ffeefbfdcf8
r8: 0x0000000000000012 r9: 0x0000000000000a31 r10: 0x0000000000000000 r11: 0x0000000000000287
r12: 0x0000000000000307 r13: 0x000000000000000f r14: 0x0000000000000006 r15: 0x000000000000002d
rip: 0x00007fff6919b2c6 rfl: 0x0000000000000286 cr2: 0x0000000100d025b0
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
More information about the ESS-bugs
mailing list