title: Endless NullPointerExceptions in Flash Builder 4.5
body: <p>I've been using Flash Builder 4.5 with Flex SDK 3.5B on Mac OS X 10.8.2 for a couple months. It hasn't been a perfect experience—the software has quite a few bugs—but <em>in general</em> it has been working until recently.</p>
  
  <p>Our application includes two Flash Builder "projects", one of which references the other. Whenever we clone the repository, it is necessary to update the <code>.project</code> file of the primary project to include the new path of the secondary project.</p>
  
  <p>The last thing I did before everything broke was move the folder containing the projects to a new location. As expected, when I opened Flash Builder, it complained that it couldn't find my project files, and they were all marked as inaccessible in the "Package Explorer" view. I did not remove the inaccessible projects from my workspace, but I attempted to re-import the primary project from its new location. This marked the first time I saw a dialog that has haunted me ever since:</p>
  
  <p><img src="https://i.stack.imgur.com/oznWn.png" alt="&#39;Building workspace&#39; has encountered a problem. Errors occurred during the build. Details: Errors running &#39;Flex&#39; on project &#39;configurator&#39;. java.lang.NullPointerException"></p>
  
  <p>The "Problems" view told me to refer to the error log...</p>
  
  <p><img src="https://i.stack.imgur.com/FTFOx.png" alt="Errors (2 items): an internal build error has occurred. See the error log for more information."></p>
  
  <p>...but the error log was empty!</p>
  
  <p>The "Package Explorer" view didn't change (the new project wasn't listed) so I decided to just try the import again. When I selected the project directory, Flash Builder said I couldn't import it because the project was already in the workspace. <em>"But the Package Explorer says it isn't... maybe it'll let me try again if I restart Flash Builder,"</em> I thought. I thought wrong. When I restarted, this is what I saw:</p>
  
  <p><img src="https://i.stack.imgur.com/MIwkb.png" alt="Could not create the view: an unexpected exception was thrown."></p>
  
  <pre class="lang-none prettyprint-override"><code>java.lang.NullPointerException
      at com.adobe.flexbuilder.util.PathUtils.resolveLocaleInSourcePath(PathUtils.java:297)
      at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getProjectPath(ActionScriptProject.java:713)
      at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getSourceContainers(ActionScriptProject.java:681)
      at com.adobe.flexbuilder.as.editor.ui.packageexplorer.content.FlexPackageExplorerContentManager.getSourceRoot(FlexPackageExplorerContentManager.java:644)
      at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getWorkspaceRootChildren(FlexPackageExplorerContentProvider.java:152)
      at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getChildren(FlexPackageExplorerContentProvider.java:80)
      at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.inputChanged(FlexPackageExplorerContentProvider.java:449)
      [...]
  </code></pre>
  
  <p>It couldn't even display the list of projects so I could remove the one that was causing the issue. A similar message was displayed in the "Editor" view. Deleting all of the project's files didn't help either. I was unable to fix the workspace, and the only way I could continue to use Flash Builder was by creating a new workspace.</p>
  
  <p>Since then, I have tried many different things:</p>
  
  <ul>
  <li>Reinstalled Flash Builder 4.5.</li>
  <li>Reinstalled Flex SDK 3.5B.</li>
  <li>Checked out a six-month-old version of the project.</li>
  <li>Upgraded to Flash Builder 4.6.</li>
  <li>Created a new user profile on my computer.</li>
  <li>Tried to remove whatever trace files might have broken things:
  
  <ol>
  <li>Used Instruments to monitor all files the Flash Builder process touches.</li>
  <li>Uninstalled Flash Builder.</li>
  <li>Used <code>find</code> to locate any files that included <code>builder</code> or <code>eclipse</code> in their name.</li>
  <li>Deleted all files found in (1) or (3) that seemed possibly related to Flash Builder.</li>
  <li>Reinstalled Flash Builder.</li>
  </ol></li>
  <li>Installed Flash Builder 4.5 on another Mac running Mac OS X 10.6.8.</li>
  <li>Checked out a two-year-old version of the project with Flex SDK 3.5 on the other Mac.</li>
  <li>Tried in a new workspace on another Mac that already had the project working in an existing workspace. (Yes, it broke when we tried to import it into the new workspace, even though it continues to work fine in the existing workspace.)</li>
  <li>Installed Flash Builder 4.5 in a Windows 7 VM.</li>
  </ul>
  
  <p>None have made any difference. That seems impossible.</p>
  
  <p>Other members of my team have been working on this project for a couple years without running into this particular issue, yet now versions of the project from before I started appear to be broken, and even using brand new installations of Flash Builder on entirely different systems also breaks.</p>
  
  <p>I contacted Adobe's phone support for help with this issue. I waited on hold for over an hour after being told it would be fifteen minutes, only to have them tell me that they no longer offer phone support for the product. (Sadly, their phone tree couldn't figure that out before I waited on hold.) However, I was told that "tier 2 email support" was available at <code>platformt2-noida@adobe.com</code>. I should have known better than to get my hopes up the address was invalid and my messages all bounced!</p>
  
  <p>I have no idea what's going on. It seems like I must have done something else and forgotten about it, because the current situation makes no sense. Has anybody encountered this issue before? Do you have any idea what might be causing it, or what I might do to fix it?</p>