Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Default behavior should not be enabling crash recovery race condition #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lolsborn
Copy link

@lolsborn lolsborn commented May 20, 2016

Current incarnation of crash recovery causes race conditions triggering crashes in many Ionic applications and other single-page apps.

People using crash recovery feature should be aware of how it works to avoid race condition crashes until a better solution can be found.

@EddyVerbruggen
Copy link
Contributor

Thanks! Super cool that you shared this with us (sincerely).

Let's be democratic about this: please use the thumb emoji's on this comment to vote for making this the default. So thumbs up is in favor of disabling crash recovery by default. I really don't mind what it will be.

@lolsborn
Copy link
Author

lolsborn commented May 21, 2016

Here is a couple of examples of the title swapping in Ionic that can trigger the race condition.

My App

https://youtu.be/8lWxM6tdaAs

Brand new Ionic side-menu app.

https://youtu.be/r7-3z0TIunA

The page title is updated to match the active view title. This switching was enough to trigger a race condition in our app, but it's really easy to imagine an Ionic app where that view title is set dynamically based on the content presented. For example if you have a contacts page and the view title starts out as

<ion-view view-title="{{ foo.title }}">

and the controller code does something like this (This is pretty rough)

$scope.foo.title = '';
$scope.$on("$ionicView.enter", function(event, data){
      var contact = getContactInfo(); // Could even be an async xhr
      $scope.title.foo = contact.first + ' ' + contact.last;
});

@EddyVerbruggen
Copy link
Contributor

Such weird behaviour but I guess it makes sense if you'd use Ionic for a mobile website instead of a Cordova app.

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

Successfully merging this pull request may close these issues.

2 participants