Launching SharpDX/DirectX app with DeviceCreationFlags.Debug - c#

I am trying to launch my directX/SharpDX app with DeviceCreationFlags.Debug but i am getting the following crash upon startup:
SharpDX.SharpDXException: HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified error
at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Direct3D11.Device..ctor(Adapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.GamePlatform.CreateDevice(GraphicsDeviceInformation deviceInformation)
at SharpDX.Toolkit.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation newInfo)
at SharpDX.Toolkit.GraphicsDeviceManager.ChangeOrCreateDevice(Boolean forceCreate)
at SharpDX.Toolkit.GraphicsDeviceManager.SharpDX.Toolkit.IGraphicsDeviceManager.CreateDevice()
at SharpDX.Toolkit.Game.InitializeBeforeRun()
at SharpDX.Toolkit.GameWindowDesktop.Run()
at SharpDX.Toolkit.GamePlatform.Run(GameContext gameContext)
at SharpDX.Toolkit.Game.Run(GameContext gameContext)
at wrapper.Program.Main(String[] args)
This is on Win7 32bit and i do have the June2010 DirextX SDK and Runtime installed as well as the Windows SDK for Windows 7.
btw, this question originated from this one: SharpDX crash when rendering h264 video using MediaFoundation

From the MSDN (page on D3D11_CREATE_DEVICE_FLAG):
D3D11_CREATE_DEVICE_DEBUG
Creates a device that supports the debug layer.
To use this flag, you must have D3D11*SDKLayers.dll installed; otherwise, device creation fails. To get D3D11_1SDKLayers.dll, install the SDK for Windows 8.
These files are not part of the June2010 SDK. You have to find them somewhere else (i.e. in the Windows 8 SDK, as suggested).

Alternative to installing the SDK is installing Visual Studio 2012 or newer. Its installation will install these debug libraries.
Similar problem was mentioned here: link => explanation 3

Related

"The application does not have the cloud notification capability" on xbox live sign in on unity

Whenever I try to sign into Xbox Live on my Unity game (using creators program Unity plugin), both on UWP PC and Xbox One, the game throws an exception:
Exception thrown at 0x00007FFAEF0AA899 in Boulder Falls.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x000000E51B6FEC20. HRESULT:0x803E0110 The application does not have the cloud notification capability.
WinRT information: The application does not have the cloud notification capability.
Stack trace:
>[External Code]
The program '[5896] Boulder Falls.exe' has exited with code 0 (0x0).]
I am using the included prefab to sign in, and I do have developer mode enabled on both the PC and the Xbox, they are all in the correct sandbox, XboxServices.config has XboxLiveCreatorsTitle set to true, and the account I am using is in the test account list. Is there any solution to this?
Edit:
If I try to continue past the exception, it throws another one:
Exception thrown at 0x00007FFA7F1BA839 in Boulder Falls.exe: Microsoft C++ exception: Platform::AccessDeniedException ^ at memory location 0x000000D2BA3FE740. HRESULT:0x80070005 Access is denied.
WinRT information: A network capability is required to access this network resource occurred
I fixed it, I just rebuilt the program in a new folder from Unity, and compiled it from Visual Studio 2017 instead of 2019.
We ran into this issue, too. For us it turned out to be setting the "InternetClient" capability in the Unity PlayerSettings. However, even after checking that, we had to delete the existing build folder because Unity wouldn't update the existing files with the new capability. For reference, there's a quick mention of setting the capability (step 10):
https://learn.microsoft.com/en-us/gaming/xbox-live/get-started/setup-ide/managed-partners/unity-win10/live-partner-unity-uwp-il2cpp

Nodatime throwing exception in UWP app targeting Windows 10 10240

Hi I'm building a Windows 10 app and I'm using NodaTime 2.4.0 to handle some timezone scenarios. Whilst on debug mode it's working fine, this peace of code throws an "Aggregate Exception" with not much detail.
private void SetDateTime()
{
_currentTimeZone = DateTimeZoneProviders.Tzdb.GetSystemDefault();
}
Which yields the exception:
+ [0] {System.IO.FileNotFoundException: The system cannot find the file specified. (Excep_FromHResult 0x80070002)} System.Exception {System.IO.FileNotFoundException}
I'm compiling the app on Release using .net Native an targeting 10240. Any ideas why it's happening? thanks!

Can't connect to Xamarin on Mac from Visual Studio

