Getting Rid of Kernel Panics When Running The Android Emulator Under OS X Lion
by Hans Petter
After OS X Lion was released a few months ago, both me and a lot of other people have experienced
kernel panics at seemingly random times when running the Android emulator from Eclipse. Seemingly unrelated I also noticed that Eclipse sometimes used 100% CPU after it had been running for some time. I increased the heap space allocated to Eclipse, and after doing this the problem disappeared. What is even better is that this seems to have prevent the kernel panics from occuring as well, at least I haven’t experienced any since increasing the heap space.
Personally I set the minimum to 256MB and the maximum to 1024MB, which have worked well for me. But, this depends on the specification of your computer, so take a look at this guide for an idea of what values you should use.
The fix for the problem is easy. Find the Eclipse executable in Finder, double-click and select “Show contents in package”. Open the file eclipse.ini, located in Contents/MacOS. Adjust the memory allocation using the following values:
--launcher.XXMaxPermSize256m -Xms256m -Xmx1024m

Comments
I have Eclipse INDIGO installed on Mac OS Lion with the Android SDK.
How do I find the Eclipse executable and the file eclipse.ini?
eclipse.ini is located inside the eclipe.app bundle.
Just right-click in the eclipe.app (inside your applications folder) and then select “show package contents” option at the opening menu.
You will find eclipse.ini at Eclipse.app\Contents\MacOS folder
It seems working for me, no crash since 3 days with Android emulator.
Thanks a lot.
I saw kernel panics when running the emulator even though I don’t use Eclipse… (NDK and ndk-gdb for debugging.) Switched to Linux for my Android work for now…