Copy link to clipboard
Copied
Copy link to clipboard
Copied
Well, I don't know the exact cause, but I do know a fix:
I had a Flash Project called YNABCSS whose main MXML application file was also called YNABCSS.mxml. I renamed the mxml file to be Test.mxml and it worked just fine. The name didn't matter because the project is only there so I can compile a .css file to .swf when the project gets built. Hopefully this will come up in someone else's Google search.
Copy link to clipboard
Copied
Can you describe your project structure in more detail?
P.S: YNAB, Flash Builder does not support having a project without an Application file (MXML/AS). If you only want the Runtime CSS file, then what you have done as a workaround is the recommended approach.
-Anirudh
Copy link to clipboard
Copied
Well, I thought that fixed it, but now I'm still getting this crash in the FileCopy.listFilesRecursively function, and it's occasionally happening with other projects too. It appears to be quite random:
[06:17:36]: BUILD FAILED
[06:17:36]: java.lang.NullPointerException
[06:17:36]: at com.adobe.flexbuilder.util.FileCopy.listFilesRecursively(FileCopy.jav a:223)
[06:17:36]: at com.adobe.flexbuilder.util.FileCopy.run(FileCopy.java:94)
[06:17:36]: at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersio nManager$2.execute(ExportReleaseVersionManager.java:317)
[06:17:37]: at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModify Operation.java:106)
[06:17:37]: at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975 )
[06:17:37]: at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOp eration.java:118)
[06:17:37]: at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersio nManager.doBuild(ExportReleaseVersionManager.java:355)
I wish I knew at what points it did this FileCopy (line 317 of ExportReleaseVersionManager.java). That would tell me where the problem might be. Any chance you could help me know where to look?
Copy link to clipboard
Copied
The code in that file is trying to enumerate files in the output directory (via File.listFiles()). From the log, it looks like this is being called on a file rather than a folder.
What is your output directory set to?
Copy link to clipboard
Copied
We have the output folder set to bin-release.
I finally figured out the issue. Sometimes after opening the workspace in Flash Builder, I could get everything working, but then when I would sync down my projects and workspace from source control, this pesky bug would come back. By comparing the folder structure of the working version with that of the one that gave me the above exception, the only notable difference is that the broken version was missing some bin-release and bin folders. This seemed perfectly fine to me, as I assume those folders always get created as part of a compilation. However, adding them back in causes my YNABCSS project not to fail anymore. I should note that adding these folders to the YNABCSS project was not sufficient. It appeared I had to add them to its dependent projects as well. I didn't take the time to determine exactly which project needed this bin or bin-release folder. Once I was done adding all of the missing folders and saw that fixed it, I decided to move on. In any case case, adding in missing bin and bin-release folders to just about every project in my workspace did cause it start building again.
So, with that out of the way, I have a working build machine based on TeamCity: I can finally create a workspace in Flash Builder with all of my projects, check the workspace in to source control, and then make sure my build machine checks out the folder into a known location (since the Flash Builder workspace unfortunately uses absolute paths), and then kick off a build by pointing FlashBuilderC.exe to this source-controlled workspace folder. It unfortunately took me way too much time, but I was glad to see it work.
On a related note, it is quite hard to set up Build Machine automation (read: Continuous Integration) for projects in Flash Builder! Due to the absolute paths in workspaces, this is a non-trivial task that is extremely finicky. I've been happy with Flash Builder, but this is one place where it pales in comparison to Visual Studio. In that environment, I only need to have a .sln file that relatively points to its child projects. It is a much easier way to set it up for deployment to build machines (or to other developers for that matter).
I would love to see Flash Builder adopt a similar relative-path model for specifying project locations.
Copy link to clipboard
Copied
I was having the same issue as described above when doing automated builds using FlashBuilderC. Our source code is checked out via SVN in a directory outside of the various workspaces (one for each branch and trunk).
To resolve I created a new work space for the branch in question and added references to the projects in the source code directory.