• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Repeatable compiler crash when exporting release build

Community Beginner ,
Sep 14, 2011 Sep 14, 2011

Copy link to clipboard

Copied

When I'm exporting one of my projects as a release build, I'm getting the following crash. Whether I execute the command in the IDE or from the command line (via an ant build) I get the same crash. Has anyone else seen this before?
   - Taylor
[06:17:36]: BUILD FAILED
[06:17:36]: java.lang.NullPointerException
[06:17:36]: at com.adobe.flexbuilder.util.FileCopy.listFilesRecursively(FileCopy.java:223)
[06:17:36]: at com.adobe.flexbuilder.util.FileCopy.run(FileCopy.java:94)
[06:17:36]: at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionManager$2.execute(ExportReleaseVersionManager.java:317)
[06:17:37]: at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.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(WorkspaceModifyOperation.java:118)
[06:17:37]: at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionManager.doBuild(ExportReleaseVersionManager.java:355)
[06:17:37]: at com.adobe.flexbuilder.exportimport.ant.ExportReleaseBuildTask.doBuild(ExportReleaseBuildTask.java:192)
[06:17:37]: at com.adobe.flexbuilder.exportimport.ant.ExportReleaseBuildTask.doit(ExportReleaseBuildTask.java:166)
[06:17:37]: at com.adobe.flexbuilder.exportimport.ant.ExportReleaseBuildTask.execute(ExportReleaseBuildTask.java:88)
[06:17:37]: at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at java.lang.reflect.Method.invoke(Unknown Source)
[06:17:37]: at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[06:17:37]: at org.apache.tools.ant.Task.perform(Task.java:348)
[06:17:37]: at org.apache.tools.ant.Target.execute(Target.java:357)
[06:17:37]: at org.apache.tools.ant.Target.performTasks(Target.java:385)
[06:17:37]: at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[06:17:37]: at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[06:17:37]: at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[06:17:37]: at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[06:17:37]: at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[06:17:37]: at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
[06:17:37]: at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:534)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at java.lang.reflect.Method.invoke(Unknown Source)
[06:17:37]: at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
[06:17:37]: at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
[06:17:37]: at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
[06:17:37]: at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
[06:17:37]: at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
[06:17:37]: at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
[06:17:37]: at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[06:17:37]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[06:17:37]: at java.lang.reflect.Method.invoke(Unknown Source)
[06:17:37]: at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
[06:17:37]: at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
[06:17:37]: at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
[06:17:37]: Total time: 6 minutes 14 seconds
[06:17:38]: FlashBuilderC:
[06:17:38]: An error has occurred. See the log file
[06:17:38]: C:\TeamCity\buildAgent\work\b9f20a43bc80d9b3\BuildMachineWorkspace\.metadata\.log.
[06:17:38]: Process exited with code 13

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 14, 2011 Sep 14, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 15, 2011 Sep 15, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 20, 2011 Sep 20, 2011

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 20, 2011 Sep 20, 2011

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 22, 2011 Sep 22, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2014 Nov 26, 2014

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines