PicasaPhotoViewer.exe staying in memory

Google’s Picasa Photo Viewer is one of the best photo preview applications, it loads quickly, and is easy to exit. Unfortunately, Google introduced a bug recently that causes the PicasaPhotoViewer.exe process to remain in memory even after you close the application. Several posts on google forums and elsewhere have reported this:

Why does PicasaPhotoViewer.exe stay resident in memory
Multiple picasaphotoviewer.exe ghosts in Task Manager
Memory Loss from orphaned PhotoViewer Processes
PicasaPhotoViewer Process Doesn’t Terminate

This appears to only occur when you open a photo on a network location, such as a network drive. This is a pretty normal usage scenario, such as storage of photos on a RAID server or NAS, and is actually pretty nasty, because it means you can’t rename/delete/move any directory in which you viewed an image including any parent directory (due to the still-running PicasaPhotoViewer.exe locking the directory). It doesn’t take long for this to get seriously annoying when you find yourself having to open Process Explorer/Task Manager to kill off all the orphaned PicasaPhotoViewer.exe processes when you are working with directories.

Orphaned PicasaPhotoViewer.exe processes.

Until Google fixes this, I solved this with a small C# application. It monitors for orphaned instances of PicasaPhotoViewer.exe (i.e. those that are running but have no window) and kills them. This is the complete code:

static void Main(string[] args)
{
   while (true)
   {
      var picasaProcesses =
         (from p in Process.GetProcessesByName("PicasaPhotoViewer")
          where p.MainWindowHandle == IntPtr.Zero && !p.HasExited
          select p);

      foreach (var process in picasaProcesses)
      {
         process.WaitForInputIdle();
         if (process.MainWindowHandle == IntPtr.Zero)
         {
            process.Kill();
            process.WaitForExit();
         }
      }

      Thread.Sleep(1000);
   }
}

Feel free to download the utility, and launch it on Windows startup using a logon script such as described here. Note: The program requires admin rights to run, so you can’t just place a shortcut to it in your ‘Startup’ folder if you are using Vista/7 with UAC switched on.

Update: Ok, it appears this issue has been fixed by Google in Picasa build > 117.38. Updating to the latest version (build 117.43 at the time of writing) fixed the issue for me, so my program should no longer be needed 🙂

Update 2: According to the comment below, the issue may still be occurring for some people. So I have made the program to fix this available for download again.

4 thoughts on “PicasaPhotoViewer.exe staying in memory

  1. ana says:

    the issue is not yet fixed, i am experiencing it on a Vista x64 and the version is exactly the same

    • Bummer. I’ve put the utility that fixes this back online (after initially taking it down). See the link above. Probably worth mentioning to Google that it’s still not fixed for you in the latest build here.

  2. ana says:

    the issue is not yet fixed, i am experiencing it on a Vista x64 and the version is exactly the same

    • Bummer. I’ve put the utility that fixes this back online (after initially taking it down). See the link above. Probably worth mentioning to Google that it’s still not fixed for you in the latest build here.

Comments are closed.