Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Problems building Paradox.sln [beta04] #116

Closed
gitfool opened this issue Nov 26, 2014 · 14 comments
Closed

Problems building Paradox.sln [beta04] #116

gitfool opened this issue Nov 26, 2014 · 14 comments

Comments

@gitfool
Copy link

gitfool commented Nov 26, 2014

Some test projects don't build:

  • SiliconStudio.Paradox.Assets.Tests
  • SiliconStudio.Paradox.Engine.Tests.Windows
  • SiliconStudio.Paradox.Graphics.Tests.Windows

I'm using the latest source as at commit b47b609. The build is sufficiently complex that I can't make head or tail of it. ;)

BuildLog.txt.zip | uploaded via ZenHub

@gitfool
Copy link
Author

gitfool commented Nov 26, 2014

Similar problems for Paradox.Android.sln:

BuildLog.txt.zip | uploaded via ZenHub

... and Paradox.iOS.sln:

BuildLog.txt.zip | uploaded via ZenHub

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

I noticed the problem with {0} displaying (which we will fix), but it should still display the exception info right after in the current version (if there is any)

Other than that, I couldn't reproduce the exception/error you had with the version on GitHub.

By any chance, can you try to set "SiliconStudio.Assets.CompilerApp" as your start project, and copy paste the command arguments from build log? (grep for "BuildEngine arguments"), then debug it with Exception Thrown (Ctrl+Alt+E) on? (please ignore Net/Socket related one).

In your case, the arguments that you should debug with should be:
--compile-property:SolutionDir=D:\Devel\Repos\Paradox\build\;SolutionName=Paradox;BuildProjectReferences=false --platform=Windows --graphics-platform=Direct3D11 --profile=Windows --project-configuration=Release --output-path=D:\Devel\Repos\Paradox\Bin\Windows-Direct3D11\data\SiliconStudio.Paradox.Graphics.Tests --build-path=D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\obj\data --package-file=D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\SiliconStudio.Paradox.Graphics.Tests.pdxpkg

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

Also interested to know what displays if you change https://github.com/SiliconStudio/paradox/blob/master/sources/assets/SiliconStudio.Assets.CompilerApp/Program.cs#L222
into:
options.Logger.Error("{0}", e, e.ToString());

@gitfool
Copy link
Author

gitfool commented Nov 26, 2014

No exception is thrown (in the debug session). I added a --log-file argument to capture the output:

BuildEngine: info 0.018s: BuildEngine arguments: --compile-property:SolutionDir=D:\Devel\Repos\Paradox\build\;SolutionName=Paradox;BuildProjectReferences=false --platform=Windows --graphics-platform=Direct3D11 --profile=Windows --project-configuration=Release --output-path=D:\Devel\Repos\Paradox\Bin\Windows-Direct3D11\data\SiliconStudio.Paradox.Graphics.Tests --build-path=D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\obj\data --package-file=D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\SiliconStudio.Paradox.Graphics.Tests.pdxpkg --log-file=D:\Temp\Temp\LogFile.txt
BuildEngine: info 0.018s: Starting builder.
BuildEngine(0,0): error 4.537s: System.InvalidOperationException: Bundle has not been properly written
at SBuildEngine(0,0): error 4.538s: System.InvalidOperationException: Bundle has not been properly written
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): error 4.538s: The command ""D:\Devel\Repos\Paradox\Bin\Windows-Direct3D11\SiliconStudio.Assets.CompilerApp.exe" --compile-property:SolutionDir=D:\Devel\Repos\Paradox\build\;SolutionName=Paradox;BuildProjectReferences=false --platform=Windows --graphics-platform=Direct3D11 --profile=Windows --project-configuration=Debug --output-path="D:\Devel\Repos\Paradox\Bin\Windows-Direct3D11\data\SiliconStudio.Paradox.Graphics.Tests" --build-path="D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\obj\data" --package-file="D:\Devel\Repos\Paradox\sources\engine\SiliconStudio.Paradox.Graphics.Tests\SiliconStudio.Paradox.Graphics.Tests.pdxpkg" --log-pipe=""" exited with code 1.
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): info 4.539s: Loading Assets from Package [SiliconStudio.Paradox.Graphics.Tests.pdxpkg]
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): info 4.539s: Loading Assets from Package [Paradox.pdxpkg]
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): warning 4.540s: Template [D:/Devel/Repos/Paradox/sources/editor/SiliconStudio.Paradox.Assets.Presentation/Templates/NewPackage.pdxtpl] does not exist 
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): warning 4.540s: Template [D:/Devel/Repos/Paradox/sources/editor/SiliconStudio.Paradox.Assets.Presentation/Templates/ProjectExecutable.pdxtpl] does not exist 
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): warning 4.541s: Template [D:/Devel/Repos/Paradox/sources/editor/SiliconStudio.Paradox.Assets.Presentation/Templates/ProjectLibrary.pdxtpl] does not exist 
D:\Devel\Repos\Paradox\Targets\Paradox.targets(166,5): warning 4.541s: Template [D:/Devel/Repos/Paradox/sources/editor/SiliconStudio.Paradox.Assets.Presentation/Templates/UpdatePlatforms.pdxtpl] does not exist 

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

