简体   繁体   中英

Windows Phone 8.1 app crashes when downloaded from store

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM