Platform::COMException ^ at memory location 0x0669FAB0. HRESULT:0x80070490 Element not found

Touchscreen - Start → VS 2013 Popup

My build with Unity 4.6.1p2 fails (as did 4.6.1f1) with the error below when I save the project and run with Visual Studio Ultimate 2013.

Build Settings:

Windows Store
XAML C# Solution
Universal 8.1
Build & Run on Local Machine & Windows Phone
Debugging
Unity C# Project
Development Build

I save this & then run the ‘Local Machine’ to test and get the below error. I also have attached a log of debugging information and the assembly surrounding the problem call. Seems the are during a move long and it’s related to security somehow. If I go back to the Windows Store 8.0 SDK it will still give errors(different ones) but the game will run, in this case Windows suspends the thread.

I have Windows 8.1 64 bit kept current with patches & such.

+++++

+++++

So I did a bit of searching in the Unity forums and saw this suggested elsewhere:

modded App.xaml.cs function:

public App()
{
this.InitializeComponent();
appCallbacks = newAppCallbacks(false);
appCallbacks.AddCommandLineArg(“-force-feature-level-10–0”); // added line because my HW only
// supports level 10 in Direct3D
appCallbacks.RenderingStarted += RemoveSplashScreen;
}

Still broken though…

OK, I’ve done some more searches and it is more likely a Windows Security problem of some sort…

