Android Studio Mac Extremely Slow

Downloaded the latest Android Studio:  2.1.3 for mac and it won’t boot or run anything.

Seems first off you need to run the emulator on sudo or it will segfault.  After launching from Android Studio you see it tried to run something like: /Users/user/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Galaxy_Nexus_API_22. end then segfaults.

Copy the command and run:

sudo /Users/user/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Galaxy_Nexus_API_22

So now it doesnt’ boot or appears to boot but takes days… you reboot because you can’t kill the thing either.  Maybe you have installed Virtual Box on you machine at some point and it turns out the kernel modules form virtual box interfere with the intel/google/android emulator( com.intel.kext.intelhaxm )

Solutions:

Uninstall VirtualBox…

Or

sudo kextunload -b org.virtualbox.kext.VBoxUSB
sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
sudo kextunload -b org.virtualbox.kext.VBoxDrv

Enjoy the still slow emulator but it seems to work…

 

 

How to detect if your system tray icon has gone missing, C/C++, Win32

The Problem:

Sometimes if either the desktop crashes or windows decides to go wrong for whatever reason, it re-creates the system tray. There is no way to detect when that happens and your icon is now missing but your system tray application is still running.

The Solution:

Windows does send a windows message to be notified when the system tray is being created.  It won’t be sent to you unless you register to receive it.

To register to receive the message do the following and store the ID that is returned. The simplest way to do this is to store it in a global variable.

const int uTaskbarCreatedMsg = RegisterWindowMessageA("TaskbarCreated");

Then later on in your windows message loop handle the message.

LRESULT CALLBACK WndProc(HWND w, UINT msg, WPARAM wparam, LPARAM lparam)
{
    // ... handle other messages
    if (msg == uTaskbarCreatedMsg) {
        // Destroy any existing icon and recreate it
        CreateSystemTrayIcon();
        return 0;
    }
    // ... default message handling
}

 

Related Links

Related Searches

  • how to detect if the system tray is gone msdn
  • how to detect if the system tray is gone
  • systray icon restart after explore.exe crashes
  • catch explore restart message msdn
  • win32 message for when explorer.exe starts msdn
  • windows message for when explorer.exe starts msdn
  • systray icon dissapears after sleep
  • windows message for when system awakes from sleep

How to get rid of unwanted directories from an subversion checkout

The Problem

Using svn if you’ve checked out a tree but didn’t want the entire tree how can you get rid of some of the subfolders.  This is generally a problem if there are some really big folder slowing down diff or other operations in the tree.

Example

You have checked out http://server/trunk but there is a gigantic folder that was checked out and you want to remove it from the checkout but not svn continues to annoy you saying that you’ve deleted it. Further if you simply delete the folder it will show as deleted every time run svn diff.

svn co http://server/trunk

Resulting in

trunk/one
trunk/two
trunk/three

The Solution

cd trunk
rm -rf three
svn up -N three

If That Doesn’t Work

rm -rf three
svn update --set-depth empty three

The folder will still be there but it will not cause problems with everyday life.