You sure "Thrown" column is checked when you do Ctrl+Alt+E?
Otherwise, thanks for pointing me the exception, I should be able to check more with that.

@gitfool
Copy link
Author

gitfool commented Nov 26, 2014

Positive.

https://github.com/SiliconStudio/paradox/blob/master/sources/assets/SiliconStudio.Assets.CompilerApp/PackageBuilder.cs#L76

is returning a result with HasErrors true and then it exits cleanly (with BuildError exit code).

@gitfool
Copy link
Author

gitfool commented Nov 26, 2014

I can trace it all the way to here:

https://github.com/SiliconStudio/paradox/blob/master/sources/assets/SiliconStudio.Assets/VSProjectHelper.cs#L216

Call stack just before task run:

>   SiliconStudio.Assets.dll!SiliconStudio.Assets.VSProjectHelper.CancellableAsyncBuild.Build(Microsoft.Build.Evaluation.Project project, string targets, Microsoft.Build.Execution.BuildRequestDataFlags flags, Microsoft.Build.Utilities.Logger logger) Line 214  C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.VSProjectHelper.GetOrCompileProjectAssembly(string fullProjectLocation, SiliconStudio.Core.Diagnostics.ILogger logger, bool autoCompileProject, string configuration, string platform, System.Collections.Generic.Dictionary<string,string> extraProperties, bool onlyErrors, Microsoft.Build.Execution.BuildRequestDataFlags flags) Line 76  C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.Package.LoadAssemblyReferencesForPackage(SiliconStudio.Core.Diagnostics.ILogger log, SiliconStudio.Assets.PackageLoadParameters loadParameters) Line 750  C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.Package.Load(SiliconStudio.Core.Diagnostics.ILogger log, string filePath, SiliconStudio.Assets.PackageLoadParameters loadParametersArg) Line 543  C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.PackageSession.PreLoadPackage(SiliconStudio.Assets.PackageSession session, SiliconStudio.Core.Diagnostics.ILogger log, string filePath, bool isSystemPackage, SiliconStudio.Assets.PackageCollection loadedPackages, SiliconStudio.Assets.PackageLoadParameters loadParameters) Line 646  C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.PackageSession.Load(string filePath, SiliconStudio.Assets.PackageSessionResult sessionResult, SiliconStudio.Assets.PackageLoadParameters loadParameters) Line 306 C#
    SiliconStudio.Assets.dll!SiliconStudio.Assets.PackageSession.Load(string filePath, SiliconStudio.Assets.PackageLoadParameters loadParameters) Line 354  C#
    SiliconStudio.Assets.CompilerApp.exe!SiliconStudio.Assets.CompilerApp.PackageBuilder.BuildMaster() Line 76  C#
    SiliconStudio.Assets.CompilerApp.exe!SiliconStudio.Assets.CompilerApp.PackageBuilder.Build() Line 49    C#
    SiliconStudio.Assets.CompilerApp.exe!SiliconStudio.Assets.CompilerApp.Program.Main(string[] args) Line 212  C#

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

Great, thanks!

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

Interesting, it seems to happen when compiling the required assembly (using MSBuild).
However your previous exception was somewhere else ("Bundle has not been properly written").

@gitfool
Copy link
Author

gitfool commented Nov 26, 2014

The [redirected] log first has those lines after shelling out to MSBuild. i.e. after stepping past mainBuildManager.Build().

@xen2
Copy link
Contributor

xen2 commented Nov 26, 2014

Ok I see what is going on:
We build the shared Game project before loading package.

This works fine in user games, but not with unit tests because we don't have a shared game but it uses the exe itself for that (needed for pdxfx, asset plugins, etc...), which call the build engine recursively.
It should work but if it happens to be in a bad state, that could be bad (i.e. in your case, it can't properly read asset bundle).

Also, we usually skip that if done in Debug mode (we build that game assembly in debug mode, so we expect it to be built as expected in that case).

I thought that was something that was fixed some time ago, but it seems it's not.
I will check into it.

Thanks for the help.

xen2 added a commit that referenced this issue Nov 26, 2014
@gitfool
Copy link
Author

gitfool commented Nov 29, 2014

FYI: I updated to commit ceba0b1.

It took 3 attempts to build Paradox.sln. The first was from a clean checkout (of my fork, followed by a merge of ceba0b1). The second was incremental from there after having to cancel the first build which had hung indefinitely trying building the test projects. I had to cancel the second build which had also hung trying building the test projects. The third time it finally built after doing a clean before the build. Weird.

@boriscallens
Copy link

Is this still the case?
Yesterday I forked SHA: 1588c99 and it built without problems in VS2013. If fixed maybe @xen2 can tag this one as fixed?

@xen2
Copy link
Contributor

xen2 commented Jul 22, 2015

Yes it can be closed, thanks!

@xen2 xen2 closed this as completed Jul 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants