Teensyduino crashes constantly on Catalina.

JasonH

Member
1.8.12, If i resize the window or scroll using a mouse wheel, it crashes.
I updated my Mac to the latest version of Catalina yesterday.


Process: Arduino [21482]
Path: /Applications/Teensyduino.app/Contents/MacOS/Arduino
Identifier: cc.arduino.Arduino.teensyduino
Version: 1.8.12 (1.8.12)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Arduino [21482]
User ID: 501

Date/Time: 2020-05-15 17:12:54.477 -0400
OS Version: Mac OS X 10.15.4 (19E287)
Report Version: 12
Bridge OS Version: 4.4 (17P4281)
Anonymous UUID: 334B0A41-53C6-7D51-BD65-64A23C95424F

Sleep/Wake UUID: D7B38228-AE73-44FC-843F-2A80514BD6B6

Time Awake Since Boot: 33000 seconds
Time Since Wake: 29000 seconds

System Integrity Protection: enabled

Crashed Thread: 26 Java: Java2D Queue Flusher

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

Application Specific Information:
-[NSOpenGLContext setView:] must be called from the main thread.


Thread 26 Crashed:: Java: Java2D Queue Flusher
0 libsystem_kernel.dylib 0x00007fff6a71533a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6a7d1e60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff6a69c808 abort + 120
3 libjvm.dylib 0x00000001030b38ca os::abort(bool) (.cold.1) + 125
4 libjvm.dylib 0x0000000102ed055b os::abort(bool) + 33
5 libjvm.dylib 0x00000001030698a6 VMError::report_and_die() + 2298
6 libjvm.dylib 0x0000000102ac52d3 report_vm_error(char const*, int, char const*, char const*) + 93
7 libjvm.dylib 0x0000000102ed5fa8 os::get_sender_for_C_frame(frame*) + 76
8 libjvm.dylib 0x0000000102ac6524 print_native_stack(outputStream*, frame, Thread*, char*, int) + 336
9 libjvm.dylib 0x0000000103068703 VMError::report(outputStream*) + 2617
10 libjvm.dylib 0x0000000103069387 VMError::report_and_die() + 987
11 libjvm.dylib 0x0000000102ed63b7 JVM_handle_bsd_signal + 802
12 libjvm.dylib 0x0000000102ed2f0f signalHandler(int, __siginfo*, void*) + 88
13 libsystem_platform.dylib 0x00007fff6a7c65fd _sigtramp + 29
14 libobjc.A.dylib 0x00007fff6941a954 lookUpImpOrForward + 63
15 libawt_lwawt.dylib 0x0000000106e6a239 CGLSD_MakeCurrentToScratch + 93
16 libawt_lwawt.dylib 0x0000000106e6a390 OGLSD_MakeOGLContextCurrent + 166
17 libawt_lwawt.dylib 0x0000000106e87e32 OGLContext_SetSurfaces + 188
18 libawt_lwawt.dylib 0x0000000106e8c69f Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer + 1775
19 ??? 0x0000000109d7ffad 0 + 4460117933
20 ??? 0x0000000109d582bd 0 + 4459954877
21 ??? 0x0000000109d582bd 0 + 4459954877
22 ??? 0x0000000109d582bd 0 + 4459954877
23 ??? 0x0000000109d50671 0 + 4459923057
24 libjvm.dylib 0x0000000102c5f127 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 2243
25 libjvm.dylib 0x0000000102c5d966 JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 626
26 libjvm.dylib 0x0000000102c5dbb3 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*) + 111
27 libjvm.dylib 0x0000000102cf7739 thread_entry(JavaThread*, Thread*) + 177
28 libjvm.dylib 0x000000010300e963 JavaThread::thread_main_inner() + 373
29 libjvm.dylib 0x000000010300e6ff JavaThread::run() + 847
30 libjvm.dylib 0x0000000102ecfee7 java_start(Thread*) + 250
31 libsystem_pthread.dylib 0x00007fff6a7d2109 _pthread_start + 148
32 libsystem_pthread.dylib 0x00007fff6a7cdb8b thread_start + 15
 
I've been using MacOS Catalina 10.15.5 Beta and haven't had Arduino crash at all, so presumedly it's a bug in MacOS that could be fixed in the next public release. I can't remember if I had any problems when I was using 10.15.4, but I don't believe I've ever had Arduino crash on me yet.
 
OpenJDK turned out to be buggy. But Oracle's Java 8 JRE wouldn't pass Apple's notarization process, which Catalina requires. :(

Many of the problems seem to be triggered by multiple monitor setup.
 
First, please understand I can't reproduce this problem here on my Macbook Air running Catalina 10.15.4. I ran it this morning, and I tried again just now. I can resize the window. I can scroll, using 2 fingers on the trackpad and also 1 finger slide on my wireless magic mouse. I'm not trying to deny these bugs happen... I just need you to understand I can't make it happen here. So if I try anything different, I can tell if it fixes the problem without packaging up a copy of the software for your feedback.

With that in mind, I see OpenJDK version 8u252-b09.1 is now available. Looks like Arduino 1.8.12 is using 8u242. I could try creating a copy of Teensyduino 1.52 with that slightly newer Java JRE. But again, I have no way to tell if it's any different since the problem doesn't happen on the one Mac I have with Catalina. I'm depending on you for testing.
 
Ok, I've built a copy of Teensyduino 1.52 using OpenJDK 8u252-b09.1. Notarized with Apple & stapled it too. Here's the link to download.

https://www.pjrc.com/teensy/td_152/Teensyduino_MacOS_Catalina_Java8u252.zip

Does this work any better on your Mac? I tried it here on my Macbook Air with Catalina 10.15.4 and it runs, I can resize and scroll... but then I could do those things before. Mac problems, so elusive & frustrating!

Please let me know if this make any difference for you?
 
I downloaded Teensyduino from the link above and ran some tests on Catalina 10.15.4. Multiple monitors, mouse scroll wheel vs trackpad, scrolling, resizing, all behaved normally with no crashes.
 
So the last time I did this type of work was not on Catalina. This seems to me to be Catalina related. Previously I used it successfully on HighSierra.

And yes, I am running dual external monitors.

EDIT: I spoke too soon, it still crashes.
 
Last edited:
I can confirm it does indeed crash on an external monitor, works fine on the main monitor, but crashes when moved to the external monitor on MacOS Catalina 10.15.5 Beta 3 still.
 
Arduino 1.8.11 crashes on the external monitor as well when scrolling or resizing, 1.8.10 doesn't crash when scrolling or resizing, but does crash on both monitors when clicking the scroll bar.

Edit: The scroll bar problem seems to exist on 1.8.10-1.8.12 on MacOS 10.15.5 Beta only.
 
Last edited:
Also of note, if Arduino is assigned to the second display and opened then it won't crash on the second display, but it will then crash on the main display when dragged to it.
Screen Shot 2020-05-18 at 11.40.17 AM.png
 
Running Catalina 10.15.4 and Arduino 1.8.12 works fine for me. Teensyduino used to crash intermittently on my 2 monitor system, then was fine for awhile. Now, it just started to exit (always) immediately after starting, even with no external monitor. It doesn't throw a crash log, but enters in syslog that it exited with abnormal code 255. Does that shed anything new on the issue?

Syslog Line: May 26 14:12:20 Macbook com.apple.xpc.launchd[1] (cc.arduino.Arduino.teensyduino.6684[925]): Service exited with abnormal code: 255
 
Now my Arduino 1.8.12 is crashing just like Teensyduino. They're logging the same bug reports with Catalina as discussed here and saying the only fix is to revert to 1.8.10 or lower (when they used the old JDK). That does stop the crashing on my machine. But the Teensyduino installer being a complete package makes it impossible to revert to the older Arduino. Do you have an older Teensyduino package available?
 
Teensyduino 1.53-beta1 is now available, using Arduino 1.8.13 for the MacOS Catalina version.

https://forum.pjrc.com/threads/61388-Teensyduino-1-53-Beta-1

Arduino 1.8.13 includes a change "Fixed crash on MacOSX >=10.15 with multiple monitor setups". As I understand it, they rebuilt the "appbundler" code which launches the IDE using Apple's 10.9 SDK. Apparently the crashes only happen when compiled with later SDK versions.

Please give 1.53-beta1 a try and let me know if it solves the crashing problems on your Mac. My 1 and only Mac with Catalina is a Macbook Air without a 2nd monitor, so I have no way to reproduce these crashes.
 
Back
Top