UWP ListView/GridView DragItems results to Catastrophic Failure - c#

We are developing an UWP App that needs the ability to drag items from one GridView to another.
While testing this functionality we encountered multiple catastrophic failures 0x80000FFFF.
After almost 2 days of research we were not able to find a solution for our problem.
We found out that these failures happen, when there's an ItemTemplate set for the GridView the item is dragged from.
Even trying out the official drag-drop sample provided by Microsoft “XamlDragAndDrop”,(https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlDragAndDrop), when you drag the items in Scenario1 from the source ListView to the target ListView (~30-50) times, you will encounter the failure as well.
Has someone else encountered this problem before? We would be super grateful for any advice!
Our developing machines run Windows 10 Enterprise, Version 1803, OS build 17134.285.
Opened an issue on the official GitHub repo.
https://github.com/Microsoft/Windows-universal-samples/issues/977
I recorded a small video of the sample crashing.
https://1drv.ms/v/s!AiZ-jksNqbXLi9kZPPfSeGmQr_YeHg
We managed the get the native trace here.
When running in release mode its crashing earlier, and also when the redraw function is turned on in the display heatmap section.

According to the Raymond Chen this is a plataform specific problem which was solved in the Windows 10 May 2019 update.
So the solution is: update your version of the windows to the latest.
Find out here how you can update it.
Windows 10 May 2019 (What's new)
Windows 10 May 2019 changelog

Related

D3DImage loses device on WPF application

I am developing a WPF application that displays a directX scene.
The code that generates the directX scene is not mine and I have no access to it. (Its not a public code I can references you guys to)
Everything was working fine until I had to format my PC and installed Windows 10. (Before that I had Windows 7)
Now I can't see the DirectX scene and the RenderCapability.Tier on WPF returns 0.
The code works on other computers (Windows 7 and Windows 10) so I'm guessing its something to do with my computer but nothing changed hardware-wise..
I tried reinstalling DirectX and I tried reinstalling the display driver (tried several different drivers) but nothing works I still get RenderCapability.Tier = 0.
The code that displays the DirectX scene is mostly taken from this link:
https://www.codeproject.com/Articles/28526/Introduction-to-D3DImage
I couldn't find any help around the internet that actually solved my problem.
Any help would be appreciated.
Thanks!
Run dxdiag.exe, Display tab, ensure it prints "D3D acceleration: enabled" and "No problems found".
Also the linked sample has a bug, on some systems you must use a query to wait for completion of rendering before passing the texture to WPF. Otherwise WPF may show incomplete renderings, or none at all. If you render with DX9, see this, you need D3DQUERYTYPE_EVENT query, issue D3DISSUE_END after you've done rendering, then sleep until GetData returns S_OK.

Trouble with initial distribution of C# .NET application

I've written an application in C# .NET with the WinForms UI toolkit. I'm attempting to provide Windows executables, but so far they simply don't work for anyone but me.
I'm creating the release packages by building the EXE and DLLs in Visual Studio 2017, copying them into one place, and putting that into a .zip archive. I'm not doing the fancy one-click publishing stuff.
The project is available on github (https://github.com/fadden/6502bench). The first person to try it got "<program> has stopped working" on Win7 (see issue). The second person was using Win10 Pro, and extracted some details from the event log that show it crashing in a system DLL (see issue). Both of them have the latest .NET framework installed.
I haven't worked with C# .NET outside Unity, so I'm a bit out of my depth. It's entirely possible I've skipped an "obvious" step, or am doing things wrong.
Update: answering some of the comments:
it's pure C#, no native or unsafe code
both people reporting problems confirmed that that latest .NET framework is installed (4.7.2)
the program doesn't seem to be starting at all, so I'm not sure what the app could be doing wrong as far as local paths go
the specific errors, including screen shots and log messages, are included in the issues linked above
the full source code, with the VS solution and projects, is up on github
The sense I'm getting from the comments is that what I'm doing isn't fundamentally wrong, so there's some devil in the details.
I downloaded the source, and debugged.
I received a StackOverFlowException on the following 2 lines of code.
ProjectView.cs
line 3545 : symbolListView.Columns[2].Width = lastWidth;
line 3719 : referencesListView.Columns[2].Width = lastWidth;
What is going on is you are handling the ColumnWidthChanged event on ListView components, and modifying the column width. This modification fires the event again, which is causing an infinite loop, and a subsequent StackOverflowException.
But why? I'll take a swing at an answer. You may have hard coded some values that line up with the DPI and resolution of your monitor. When the ListView instantiates on your machine, it doesn't have to 'redraw' the column with and does not fire the event, but for anyone else that doesn't have the same resolution and DPI, the event fires and causes the loop. I could be wrong, but sounds plausible to me.

UWP Ad Controls are broken

I have a UWP app, published in store, here. The app hosts AdControl in some pages and the current version of the app has AdControl but I have no way of confirming if the app is working on other systems but it's not working on my laptop (Windows 10 Creators Update - clean install).
This issue has just recently popped up when my Store submission failed twice and the reason was that my app wasn't launching at all. The app was working fine in Debug mode but when I compiled the app in Release mode, it was actually not working. I have no other windows systems to check if it is a system specific issue just related to my laptop or maybe it is related to AdControls everywhere.
If the pages in my app doesn't have a AdControl the app works fine. I debugged the code and it would not pass through the Page Initializing function, and there I found out that while initializing the pages, the last thing to pass through was the AdControl and when I removed the AdControl the app was working fine and it would still navigate to those pages without AdControl.
Did someone else experience this issue? Maybe download my app and let me know if it works on your system.
this is how I am using the AdControl:
xmlns:ads="using:Microsoft.Advertising.WinRT.UI"
<ads:AdControl Grid.Row="4"
x:Name="Movies_AdControl"
Margin="0,10,0,0"
AutoRefreshIntervalInSeconds="15">
</ads:AdControl>
and also in the VisualStateGroup
<Setter Target="Movies_AdControl.Height"
Value="50"/>
<Setter Target="Movies_AdControl.Width"
Value="320"/>
#Ahmar, there is a known issue with the Windows 10 UWP AdControl that started about a week ago. Unfortunately the AdControl is part of the framework ad sdk which means Microsoft can push out updates to it any time and break all the apps that use it (which is exactly what they did last week).
The reason your new project might work is because you are doing very little other work in the Page contructor. It seems to be a timing glitch that prevents the Loaded event from ever firing (not all of the controls on the page initialize). Try putting a bunch of other controls on the page and you might be right back to having the problem.
The good news is that the problem was finally fixed with the Ad SDK 10.0.5 which has internal version numbers of 10.1705.11001. The bad news is that even if you build your app with that version of the sdk and submit it to the Windows Store, it is still possible that your users have the older broken sdk and until that update is pushed to everybody, there will be problems.
The idea of store framework packages is a bad idea to me. Good in theory due to smaller downloads and potentially rapid and automatic deployments by Microsoft, but bad when Microsoft is sloppy like they were here.
Discussion:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/1d5e1f23-bd61-4384-b55c-2d0cae8d4a03/new-adcontrol-freezes-apps?forum=aiasdk

Exception thrown when navigating to a page with PDFTron

I have to say this exception is really weird. In Windows 10, universal C#-XAML app. I have two monitors (the one from the laptop, and a 2nd screen) and a surface. I have a very simple app, with 2 pages, PageA and PageB. If I put the the PDFTron logic from the samples provided in PageA, it works in all 3 screens. If I put the PDFTron logic in PageB and use the laptop monitor WITHOUT having changed anything it breaks and throws a helpful "Unknow error!". If I use the same app in my 2nd monitor or the surface it works!!
I call
pdftron.PDFNet.Initialize();
In the App.xaml.cs and build PDFViewCtrl = new PDFViewCtrl(); in the UI thread in the constructor of PageB.
any help please?
PDFTron sample
Be aware that the sample works in certain conditions as a Surface. But in a 3840x2160 Dell laptop screen puting the logic in PageB it does not work.
First, there is most likely an actually useful exception message, but you have to retrieve it from PDFNet using the exception you got. See this blog post. This is a limitation of how Microsoft implemented their latest mobile technology (COM API boundary).
As for the error, most likely this has already been fixed. Windows 10 introduced pixel densities that are not recognized in the Windows.Graphics.Display.DisplayProperties.ResolutionScale enumerator from Windows 8.1.
This is why certain devices would fail, and others would not, using older versions of PDFNet.
Please contact PDFNet support to get the latest version.

Windows Phone 8 app randomly crashes with error code -2147220717 (0x80040313)

I am currently developing a stopwatch and timer app in C#/XAML for Windows Phone 8. While using my app on my phone, I found that it randomly closed out/crashed and that too at different points of use (i.e. I wasn't doing the same thing each time it closed out). While debugging, I found that my app closed out with the following error code in my output window:
"The program '[1100] TaskHost.exe' has exited with code -2147220717 (0x80040313)."
I am very confused as to why this is happening. I tried creating an entirely new solution and moving my code over and I've still been getting the same issue. I have tried using the app on multiple different devices, and the same thing happens (even in the Emulator). Sometimes the app crashes after 5 minutes of use, sometimes it crashes after 30 minutes of use, it's very unpredictable which makes it very hard to find the root of the problem. My app uses the XNA Framework to play an audio sound and the Coding4Fun Toolkit for a TimeSpanPicker control, and besides that there isn't much else that's particularly notable about my app. I have tried removing the playing of the audio file and removing references to the XNA Framework, and the problem persists.
Any ideas on what the problem could be?
Thanks in advance!
That what David said +
are you sure that the phone is not running out of memory?
Edit try a windows phone analysis(Alt +F1 | Debug->Start windows phone application analysis)
If you're using XNA framework in WP project you can get a crash when updating the UI thread.
You might need to run it through a Dispatcher?
Dispatcher.BeginInvoke(() => {
// Call your update UI methods here..
});
You might also find this post helpful:
http://social.msdn.microsoft.com/Forums/wpapps/en-US/c2751845-cb70-4301-aa1a-796fa1bb8e8c/the-program-241435222-taskhostexe-managed-has-exited-with-code-0-0x0

Categories

Resources