Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, October 11, 2015

Android Studio and keyboard freezing problem

Looks like Android Studio has problems with keyboard in linux OS.

iBus daemon is the main suspect. I've tried many tricks and hacks but the problem remains, keyboard freezes after a short period of time!

The only solution for me is to download and use Java JDK 8! 

Saturday, May 4, 2013

Arduino IDE OPEN/SAVE problem in Ubuntu


Finally, Arduino UNO has arrived. I've downloaded IDE tool and tested some examples. But a serious problem appeared that gave me a headache! Open and Save feature stops with a Java NullPointer Exception!!!


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: NullPointerException
at sun.awt.motif.MFileDialogPeer.setFont(Native Method)
at sun.awt.motif.MComponentPeer.initialize(MComponentPeer.java:182)
at sun.awt.motif.MComponentPeer.init(MComponentPeer.java:226)
at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:103)
at sun.awt.motif.MDialogPeer.<init>(MDialogPeer.java:39)
at sun.awt.motif.MFileDialogPeer.<init>(MFileDialogPeer.java:24)
at sun.awt.motif.MToolkit.createFileDialog(MToolkit.java:263)
at java.awt.FileDialog.addNotify(FileDialog.java:265)
at java.awt.Dialog.conditionalShow(Dialog.java:887)
at java.awt.Dialog.show(Dialog.java:1035)
at java.awt.Component.show(Component.java:1584)
at java.awt.Component.setVisible(Component.java:1536)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at processing.app.Base.handleOpenPrompt(Base.java:649)
at processing.app.Base$3.actionPerformed(Base.java:906)



There was no answer even after some google searches. I was so disapointed that I setup Eclipse with AVR plugin to do my experiments. Examining the "AWT-EventQueue-0" error I looked for some environmental set relevant to AWT. I found that there was an AWT_TOOLKIT set. Unsetting this solved the problem!!!


$unset AWT_TOOLKIT
$arduino


Sunday, January 13, 2013

Eclipse is (was) very slow! (affects AndroidStudio also)

After upgrading from Ubuntu 10.04 to Ubuntu 12.04, I had problems with Eclipse Application, which I use for Android development, as suggested by Google dev team.
First of all, the repository package of Eclipse in 12.04 is just not running. It keeps crashing on startup.
So, I've downloaded the Eclipse 4.2 from official site and installed it.
But the performance was too poor. And this is a fact for many people, not just for me. After some google searches and many tests, I ended up with a magic eclipse.ini file configuration that speeds up Eclipse:

-startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction openFile
-server
-vmargs
-Xms512m
-Xmx1024m
-XX:PermSize=1024m
-XX:MaxPermSize=1024m
-Xverify:none
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods

Now my Eclipse is running normally and I am able to continue my projects!

Reference: http://www.eclipse.org/forums/index.php/mv/msg/367243/0/40/

Note: S.F.M.B.E. (sorry for my bad english!)

Addition: This also applies to new Android Studio IntelliJ IDEA. Just locate studio.vmoptions in bin folder and increase heap as above!