Windows Phone 8.1: App crashes in fast app switcher when not attached to debugger - debugging

I have been developing this app for quite a long time, and have had little or no issues. But when I decided to test it without the debugger attached, it caused problems with the fast app switcher. Whenever I switch the app with fast app switcher (or by pressing Start button), it causes the app to crash.
I am using VS2015 and tried enabling break for all exceptions, but still nothing happens while debugging, so I can't understand what the actual problem is.
Any ideas how can I solve this??
P.S. There seem to be a solution for this in this thread: Fast App Resume crashing on WP8.1 when not attached to debugger, but it is intended for Windows Phone 8 and doesn't match with the 8.1 api. Any similar solutions for WP8.1??

have you tried to implement the NavigationHelpers in your app ?
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2014/05/23/windows-phone-8-1-frame-page-navigationhelper-suspensionmanager.aspx
I think that may help you :)

Related

How do I step through Cordova code when the app starts?

When I debug a Cordova app what I constantly do is step through its code inside Chrome's WebInspector. In order to be able to do this, however, I have to wait for the device to become ready in chrome://inspect/#devices (only then can I click on the appearing link for the started app). But if I do this the inspector will not halt on breakpoints if I am not quick enough. How do experienced Cordova developer tackle this issue?
Additionally to frank's comment I just found GapDebug which offers instant debug and, thus, comes close to what I deserve.

xamarin studio stops debugging

I'm using xamarin studio and monotouch for developing iphone applications. When I set break points on my code and start debugging with the xamarin studio, the debugger breaks the codes on the break point correctly, but the problem is that when I trace the codes with debugger after some seconds ( maybe 30-40 sec) the debugger stops debugging, just like a crash. What should I do?
EDIT
I noticed that it is not because of the break point. Whenever I do not work with the phone after a few seconds the debugger disconnect and stop debugging. Is this really a bug? I think maybe there is a setting that if I change it then the issue will be fix.
Isn't this done by the iOS operating system??? doesn't it only give you ~30 seconds to return from the first event otherwise it kills the application process ? So if you sit in the debugger then it will kill that too?
If it's a bug, verify if there is a newer release and update you copy.
Otherwise, report it to the software providers for a solution.

App approved, but crashes

I have made a Windows Phone app (for WP7.1) that uses BackgroundAudio for streaming, nothing too complicated. It was approved and made available for download in the store. However it no longer works, i.e. the app worked in debug+release when run from VS2012, and I assume the .xap I uploaded worked since microsoft approved it (they rejected it once and I was able to reproduce and fix the bugs they reported).
When downloaded the app simply bails on load on WP8 (lumia 820) i.e. flips back to the tiles immediately.
On WP7 (lumia 800) but the playbutton ignores input, however it downloads and displays the playlist, so some kind of functionality+network connection works.
I have tried the basics: installing using the application-deployment tool (app working), running the "Store Test Kit" which reports some slowdowns in the UI animations, but nothing serious (I hope).
Any ideas how to reproduce ".xap approved and downloaded from store but not working" or getting debug info from the phone without VS? Or any other things i can try out?
Every time your app crashes it will be logged and reported on your Windows Phone Dev Center Account. Just go in there and export the details to excel. Get the stack trace and put it in here. Maybe we can help.
The very first thing i can tell you is the opening page has some exceptions and that too it doesn't go well with some phones. Seriously there are concerns when a wp7 app is ported on wp8 device and vice-verse. To the extent of my knowledge there might be some binding issues. make sure you got the binding class to be public. And just as #AMR mentioned go the dev center and export the stacktrace. Try resolving them. Moreover if an app get certifies, it doesn't mean it is completely error free. The tests are limited to very coomon errors only.

How to fix "Unable to activate Windows Tailored application" on Win8

I get "Unable to activate Windows Tailored application" error in Metro app when I'm running it under debugger of Visual Studio 11. I installed Windows 8 x64 Developer Preview on my Dell E6510 laptop.
I googled it and found out many people saying it happens when screen resolution is smaller than 800x600 but it's 1920x1280 in my case.
The app itself contains nothing. It's just empty wizard created application which is nothing but windows with black background.
Any ideas? It seems like very common issue.
The solution was quite bizarre but I figured it out.
It turns out not a single Metro application works under Administrator account including my apps. I'm talking about built-in Administrator account that is disabled by default (but which I enabled).
It gives "Access denied" error so I suspect it's somehow related to the way WinRT COM objects were registered or something like that. Go figure.
I hope somebody from Microsoft is reading this.
Best solution is to wait 2 weeks for the next release. The developer preview is full of fun bugs like this. I've seen this error caused by invalid app.xaml. Double check that you really haven't changed anything. I've also seen this error sometimes resolved by rebooting. Have fun!

WP7 app won't launch from app list

I have a simple Windows Phone 7 application which is working perfectly when started from Visual Studio. However, if I deactivate the app (press Windows button or back button from the application's MainPage) and then click the app's icon to relaunch, the screen will flash and return to the list/home screen. I assumed this was an issue with the emulator but when I got a developer device I have the same issue.
Note that reactivating without a complete tombstone works (pressing Windows button from the app and then back).
I have no idea what causes this or how to proceed with debugging. Hopefully someone else has experienced this and knows a fix.
Turns out there is a bug, i found the solution here http://forums.create.msdn.com/forums/p/67522/416995.aspx
In short, it turns out that the Microsoft.Xna.Framework.Media.MediaLibrary class (which I am using to display pictures on applications main page) is not properly initialized when the user has not opened a media hub prior to you calling it. So picture collection properties are null or empty. The solution is to add a call to MediaPlayer.Queue.ToString(), it will force the initialization of the native media library allowing you to invoke the MediaLibrary later on.
Sounds like an unhandled error on startup is causing the app to crash.
Trap/log/handle/display any unhandled exceptions. Also check what you're doing on startup.
IF you are saving something (to Isolated Storage) after first run and then opening it on subsequent launches then that's where I'd look first.
If it works when launched from Visual Studio then this will probably be due to the way you are rebuilding/redeploying the app before launching it in that case.

Resources