Unhandled Exception in Unity3D Windows Store Project

I created a Unity3D project and built it as Windows Store C# XAML app. Things didn’t work right. So I created a new empty project. I aligned my view with the view of the Main Camera and created a cube at its default position so that it can be seen in the Game View. I again built this project as Windows Store C# XAML adding the only Scene in build. I configured the target platform as x86 in Solution Configuration Properties after the solution was created… When I tried to deploy it on Local Machine (I don’t have any other tablet), I get the same problems as earlier.

It loads up the splash screen of Unity3D. Then it shows error of unhandled exception. So I commented that line out and continued but that gave me another exception. I did the same thing again and more and more unhandled exceptions came up in the following order:

36: appCallbacks = new AppCallbacks(false); //FileNotFoundException
59: appCallbacks.SetBridge(_bridge); //NullReferenceException
61: appCallbacks.SetSwapChainBackgroundPanel(mainPage.GetSwapChainBackgroundPanel()); //NullReferenceException
64: appCallbacks.SetCoreWindowEvents(Window.Current.CoreWindow); //NullReferenceException
66: appCallbacks.InitializeD3DXAML(); //NullReferenceException

All these exceptions occurred in file App.xaml.cs. In each exception first I have mentioned the line no. of the statement, then the statement and then the exception that occurred.

After commenting all the above statements, the app runs successfully but nothing shows up (only a black screen). Also when I try to browse the solution folder, I do not recognise anything related to my Unity3D project (when I had created a full project in Unity3D). I can see noticeably the splash screen and logo images in Assets folder and Unity3D references in solution explorer. There were no assets, scripts etc. there in the solution folder.

I am using Unity3D 4.2 and Visual Studio 2012 Ultimate. I don’t have any other SDK to test at the moment.

I took screenshots of my steps and made a zip out of it. I have uploaded it on dropbox. Here’s the link:
https://www.dropbox.com/s/88nod5pfxxgscra/Unity.zip

Hmph, well that’s strange. When you build a project, Visual Studio should create an AppX folder, I don’t remember what is the exact path, but search for it inside sub directories, where you’ve created a project. And show, what files it contains.

This is only a hunch, but could you try build to directory where path woudn’t contain spaces.

Also, see if basic XAML application created from Visual Studio works, basically from VS create a new project Visual C# → Window Store → Basic XAML, and run it.

Cheers

Thanks for replying. Finally this thread came to notice!

The contents of the AppX folder are here:

https://www.dropbox.com/s/6b3hiw24sgrwlu0/appx.zip

I had changed the name of directory to Final but that didn’t work.

And the basic Windows Store C# XAML applications are working normally.

Can you figure out the problem?

Hmph, okay, after looking at your first batch of screenshots, I think you’ve incorrectly changed the project configuration to X86, you’ve needed to change solution configuration, but you’ve changed project configuration, that might be your error.

Rebuild your project to empty directory, and go to Build->Configuration Manager, and change Active Solution Platform to X86, and see if that works.

No Change! Still not working.

Fill a bug report, with attached Visual Studio project, and copy-paste case number here. I’ll take a look

How to fill the bug report?

And what if this problem persists only with me? Because I saw a video once in which the Unity project was built for Windows Store app and was deployed to external ARM tablet and worked successfully. But shouldnt the case of unhandled exceptions be same irrespective of the architecture?

http://unity3d.com/BugReportingFAQ - how to fill a bug.

Basically your exception means, that appCallbacks failed to be created, AppCallbacks constructor is located in UnityPlayer.dll, and this file is compiled per architecture, meaning there is one for x86, and one for ARM.

The only thing which comes to my mind why you’re getting that exception, if you’re somehow created a situation, where your main module is built as x86, but you’re referencing ARM UnityPlayer.dll, in that case the runtime would reject UnityPlayer.dll, and you would get FileNotFound exception.

I brought a Windows 8 laptop from my friend and I followed the same process on his laptop and my PC simultaneously. It worked fine on his and unhandled exceptions came in mine.

Could you do dxdiag, and copy-paste your PC information.

Not required now. I just reinstalled Windows and it worked. This will make me crazy! Thanks.

Hmph, glad you have it working.

So I have windows 8.1 and I have the same problem- so is it reinstalling windows the only fix for now, because I am working on a lot of stuff on it now(not only in Unity) and this will mess everything up- so is it there anything new about this problem?

Could you tell me more about your OS specifics, like:

  • is it a 32 bit or 64 bit Windows ?
  • is it installed in C:\ ?
  • do you have VS 2012 installed?

It is Windows 8.1 Pro Preview Build 9431 32 bit on Lenovo G555 with AMD Athlon Dual core 2.1 GHz 2GB RAM and 256 MB ATI Mobility Radeon HD 4200. Yes it is installed on C:/. And yes I have visual studio 2012 Proffesional. I’ve made projects for windows 8 before(not games) in visual studio and they work perfectly- and I am changing from ARM to x86 the correct way- but nothing - just the unity loading logo and than crash and the app restarts itself.

So is it there any progress with this bug or something because I don’t know what to do- my current project is put on hold for now

I think the problem is related to Windows being 32 bit, we’ll try to resolve it on our side, as workaround - but you may not like it - install 64 bit WIndows.

yeah I was considering it but I’ll first upgrade my ram to about 8gb so I can get crazy- so tnx for the answer- and if I find another way to fix it I’ll post here- i guess that the windows 8 release of my game will have to wait :smile:

So i have a question now- if i create the game on my laptop but build it using unity on 64 but machine and than build it and deploy it using Visual studio on that same 64 bit machine- is it going to work or it is something to do with the creation proccess ?

It should work.