I'm dealing with a strange issue that's been giving me headaches for a long time.
I've got a Windows Phone 8.1 (WinRT) app, whose first version I published a couple of years ago. Over the last few months, I've been working on a major update which includes augmented reality as the most prominent feature.
Obviously, the app needs to make use of the camera preview, and that's where trouble starts. I've read discussions in other threads about problems with the camera API, but I didn't find a definite solution.
Before submitting the update, I performed extensive tests on my Lumia 620 and all worked fine. But if the app is downloaded from the store, it crashes and the camera picture goes green as soon as the camera preview starts. It is the very same app package and all required capabilites have been declared.
So basically I can't tell if my app works or not, unless I submit it to the store.
Any help will be appreciated.
Edit: After several hidden-app submissions, I've narrowed down the cause of the crash to the following block of code:
RandomAccessStreamReference rasr = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Square44x44Logo.scale-100.png"));
var streamWithContent = await rasr.OpenReadAsync();
The last of the above lines causes the app to terminate. The same code works fine when the app is deployed from VS.
Any ideas?
It looks like the problem is now resolved. The cause of the crashes was the asset file. This file is a scaled version of the app tile, which is created automatically by Visual Studio. Using this file is allowed when the app is deployed from VS, but not in the store.
Related
I read through the scene understanding SDK overview by Microsoft and was trying to deploy its sample app. I followed through the instructions here, and everything got built and deployed successfully to my Hololens2. However, when I was trying out the application on my Hololens2, there is 1 major problem: The menu doesn't render smoothly, it seems to be continuously covered by black blocks. Neither does the virtual representation renders smoothly, everything seems to lag. It should be looking something like this from Microsoft's documentation.
I have seen this post but not sure if the problem is similar. May I ask if anyone has successfully used the scene understanding sample app and has any idea what caused the issue?
I believe you have followed these steps to create app package and deploy on your Hololens 2: Running on HoloLens 2.
To solve your issue that unsmooth scene objects rendering experience, you can create a ARM64 Release package instead of Debug one. Then you will find the issue will disappear and rendering will be smooth. The main reason is the debug mode build will have additional performance consumption. See the seventh point in this doc.
Verified on HoloLens 2 with the latest 21H1 OS (10.0.20346.1002)
I have an app I created in WPF. Current in WPF, I'm using the Microsoft.Win32.SaveFileDialog file picker to let the user select a file location to save to.
I'm in the midst of converting this app to a Windows Store compatible app, via the Desktop App Converter application. When I use the Win32 picker in the UWP-converted app, it just hangs and eventually crashes, so that doesn't seem to be happy.
It looks like there is a UWP-compatible file picker Windows.Storage.Pickers.FileSavePicker, which is available using the Nuget package UWPDesktop.
Unfortunately, this is giving me the following warning -
Type 'Windows.Storage.Pickers.FileSavePicker' can only be used in UWP apps, not Desktop or Centennial
This seems pretty clear to me, so, finally my question is What dialog picker am I supposed to use for a desktop converter UWP app?
Seems like there are 2 options -
There's some kind of 3rd type of file picker that I'm unaware of, that's compatible with both frameworks.
I use some kind of check in the app to see what framework is active (somehow) and use the appropriate file picker.
Thanks in advance!
You can continue to use the Win32 picker in your converted WPF app. That is supported and expected to work.
To answer why you are seeing a crash here:
If you have Office 2016 installed, there was recently a bug introduced with an Office update that is causing the file picker dialog to crash for converted apps. The fix for this bug should go out very soon in a servicing update.
To confirm that this is indeed the bug you are hitting you can look at the crash reports for your app, and you should see a crash in the module grooveex.dll.
Thanks,
Stefan Wick - Windows Developer Platform
I ended up building a sample app containing just the problematic dialog in an otherwise empty app, with the plan of sending it to Stefan over MS.
Of course, everything looked good, so I played with it a little more and eventually figured out what might have happened.
I was running some async code just before the dialog was executed, and it looks like that would fail silently, causing the app to hang indefinitely.
I don't think this will help anyone, just wanted to close the loop.
I am having severe problems getting an app working in Retail Mode on the Xbox One.
The app works fine in Dev Mode, I have uploaded to the store and it passes certification fine but when the app is then installed via the store onto a Retail Xbox One it refuses to run.
Firstly it was crashing whilst on the splash screen, no error message just returning back to the Xbox homes screen, Due to now being in Retail mode I cannot connect a debugger to the app. I've setup my own exception handler to send errors to my backend server and it was crashing with the exception:
Cannot create instance of type 'Microsoft.Advertising.WinRT.UI.AdControl'
It's using the latest Microsoft.Services.Store.SDK and therefore Microsoft.Advertising SDK for XAML. I've took out the AdControl from MainPage.xaml and now we have a UI come up on screen! Not ideal as the ads are needed for monetization.
Unfortunately that's not the end of the problems, during the app initialisation it copies files from the Data folder of the solution to localstorage, for some reason it's now hanging on the following:
StorageFile anjFile = await localCacheFolder.GetFileAsync(App.AbilitiesFileName);
What's so different running apps on the Xbox in Retail Mode compared to Dev Mode? The app also functions fine on mobile and desktop so I know there shouldn't be any problems. The only way to try and find out what's causing problems is to comment out lines, or put placeholders in the app to change a debug textbox on screen to see what part of code is running and rebuild and submit to the store again, wait for certification and then redownload from the store to the Xbox, a very slow and time consuming task and I'm now up to Submission 12 of an app I'm getting very frustrated with!
Update: Seems like the AdControl issue started around 9th Feb and is affecting several apps on Xbox One and is possibly due to a framework update to the libraries involved. Not sure why it isn't affecting Dev Mode as well.
Thanks a lot for reporting this issue out on the forum and helping us with investigations. The root cause of the issue has been identified and fix has been rolled out. The framework update will take a couple of days to reach most devices as and when any new app or updated ad-enabled app gets updated on the Xbox device.
Dev Mode only: The issue doesn't affect Dev mode and only Retail mode since Retail mode actually is the most secure and most strict environment and requires that all binaries involved are signed and certified. If anything is missing, Retail mode is the only one which will surface the issue in this fashion - not loading the libraries.
Fix and roll out process: You could reach out to the users who reported problems for your app and ask them to re-install your app. The other option that you (as a developer) have is to push an update to your app (only version change) and push it to your users. This will get the framework updated on the end user devices and speed up the fix roll out. Those developers who had taken off the ad control, please put it back and push the update for your apps.
Please feel free to reach out to us (msft-aia-help#microsoft.com) in case of any issues or queries regarding this topic. Thanks for the patience and sorry for the inconvenience caused during this period.
-Vivek.
Seems like the AdControl issue started around 9th Feb and is affecting several apps on Xbox One and is possibly due to a framework update to the libraries involved. Not sure why it isn't affecting Dev Mode as well.
I have got a update from our engineering team, this issue has been fixed. But you may need to uninstall and reinstall any of the affected apps in your XBOX, after that it should work fine.
Please let me the result after you reinstall all the affected apps in your XBOX.
Thank you.
I developed a UWP music app in C# which use BackgroundMediaPlayer in Windows API.
Since I associated the app to the store, it doesn't play sound after the first app launch.
1st launch -> Everything is fine.
x launch after until computer restart => No sound (still playback
position tracking/play/pause works).
Does somebody have an explanation or a fix?
This is the answer from a Microsoft employee:
We have confirmed the root cause and we are getting this fixed. Sorry about that. The workaround is to change your "Package name" to be greater than 20 characters. Please let us know if that works for you.
When I associated my app with the store, my package name got under 20 character; wich was causing the bug.
I changed it to be more than 20 char and my app worked well again.
The problem is that any store association or app upload will set back the package name.
Microsoft told me the bug will be fixed. It was on October 1th 2015.
Check https://github.com/Microsoft/Windows-universal-samples/issues/141 for more info.
As far as I have seen, this is some bug introduced in Windows 10 RTM. At this point I would advise you to use alternative APIs (like MediaElement).
I am currently developing an app that seems to hang my Windows Phone 7 phone. If I start the application and then press the home button or use the back arrow and then repeat this several times then the phone actually hangs in the middle of the app start animation and I need to restart the phone.
To troubleshoot this issue I created a new project and removed all my code and put there my xaml and animations only. My xaml with the animations inside are about 2800 lines long. When used under debugger no exceptions are thrown nor any other error messages are shown.
I created a project for demonstrating my issue. Here are the steps to reproduce the problem
Open the project in Visual Studio
Select Windows Phone 7 Device
Run the application.
Start using the home or the back button to quit the app and then relaunch it again and again.
Repro_Crash - This is the project that I am using to reproduce my issue.
Image of the Crash - from this point I am forced to restart the phone.
I am looking for hints or tips regarding how to figure out what is happening!
I've tried your project and it runs perfectly fine on my HTC HD7 NoDo. It displays only a large wall of letters without any animations and does not crash the phone. I'm using the latest Mango Beta 2 Refresh SDK.