I have Xamarin installed both on my Visual Studio 2015 and my MacBook Pro with OS X 10.11.4. The problem is that when I try to connect from VS to OS X, it says that for some reason it can't start the Designer agent.
As far as I see from the log the main problem is in this:
Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-04-03 21:21:44.1336] An error occured starting the Designer 4.0.3.214 agent: Xamarin.Messaging.Client.AgentConsoleRunner Information: 0 : ==== :: Xamarin :: 4.0.3.214-cycle6-c6sr3+0dd817c ====
Xamarin.Messaging.Client.AgentConsoleRunner Information: 0 : Starting Designer 4.0.3.214...
Failed-Native type size mismatch between Xamarin.Mac.dll and the executing architecture. Xamarin.Mac.dll was built for 32-bit, while the current process is 64-bit.
Is there any way to fix it? Btw, here is the full log http://pastebin.com/iB6X0XWe
I see a number of issues in that log. One that caught my eye is that it failed to download provisioning profiles. Make sure that XCode is installed (and up to date) and that you can run it. You might also need to log in to the Apple dev portal and accept a license agreement - sometimes the portal will block some actions if there is a pending agreement.
Also, it looks like your Xamarin install on OSX might be slightly different (or might be on different channel):
There is a mismatch between the installed Xamarin.iOS (version 9.6.1.9) on the Mac MacBook-Pro-Andrey.local (192.168.0.3) and the local Xamarin.iOS 9.6.1.8. While this may not be an issue, it might cause unexpected behaviors. When applying updates, make sure to keep both the Mac and Windows in sync.
I would fix that first before doing anything else.

SQLite UWP Error with Mobile EMulator Windows 10

I am getting the following error when I run the Mobile Emulator while trying to compile and run a VS 2015 UWP app. The app runs fine when using the Local Machine or Simulator.
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'SQLitePCL.raw' threw an exception.
Source=SQLitePCL.raw
TypeName=SQLitePCL.raw
StackTrace:
at SQLitePCL.raw.sqlite3_open_v2(String filename, sqlite3& db, Int32 flags, String vfs)
at SQLite.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks)
at SQLite.SQLiteConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks)
at App3.MainPage.LoadSQLData()
at App3.MainPage..ctor()
at App3.App3_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at App3.App3_XamlTypeInfo.XamlUserType.ActivateInstance()
InnerException:
HResult=-2146233052
Message=Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=SQLitePCL.raw
TypeName=""
StackTrace:
at SQLitePCL.SQLite3Provider.NativeMethods.sqlite3_win32_set_directory(UInt32 directoryType, String directoryPath)
at SQLitePCL.SQLite3Provider..ctor()
at SQLitePCL.raw..cctor()
I have the following references:
SQLite for Universal Windows 3.9.1
sqlite-net-pcl
Microsoft Visual C++ 2013 Runtime Package for Universal Windows
The code where the error occurs in the "using (var db......:
int recCtr = 0;
var root = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
var dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "BaseBallOU.db");
List<string> NHLCollection = new List<string>();
using (var db = new SQLite.SQLiteConnection(dbPath))
{
var NHLlist = db.Table<Teams>().ToList();
foreach (var item in NHLlist)
{
recCtr++;
NHLCollection.Add(item.TeamName.ToString());
}
}
I see a number of similar posts, but some are dated and not using the most recent SQLite libs and pcls.
I'm looking for the correct SQLite dlls, sqlite pcls, runtimes (e.g. VC++ 2013? And version numbers that can be used to compile and run a UWP app on both the local machine and phone emulator.
TIA
Following is how I work with SQLite:
Download and install Sqlite visual studio extension from http://sqlite.org/download.html
Create a new blank c# Universal Windows Platform app.
Right click on the References of project -> Add Reference -> Universal Windows -> Extension -> add SQLite for Universal App Platform and its dependency Visual C++ 2015 Runtime for Universal Windows
Right click on the project node -> Manage NuGet packages -> Search SQLite.Net-PCL -> Install the default version 3.0.5
Change your code to the following:
using (var db = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), dbPath))
{
...
}
Step 1: Install SQLite VSIX pacakge for Universal Windows Platform development using Visual Studio 2015
https://www.sqlite.org/2016/sqlite-uwp-3130000.vsix
Step 2: Install NuGet package SQLite.NET-PCL
PM> Install-Package SQLite.NET-PCL
Step 3: Add references
Add Reference -> Universal Windows ->Extensions -> Make sure the following packages have been checked:
"SQLite for Universal Windows Platform"
"Visual C++ 2015 Runtime for Universal Windows Platform Apps"
If you didn't add reference for VC++ 2015 Runtime, you will get an error mentioned that "Unable to load DLL 'sqlite3' in SQLite Net Platform WinRT" when creating DB connection.

Windows store app fails AppContainerCheck

I'm getting the below error when I try to run the app certification test on my windows 8.1 app. I've looked around for a while and can't seem to find any solutions for this. The app is written in C#/xaml which I wasn't aware even had a linker.
I'm hoping that someone can guide me in the right direction on how I should start to investigate an error like this as web searches have thus far failed me
Binary analyzer
•Error Found: The binary analyzer test detected the following errors:
◦File [MyTabletApplication.exe] has failed the AppContainerCheck check.
•Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of the customer's computer to malware.
•How to fix: Apply the required linker options - SAFESEH, DYNAMICBASE, NXCOMPAT, and APPCONTAINER - when you link the app. See links below for more information:
If you are using Visual Studio 2015 and this is a new solution/project make sure the 'Compile with .NET Native tool chain' check box is cleared in the startup project properties in the Release configuration.

Categories