Empty WinStore App for 8.1 fails WACK 3.3 - UnityEngine.dll NXCheck SafeSEHCheck

Hi all,

When I create an empty Windows Store App for SDK 8.1 and do a testrun with WACK 3.3, I get the following two errors:

Windows security features test

Binary analyzer

Error Found: The binary analyzer test detected the following errors:

  • File C:\StoreAppTest\Solution\StoreAppTest\bin\x86\Master\AppX\UnityEngine.dll has failed the NXCheck check.
  • File C:\lStoreAppTest\Solution\StoreAppTest\bin\x86\Master\AppX\UnityEngine.dll has failed the SafeSEHCheck check.

It’s really an empty solution without Javascript files and so on. I compiled using platform x86 and Master configuration and the option Development Build was unchecked during solution generation.

I’m using Unity 4 Pro 4.5.2f1, Microsoft Windows 8.1 Pro and VS 2013 Update 2.

Does anybody have the same troubles? - or even better, has already solved this problem?

Thank you,
jluki

Hi,

we’ve discovered this bug about 2 weeks ago, however, it still managed to slip through to 4.5.2f1. It is fixed in 4.5.2p1, which can be found here:

Hi,

These are great news! I’ll give it a try immediately.

Thank you very much for your quick response!

Best regards,
jluki

Hi,

I’ve installed 4.5.2p2, but now I’m getting the following Unity error during solution generation:

Error building Player: Exception: Failed to run Serialization weaver with cmdline “Temp/StagingArea\Managed/UnityEngine.dll” -pdb -verbose -unity-engine=“Temp/StagingArea\Managed/UnityEngine.dll” “Temp/StagingArea\TempSerializationWeaver”.[Temp/StagingArea\Managed/UnityEngine.dll]
Symbols will be read from Temp/StagingArea\Managed/UnityEngine.pdb
System.EntryPointNotFoundException: Entry point was not found.
at Mono.Cecil.Cil.ISymbolReaderProvider.GetSymbolReader(ModuleDefinition module, String fileName)
at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at usw.Weaver.Weave()
at usw.Program.RunProgram(ConversionOptions options)
at usw.Program.Main(String[ ] args)

Any idea?

Thank you,
jluki

I have not seen this error message before. Hmm, strange. Could you try deleting the Temp folder in your Unity project? If that does not help, could you try temporarily renaming Unity/Editor/Data/PlaybackEngines/MetroSupport/UnityEngine.pdb so Unity could not find it?

It looks like it tries to call a method on an interface, which will obviously fail. Why it happens, I do not know. Is Mono.Cecil.Pdb.dll present in Unity/Editor/Data/PlaybackEngines/MetroSupport/Tools/SerializationWeaver directory?

Hi,

I created a new project, so there exists no Temp folder in the Unity project. I cannot find Unity/Editor/Data/PlaybackEngines/MetroSupport/UnityEngine.pdb. But the file exists in Unity\Editor\Data\PlaybackEngines\metrosupport\Managed\UnityEngine.pdb. Renaming this file results in a copy failure during solution generation presenting the options ‘Try Again’, ‘Force Quit’ and ‘Cancel’. No chance to create the solution.

The file Mono.Cecil.Pdb.dll is present in the mentioned Folder.

So wait a second, this happens on an empty Unity project?

Yes

Alright I’ve just installed Unity 4.5.2p2 on my machine and I cannot reproduce it locally. That’s good - the problem is only your side and we should be able to fix it.

My first guess is that something got corrupted during installation. Would you mind try installing 4.5.2p2 again but to a different (empty) directory? There’s no need to delete current installation.

Hi,

I’ll try this in the evening and will give you a feedback.

Thank you for your efforts!

Best regards,
jluki

Hi,

I completely uninstalled Unity and deleted the Folders C:\Program Files (x86)\Unity and C:\ProgramData\Unity before I reinstalled Unity 4.5.2p2 again. I then created a new Windows Store App for SDK 8.1 as I did before, but I get the same error:

Error building Player: Exception: Failed to run Serialization weaver with cmdline “Temp/StagingArea\Managed/UnityEngine.dll” -pdb -verbose -unity-engine=“Temp/StagingArea\Managed/UnityEngine.dll” “Temp/StagingArea\TempSerializationWeaver”.[Temp/StagingArea\Managed/UnityEngine.dll]
Symbols will be read from Temp/StagingArea\Managed/UnityEngine.pdb
System.EntryPointNotFoundException: Entry point was not found.
at Mono.Cecil.Cil.ISymbolReaderProvider.GetSymbolReader(ModuleDefinition module, String fileName)
at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at usw.Weaver.Weave()
at usw.Program.RunProgram(ConversionOptions options)
at usw.Program.Main(String[ ] args)

and the solution was - of course - not generated :confused:

If this problem has something to do with my machine, what could it be? Because I have no idea at all. My machine is only a few month old and contains the lastest software Versions.

Best Regards,
jluki

Hi,

In the meantime I installed Unity 4.5.2p2 on a second machine and created a Windows Store App for SDK8.0. And on creating a C# solution I’m getting the same weaver error as before.

Best Regards,
jluki

Strange… Are you using ANY unity plugins?

Could you try running Serialization weaver manual using the command line and check whether the same thing happens? Copy Unity\Editor\Data\PlaybackEngines\MetroSupport\Managed\UnityEngine.dll and .pdb files to some temporary location, for example, “D:\test”, and create another test directory, e.g. “D:\test\temp” then do this:

“<UNITY_INSTALL_DIR>\Editor\Data\PlaybackEngines\MetroSupport\Tools\SerializationWeaver\SerializationWeaver.exe” “D:\test\UnityEngine.dll” -pdb -verbose -unity-engine=“D:\test\UnityEngine.dll” “D:\test\temp”

If it crashes, could you try attaching Visual Studio, and at the crash point, open Modules window and paste all contents here please?

Hi,

the only Unity plugin I have is PlasticSCM. I removed it but got the same error. So PlasticSCM could not be the source.

I executed the following weaver command (unityengine.dll and unityengine.pdb are in c\temp):

c:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\metrosupport\Tools\SerializationWeaver\ SerializationWeaver.exe c:\temp\UnityEngine.dll -pdb -verbose -unity-engine=c:\temp\UnityEngine.dll c:\temp

and got the following output:
Symbols will be read from c:\temp\UnityEngine.pdb
System.EntryPointNotFoundException: Entry point was not found.
at Mono.Cecil.Cil.ISymbolReaderProvider.GetSymbolReader(ModuleDefinition module, String fileName)
at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at usw.Weaver.Weave()
at usw.Program.RunProgram(ConversionOptions options)
at usw.Program.Main(String[ ] args)

Ok, now I got it!

Some other application installed Mono.Cecil, Version=0.9.5.0 into the GAC. Uninstalling Mono.Cecil from GAC solves the issue.

Also the app passes now WACK 3.3.

Thank you very much for heading me in the right direction!

Best Regards,
jluki

Awesome, glad you’ve fixed it. That’s what I suspected had happened :).