Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

App crashing when launching from SecondaryTile #9

Open
1100101 opened this issue Jan 4, 2016 · 3 comments
Open

App crashing when launching from SecondaryTile #9

1100101 opened this issue Jan 4, 2016 · 3 comments

Comments

@1100101
Copy link

1100101 commented Jan 4, 2016

I've built the latest release (master) of the sample code with VS2015 Community and deployed it to a Lumia 830 running the latest version of Windows 10 mobile.

When I pin the step counter to the start screen, then go to the start screen and tap the newly available tile, the app seems to launch, but immediately quits again.
The same happens if I switch from the app to another app using the app switcher, and then try to switch back to the Steps app.

What's weird: When debugging (no matter using Debug or release builds), this does not happen.

How can I find out what's going wrong?

@1100101
Copy link
Author

1100101 commented Jan 6, 2016

The crash generally happens if the app is running, and you try to run it again/switch to it. It doesn't matter if the app is pinned or not.

@EdiWang
Copy link

EdiWang commented Jan 15, 2016

@1100101

I met the same problem. It happens only to my Lumia 640, my Lumia 950XL is good. It seems to be the

public static IStepsEngine Engine { get; private set; }

in app.xaml.cs, comment out

Engine = await StepsEngineFactory.GetDefaultAsync();

add try..catch to necessary places, the steps won't work, but the crashing on secondary launch is gone, the app won't crash when being switched to or being launched by secondary tile..

I thought it is the problem with static keyword. So I tried to create a Singleton class to initiate the Engine, but the same crashing occurs.

I am still investigating the issue. As far as I can find, commenting out

stepsEngine = new LumiaStepsEngine();

in StepsEngineFactory will also fix the crashing, but step counter certainly won't work. It's difficult to debug because in debug mode everything is fine. Even the "UnhandledException" in app.xaml.cs won't fire.

@EdiWang
Copy link

EdiWang commented Jan 15, 2016

Update: seems to be the problem with "today", if choosing the day to yesterday and then switch to another app or start screen, then switch back to Steps, it won't crash. But when you choose to today, the app will crash again.

Still investigating...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants