Whenever I try to format a sketch in the IDE (1.8.19) I get this output in the terminal:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'java.lang.String cc.arduino.packages.formatter.AStyleInterface.AStyleMain(java.lang.String, java.lang.String)'
at cc.arduino.packages.formatter.AStyleInterface.AStyleMain(Native Method)
at cc.arduino.packages.formatter.AStyle.run(AStyle.java:80)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
...And formatting fails.
I can use astyle from the command line (linux mint) and it works well.
Guessing that some basic package was missing, or corrupted, I reinstalled Arduino, but the issue remained.
I don't precisely recall any specific changes made to my system prior to encountering this behavior, as it's been like this for at least 8 or 9 months now. I hadn't used Arduino for some time up until that point and it may have been a fresh instal.
Since I just started a new project for a buddy of mine and encountered the bug again I decided maybe it was time to see about a better solution.
Any help troubleshooting this would be greatly appreciated.
-
1github.com/arduino/Arduino/issues/11728 might be similar (from package manager it didn't work, downloaded from arduino.cc worked)KIIV– KIIV2023年05月03日 18:54:12 +00:00Commented May 3, 2023 at 18:54
-
Thanks. Yes, the version from arduino.cc/en/software does work.InkyDigits– InkyDigits2023年05月03日 19:40:01 +00:00Commented May 3, 2023 at 19:40
1 Answer 1
I googled the first line of stack trace and found similar issue on github (but for SUSE linux). In this issue the Arduino IDE was installed by system package manager and after downloading latest package from arduino.cc/en/software it started working.
In general Arduino IDE linux packages are somehow problematic (as far as I know Ubuntu has still version around 1.0.6) and it's better to use latest version directly from arduino.cc
-
I'm not sure that it's a version issue, maybe something in the dependencies... I installed from the Ubuntu Jammy package, and got Arduino 1.8.19, which yielded the error in the original post, on multiple installations. Then I installed that same version from the Arduino site and it worked fine.InkyDigits– InkyDigits2023年05月04日 01:46:59 +00:00Commented May 4, 2023 at 1:46