Closed guidefreitas closed 7 years ago
Thanks a lot for reporting! Could you debug the problem a bit while we setup a Mac with that OS version? Launching the IDE via commandline and pasting here the output would be enough.
To launch the IDE simply execute /Applications/Arduino.app/Contents/MacOS/Arduino
in a Terminal and any error should appear there. Thanks again!
and here we go again... :-)
Hi. Thanks for the fast feedback. Here is the log.
Last login: Tue Jul 25 00:26:48 on ttys000 ➜ ~ /Applications/Arduino.app/Contents/MacOS/Arduino [JmDNS(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).Timer] WARN javax.jmdns.impl.tasks.resolver.DNSResolverTask - ServiceResolver(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).run() exception java.io.IOException: No route to host (sendto failed) at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:693) at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1595) at javax.jmdns.impl.tasks.resolver.DNSResolverTask.run(DNSResolverTask.java:74) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) [fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.JmDNSImpl - RECOVERING [JmDNS(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).State.Timer] WARN javax.jmdns.impl.tasks.state.DNSStateTask - Canceler(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).run() exception java.io.IOException: No route to host (sendto failed) at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:693) at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1595) at javax.jmdns.impl.tasks.state.DNSStateTask.run(DNSStateTask.java:131) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) [fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.DNSStatefulObject$DefaultImplementation - Wait for canceled timed out: DNS: fe80-0-0-0-aede-48ff-fe00-1122-en5.local. [fe80:0:0:0:aede:48ff:fe00:1122%en5/fe80:0:0:0:aede:48ff:fe00:1122%en5] state: canceling 1 task: null [fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.JmDNSImpl - fe80-0-0-0-aede-48ff-fe00-1122-en5.local.recover() Could not recover we are Down!
I'm on High Sierra public beta 3 and i's the same problem for me - i.e. no menu except for 'Arduino'. But no error when starting from Terminal.
This is still an issue for Public Beta 4!
Same issue with Developer Beta version 5, Aug 9 2017.
Argh, this is bad...
As a workaround for now you could install the legacy Java 6 runtime.
I have 2 MacBooks running High Sierra, one has Java 8 Update 121 and works fine with Arduino IDE, the other has Update 144 (currently latest) and has the 'no menu' problem.
I saw this on Beta 3 (17A306f), but not on Beta 4 (17A315i) or later.
Still on developer beta 9 (17A360a) with Java 8 Update 144...
Same Error on Golden Master (17A362a) with Java 121 & 144
Adding other resources: https://youtrack.jetbrains.com/issue/JRE-434#comment=27-2424694 https://bugs.eclipse.org/bugs/show_bug.cgi?id=520176
Trying to implement something similar to https://git.eclipse.org/r/#/c/105553/ and post a PR soon
Modifying Info.plist
has no effect on OSX High Sierra GM . Following the discussion on Eclipse bugtracker, it looks like SWT has just been patched to overcome a bug in the latest OSX builds (DefaultApp.nib
only present in /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/en.lproj
folder)
see https://git.eclipse.org/r/#/c/105582/
to sum up:
Info.plist
doesn't work in GMIn the meantime, let's use this thread to report any improvement.
I have just installed the brand spanking and official new High Sierra release. Menu bar is still not working. Changing the language to english works....
You could set apple.laf.useScreenMenuBar
property to true
only if the current system is not macOS 10.13 and the application menu isn't empty. Something like:
System.setProperty("apple.laf.useScreenMenuBar",
String.valueOf(!System.getProperty("os.version").startsWith("10.13")
|| com.apple.eawt.Application.getApplication().isAboutMenuItemPresent()));
This is the solution I programmed in Sweet Home 3D. At least, the menu bar appears at the top of the window the time that Apple fixes the bug (just copy the DefaultApp.nib
file of your locale from a previous macOS version and you'll see that the menu bar will go back to the screen menu bar, except if Apple decides to fix this issue another way).
Note that isAboutMenuItemPresent
was removed under Java 9, where you should rather call Desktop.isSupported(Desktop.Action.APP_ABOUT)
(you may also program that statement with reflection if needed)
@puybaret , doesn't apple.laf.useScreenMenuBar
need to be set before the GUI thread is spawned? Anyway, thanks for the tip, trying right now
It's not because you have to set this property before playing with Swing, that it cannot be set at the beginning of the program execution.
Here's the PR https://github.com/arduino/Arduino/pull/6763 I only tested it briefly on my colleague's OSX but I couldn't reproduce the issue (I should have rebooted probably, will try later). In the meantime, the build from the PR should be ready in 20 minutes, if anyone can test it it would be great.
Be sure to test on a system that doesn't use English as primary language
Sure, I changed the language to Italian but I didn't reboot, and the menus still appeared on a 10.13 final. Checking after a reboot later today. In the meantime, if you could test http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6763-BUILD-727-macosx.zip it would be supernice
I have just toggled back to german on PR-6763. Didn´t work... :-(
Build 728 still does not work on my system, language is german 😕
Hello, build 728 don't work here.french system.
Last surprise of the day, will continue tomorrow for the fix:
setting apple.laf.useScreenMenuBar= false
in the build.txt has no effect either, but launching via CLI using system java
and CLASSPATH
brings the menus back in ANY language.
So tomorrow debugging session will be on Appbundler.
Thanks everyone for testing, the [HELP WANTED] tag is still valid so if anyone can contribute with code and trials it would be supercool. Thanks again
To all those who can't wait until an update fixes the bug, I have a work around:
Now Arduino should work again as it did, at least it worked for me as I placed the "DefaultApp.nib" into the "German.lproj" and deleted there "Menu.strings".
This worked for me, that doesn't mean it has to work for all of you or that's impossible something fails due to these changes. Do this at your own risk!
Since it seems related to the language and country selection, it might help to use java switches java -Duser.language=en -Duser.country=US -Duser.variant=US -jar ... to enforce locale settings. Unfortunately I'm unable to test, since I'm not sure which jar file / class should be called from CLI. Any hint ?
Hi @GaelC92 , thanks for the tip, unfortunately enforcing the locale via java switches doesn't solve the issue, probably due to AppBundler Sample patch:
diff --git a/build/build.xml b/build/build.xml
index d95f8def6..b45dff0f7 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -411,6 +411,9 @@
<option value="-Dcom.apple.smallTabs=true"/>
<option value="-DAPP_DIR=$APP_ROOT/Contents/Java"/>
<option value="-Djava.ext.dirs=$JVM_RUNTIME/Contents/Home/lib/ext/:$JVM_RUNTIME/Contents/Home/jre/lib/ext/"/>
+ <option value="-Duser.language=en"/>
+ <option value="-Duser.country=US"/>
+ <option value="-Duser.variant=US"/>
<!--
<option value="-Dapple.awt.showGrowBox=false"/>
It may be necessary to pass LANG environnement vars as well... This is a workaround, but if somehow we manage to setup the JVM to use en_US locale, it should show the menu, according to the previous comments. So it's just a matter of how :)
@facchinm could you provide me the main class name to launch the GUI (from CLI)? (I'm struggling to find it within the code, since I'm new to it)
The main class is Processing.app.Base
; I'm trying to set LANG from Info.plist right now, will report back as soon as I have any result.
@facchinm Got it working !! Here is how I managed to get the menus from CLI 1) export _JAVA_OPTIONS=" -Duser.language=en -Duser.country=US -Duser.variant=US -Duser.region=US " (this enforces the java settings for each jvm / java tools and has priority over anything else. Alternatively one can use JAVA_TOOL_OPTIONS, but this is lower priority than any other mean to set these values) 2) call the Base class this way (from the Java directory in the package) : LANG=en java -cp "arduino-core.jar:./*" processing.app.Base
Update : It is also possible to use only inline env variables, to avoid messing with other java apps. Just start terminal and use
cd /Applications/Arduino.app/Contents/Java _JAVA_OPTIONS=" -Duser.language=en -Duser.country=US -Duser.variant=US -Duser.region=US " LANG=en java -cp "arduino-core.jar:./*" processing.app.Base
Using the launcher (MacOs/Arduino) doesn't work – I assume it does some environment variables rewriting before it calls the main class
As a temporary in-code workaround, you could maybe set the above variables at launch, conditioned on the JVM/OS version, and/or a preference setting ?
I just pushed another couple of patches on https://github.com/arduino/Arduino/pull/6763; newer appbundler allows setting environment variables via Info.plist, let's hope it's enough to workaround the issue
nope. the new build does not fix the problem.
@facchinm
Ok. Funny enough, the following command line does work, and displays the menu in french ! : _JAVA_OPTIONS=" -Duser.language=fr -Duser.country=FR -Duser.variant=FR -Duser.region=FR " LANG=fr java -cp "arduino-core.jar:./*" processing.app.Base
So it seems that at some point, the locale are removed or badly passed to the JVM, and forcing them does fix the problem.
hmm... not sure what happened but now, I can simply call java -cp "arduino-core.jar:./*" processing.app.Base" and it does work...
I've finally been able to find where the global menubar was being set forcefully; integrating it with @puybaret instructions gave the correct result (eg. the Windows-style workaround). Build from @ArduinoBot is coming
Ugly but at least usable
yeah! You did it, it works. In my case in german... Thanks!!
For what it's worth, here is what I obtain from the previous (without the latest patch) version when calling from command line. This hints that the problem probably does neither lie within JRE nor within the application code. I believe it's the appbundler but I cannot find what it does to make the menu fail. @facchinm , maybe you could spot a difference in the env vars or java settings passed to the main class at startup ? (I could not until now)
I just merged the patch on master
so it would be supercool if you could test the hourly build as soon as it's ready. If everything is ok we can release soon and provide a workaround for all mac users willing to update. Thanks everyone for the help.
hourly build works like PR-6763-BUILD-731 - this time with german menus
right! it really seem to be a java-issue
I found a simpler workaround. Force the language to English for the .app.
Open a Terminal and run:
defaults write cc.arduino.Arduino AppleLanguages '(en)'
La solution de AdrianBuza ok pour moi.
Menu don't show up in OSX High Sierra menubar.
S.O.: OSX High Sierra Beta 4