Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of navCtrl.setRoot more than 10 times freezes the app #5718

Closed
EugeneSnihovsky opened this issue Mar 4, 2016 · 2 comments
Closed

Use of navCtrl.setRoot more than 10 times freezes the app #5718

EugeneSnihovsky opened this issue Mar 4, 2016 · 2 comments
Assignees

Comments

@EugeneSnihovsky
Copy link

Short description of the problem:

Simple project with two pages and buttons that redirect on each other with navCtrl.setRoot(PageName).
On 11 click on android device app freezes forever.
On 11 click on chrome I see black screen and can do nothing.

What behavior are you expecting?

I want to navigate in my app from page to page with navCtrl.setRoot infinite times.

Steps to reproduce:

  1. git clone -b ER-1_freeze_after_multi_navigation https://github.com/EugeneSnihovsky/ionic2-for-errors.git
  2. cd ionic2-for-errors
  3. npm install
  4. ionic serve
  5. Navigate from home to settings page more than 10 times.
Page code (second page similar)
'use strict';
import {NavController} from 'ionic-framework/ionic';
import {SettingsPage} from '../../main/settings/settings.page';


import {Page} from 'ionic-framework/ionic';

@Page({
    templateUrl: 'build/components/main/home/home.html'
})

export class HomePage {
    private navCtrl: any;
    constructor(navCtrl: NavController) {
        var self = this;
        self.navCtrl = navCtrl;
    }

    open(name) {
        this.navCtrl.setRoot(SettingsPage);
    }
}

Ionic Version: 2.x

Browser & Operating System: Android / Chrome

Run ionic info from terminal/cmd prompt:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:  
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
OS: Distributor ID:     LinuxMint Description:  Linux Mint 17.2 Rafaela 
Node Version: v5.3.0

@adamdbradley adamdbradley self-assigned this Mar 4, 2016
@privetr
Copy link

privetr commented Mar 4, 2016

Same problem here, but whatever number of navigation pages.

Using this.nav.push or using this.nav.setRoot when I close an Alert causes black screens on Chrome (most of time).

ionic info

Your system information:

Cordova CLI: 5.0.0
Gulp version:  CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-alpha.57
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
OS:
Node Version: v4.2.6

adamdbradley added a commit that referenced this issue Mar 6, 2016
@adamdbradley
Copy link
Contributor

Thanks for the report! What really helped was "Navigate from home to settings page more than 10 times.", and the 10 helped figure out what the issue was. Should be fixed in the next release, thanks!

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
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

4 participants