Windows 8 app blue screen after loading UI - c#

While running performance tests my application suddenly started giving blue screen shortly after the UI was loaded.
In the code im receiving the following error:
{"Error HRESULT E_FAIL has been returned from a call to a COM component."}
"The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.\r\n"
After looking around on google i wasn't able to find anything usefull. The main answers given didn't work such as installing driver updates or reinstalling the application. Keep in mind this is an app in development and it was working fine earlier this day. Between two test launches this happened.
EDIT
After testing the application on a tablet it turns out the development pc is the only machine with the UI loading bug. Going to look into it some more and ill let you guys know if i find a solution.
Edit 2
So after testing the app on the tablet and finding that it works fine there we decided to test the app on a 2nd development pc. Needless to say the same thing happened... in other words its a rendering issue that happens on windows 8.1 PC's but not on a tablet.
Facts as of now:
- Code worked yesterday, no longer works now
- Works on tablet but not on PC
- Nothing changed in the code since it worked
- Seems to happen in the rendering stages
- Bug happens when loading more than 23 items in a listview, app restores itself then
- Any more than 23 items and it stays bugged (dark blue screen but still responds to clicks)

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.

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

Windows 7 Calculator breaks WPF Multi-touch?

I'm having a rather odd problem with a C# and WPF HMI I am working on currently. The HMI is a fairly complex program which allows the use to add and remove modules from a work area, dragging and resizing them to make the page they work on customizable. It works well, and after optimizations actually runs smoothly and works wonderfully with touch and animations. One gesture in particular is rather helpful, as you can (using multi-touch) place two fingers down on the screen and swipe left or right to change pages.
However, I have lately been getting complaints from our apps department that the touch will randomly stop working for any sort of complex movement, read as any sort of multi-touch. I spent a few hours tracking down what the problem was and it turned out, oddly enough to be linked to windows Calculator. Whenever calculator is opened, and subsequently closed, multi-touch ceases to function, and any breakpoints placed in the code show only a single touch being used. I took to the internet, and found a few articles corroborating the issue, but nothing even hinting at a fix other than don't allow calculator to work, which is sadly not an option as this HMI is meant for engineers who are manufacturing precision parts and they are a bit attached to calculator.
I stripped the problem down to its basics in which I made a simple c# and WPF touch app which kept track of how many touches it got, just to make sure its not just shoddy programming in the HMI. After getting the same results, no matter what I tried, I came here hoping someone else has run into and perhaps fixed this issue.
Here are some specs:
This HMI runs on Windows 7 and it is fully updated.
It is a C# program using Unity containers, Prism, and WPF
The touch is being handled through simple OnPreviewTouchDown and
TouchDown events
It doesn't matter if I run calculator through a Process in C# or if we run it from the actual OS, nor how we close the program, all permutations result in the same effect on every machine in the building with a touch screen.
It is an ELO touch screen with the newest drivers, though I have also tried it with a Vista Multitouch simulator and get the same results
Any sort of assistance or direction would be much appreciated. Thanks!
You are right. Microsoft released a fix recently for this issue for Windows 8 and other OS's, perhaps it applies to Windows 7 too.
Multi-touch gesture does not work after you exit the Calculator in Windows
Symptoms
This issue occurs in applications that are started before you
close the Windows Calculator (calc.exe) in Windows 8.1, Windows RT
8.1, or Windows Server 2012 R2.
Cause
This issue occurs because the Calculator exits and changes a
property. This causes the affected applications to stop responding to
multi-touch.
Resolution
We have released an update to resolve this issue.
See https://support.microsoft.com/en-us/kb/3024755
Workaround
To work around this issue, close and reopen the affected applications after the Calculator exits.

Visual Studio 2013 Designer View not showing the UI Elements

I started facing the weird problem recently on my new laptop.
I installed a fresh copy of Windows 8.1 and then Visual Studio Ultimate 2013.
It worked fine for the first few hours, but the next time I opened it, it did not show the UI elements in the XAML Designer view. There's no error, the XAML code is perfectly alright and then on hovering over the supposed-to-be-visible elements, their outline is visible as well as selectable.
Surprisingly this is the case only with all new Windows Store Projects I open or create. The Windows Phone App Designer View works perfectly fine.
I reinstalled Visual Studio a couple of times and at last even formatted the OS and reinstalled it, but the problem still persists.
#JTIM: Sure!!
Posted by Varun Mashru on 5/23/2014 at 3:54 AM on Visual Studio Feedback Forum
Surprisingly and fortunately, I found the solution just two days ago.
It bit of a bummer but that's what it is.
Its nothing to do with the VS setup or the OS.
The first thing to notice here is that it happens with notebooks only.
The REASON??
Because notebooks do not have completely dedicated GPUs. These GPUs
act as secondary processors for the onboard graphics solution which is
directly connected to the display. Hence they fire up only when
needed.
My notebook Dell Inspiron 15 3537 -- Core i5 4200U (Intel HD Graphics
4400 onboard) + AMD Radeon HD 8670M has got a switchable graphics
solution. Hence the software chooses as to which GPU does the
weight-lifting.
The power settings when cranked up to the max indicate that the AMD
GPU must be the one that should take the lead.
And in the case of VS it does not happen properly (Don't know why??).
Maybe the UI components cant decide that which GPU processor to choose
or whatever.
So the simple workaround I found was to bring the graphics settings
down by just a notch. Which is selecting the 'Optimize Performance'
option in the Switchable Graphics instead of 'Maximize Performance'
field in the power plans.
And voila, It works perfectly fine!!!!
Share this with everyone who has freaked out for months on this
issue!! :)

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