I’ve had one too for a 3rd party app after a Windows KB patch that broke the 3rd party apps ‘Library Browser’ (Poser 2014 Pro Gam Dev’ and uninstalling that Security KB fixed that.

However, the only thing I can think of recently to do with security is that I recently switched from a local account to an online Windows account.

Even when these hackers don’t get close to my PC these security fixes being constantly pushed out cause enough damage. Someone needs to come up with a simple security design that works.

Now I can choose to do nothing and make sure I buy a model PC with Windows 8.1 pre-installed so I don’t have to worry about KB fixes hosing up security on pre-existing software and make sure I either stick with a local account or stick with an online account and…

I’ve never even been to the Pirate Bay or any of those sites known for distributing trojans and such…and I don’t frequent NSA sites or Kik either or whatever…

I was just curious if you changed from ARM to x86 in configuration manager prior to build/debug locally?

I just know that it defaults on the build to ARM and you have to make that prior to debug from your workstation…

[EDIT]

… .nevermind, you said you rolled the build back to Windows 8 SDK and it would run…

I just upgraded to 4.6.1f1, opened an old test project from 4.3.x… built to WSA 8.1 and Universal while logged on with my Microsoft account (bound to my domain account), and am not having an issue like this.

this though looks really similar: windows store apps - Unknown exception in Windows_UI_Xaml!DirectUI::Application::OnLaunchedProtected - Stack Overflow

When you save a Unity Project in SDK 8.0 it will default the Project to ARM but for 8.1 SDKs it figures out the CPU you’re running Unity on (or maybe they just decided it makes more sense to test Metro on the Local Machine before the Phone).

At any rate, my app actually up & starts and looks good (thanks Asset Store Kiosks!) and it will run until the second I click my mouse pointer or touch my finger to the app screen.

I do know from doing beta tests for a well know product (not Unity) that the Intel supplied drivers for my Intel Graphics HD GPU will cause a bug in that app I tested in dual screen mode but the bug is actually in the Intel driver and they dropped support for that GPU so fast it’s not even funny.

I’m going to simply uncheck all the UI canvases and see if that resolves the problem.

Unchecking the Canvases and the EventSystem didn’t help so it’s good to know it’s not those.

Does a simple empty scene work for you?

Yes, to my surprise an empty scene did work just when I was ready to contact MS Support about some possibly bizarre security issue on my machine. I do not want to clean install til I buy a new PC.

For the project giving trouble I have used UI on both of them (mine is the original asset store framework with replaced artwork) but they did suplly an NGUI version of the example scene as well.

I’ll try that scene…OK the NGUI scene did not work either.

I’m going to try & find something that isn’t blank that will work.

OK, I tried a scene with only particle & it gives the same error. I also tried a scene with only meshes, no code, and got the same error.

Did you try enabling exceptions via Debug menu ? Maybe it will help you locate “Element not found.” exception

OK, so I tried these:

Windows 8.1 Store app samples → Inking with XAML and SwapChainPanel sample
& Accelerometer sensor sample

& they work.

I will try that now.

OK so I unchecked a lost list of checked exceptions. They are all off now but I get the same error. The event log entries are missing too as you’d expect.

On the blank scene that I made earlier I just got this:

OnWindowActivated event - PointerActivated.

OnWindowDeactivated event - PointerDeactivated. (or something really simple seeming)

+++++

Oops…I had that backwards.

This time I have every exception checked for throwing in the debugger:

Could you try to resolve stacktrace for UnityPlayer.dll, Check here for more info - http://docs.unity3d.com/Manual/windowsstore-debugging.html

I will try but first I create a simpler scenario.

  1. I created an empty project, saved the empty scene (it have the Main Camera)to test.unity under Assets, and built to Windows Store on my Tablet PC without adding test.unity to my list of scenes to build. That list was empty but the app, called test, ran without problems once built.

  2. I have taken the empty scene that works and added a cube in the hierarchy via Create. Now that scene fails in the same way as all the others but the odd thing is I didn’t add the scene to the list of scenes to be build. The scene build list is empty. And yet the app build crashed? I try several variations of very simple objects to add and remove from the scene and also add and remove the scene from the list of scenes to be built. And yet it fails with the same errors as I posted above.

  3. OK, so I tried to replicate 1 & 2 & I can’t, so I am trying to gather information to see if it’s my machine or something in Unity. I created a new blank project with an imported Asset Store simple Island with Palms Cartoon scene and tried to follow your direction to get trace information:

Here is a picture VS 2013 gave me after the app exit: well it got pasted at the top.

Anyway, here is the call stack:


And finally I attached a text file of the debugging log. It’s different than the earlier one but I think the cause is the same.

It might be worth noting I have a Bluetooth Mouse & Keyboard, the Tablet PC has a Wacom Tablet Digitizer built into the screen, and I have the Wacom Drivers from less than 1 year ago installed (I have a Wacom Bamboo but I have the wireless USB dongle unplugged while Windows Store builds are failing).

Thanks.

The log reports a pretty obvious error:

Do you happen to have aggressive antivirus software? Looks like that file gets deleted somehow.

No, I just have standard Windows Defender on Windows 8.1 64 bit. It updates daily with new definitions from MS.

Where would the mainData be?

After I navigated to C:\Users\Konto 01\Documents\Design\Unity\test2\testing\test2\test2.Shared\Data

and there is a mainData of 19KB with a sharedassets0.assets of 3481KB in the same folder.

I will clean solution & run again to make sure I didn’t upload the wrong log. The log looks the same!

See what I mean? A super simple new project and it throws up something this bizarre. I can’t even argue in this case that it has something to do with permissions being mucked up with me switching from a local account to an online account because both Unity 4.6.1p2 & the test2 project were created afterwards.

While I would not be shocked that MS has installed a security KB that is causing this (I removed a security KB last November 2014 that without a doubt broke the asset browser for Poser Pro 2014 Game Dev until I removed it) I have no ideal how far back I would need to go if that’s the real cause.

What I can do is switch back to my local account and try to build & run a Windows Store app. Windows put both accounts in the same home directory so I think the local account & online account are just aliases for the same user account. Ownership of mainData is my online account. And looking in the other projects I have even opened since switching to an online account and they all show as being owned by my online account now and not my local account. Windows must adjust those at login.

OK, sorry. I got the old behavior I reported earlier by switching to the plain ‘8.1’ SDK on Local Machine when I save the project as a VS 2013 project rather than use 8.1 Universal.

I still got a problem but it’s consistent again with what I reported earlier. I read elsewhere in the forum the VS2013 SP4 does not work with Unity Windows Store 8.1 Universal because the libraries are built to SP3.

So I deleted and created a clean project again with SDK 8.1 Local Machine and get the behavior I first described. This is an empty project without even a scene file saved to use. The app window comes up blue and crashes when I click in it with the Element Not Found error.

And so here is a stack trace with symbols like you asked for originally for the original problem: