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

bug: Opening Modal randomly causes App to freez #1912

Closed
romanrast opened this issue Aug 2, 2014 · 48 comments
Closed

bug: Opening Modal randomly causes App to freez #1912

romanrast opened this issue Aug 2, 2014 · 48 comments
Milestone

Comments

@romanrast
Copy link

Type: bug

Platform: ios 7 webview

It's hard to reproduce the bug since it happens randomly. But it seems to come with ionic beta10.

@asterism612
Copy link

i have same issue

@erinc
Copy link

erinc commented Aug 2, 2014

I'm having the same issue. It was happening with beta 9 as well.

@mhartington mhartington self-assigned this Aug 5, 2014
@mhartington
Copy link
Contributor

Do you mind testing this against the nightly builds and providing a codepen for this?

@asterism612
Copy link

not freeze.

i guess all event prevent.

when freezing page i got it ionicPopup Push Notification message.

message button is work fine

@mhartington
Copy link
Contributor

Alright. Can you still provide a codepen example of this?

@erinc
Copy link

erinc commented Aug 6, 2014

I can't provide a codepen at the moment, but this is very hard to reproduce. It happens very randomly, with no error messages. I have a collection repeat with each item opening in a modal. One thing to note is that I was doing an $http request to fetch some further details from the server after a list item is clicked. Once I stopped doing that, I haven't seen the modal freezing again. So this might be related to:
#1914

@mbuster
Copy link

mbuster commented Aug 6, 2014

I've seen this issue a number of times myself. Very hard to reproduce, but one very non-scientific observation is that I've only seen it when testing via ionic serve, viewing in Safari. Never in Chrome.

@mhartington
Copy link
Contributor

Hmm, could it be related to ionic serve?

On Wednesday, August 6, 2014, Mark Buster [email protected] wrote:

I've seen this issue a number of times myself. Very hard to reproduce, but
one very non-scientific observation is that I've only seen it when testing
via ionic serve, viewing in Safari. Never in Chrome.


Reply to this email directly or view it on GitHub
#1912 (comment).

@erinc
Copy link

erinc commented Aug 6, 2014

I've seen this on both iOS emulator and the iPhone 4s.

@mhartington
Copy link
Contributor

Hmm, okay @perrygovier will look into this a bit more

@mbuster
Copy link

mbuster commented Aug 8, 2014

I just saw the issue again when running on the device. By chance, I discovered that if I remove the modal-open class from the body element when in this state, the app will become responsive again. It seems like something related to the modal-open class is preventing touch interaction in some cases.

@centimitr
Copy link

Same issue.

After some tests, I found that:
When you changed state, usually go to another view, and open a modal, it will freeze.
When you changed state, usually go to another view, and open a modal, refresh, got a blank page.
However, if you refresh the page after changed state, everything is Ok, modal works well.
So , is this issue cause by UI-Router or history?

ionic serve, python -m SimpleHTTPServer get same result.
Issue only happens on iOS safari.(I have PC, android phone iPad at hand.)

@mbuster
Copy link

mbuster commented Aug 11, 2014

@kcdipesh
Copy link

I'm having the same issue in 1.0.0-beta.11 as well

@perrygovier
Copy link
Contributor

I believe it's a race condition, similar to 25ee658
Will investigate

@stefanmdt
Copy link

On mobile devices (mainly tested on iPhone 5 / iOS 7) modals are working if we go back to beta.9. beta.10 and beta.11 randomly work on desktop browser or emulator but on mobile devices the modals cause our app to freeze in all cases. No significant findings, I know, but perhaps you can identify some faulty changes ... ;)

@harsain
Copy link

harsain commented Aug 28, 2014

I also had the same issue when I updated my Ionic to beta.11 (previously I was using beta.6 and it wasn't happening).

However, I found that this solution worked for me: http://forum.ionicframework.com/t/modal-not-receiving-touch-events/8025/4

So it seems that this issue is related to ionic loading and the loading-active class on the body element.

@stefanmdt
Copy link

Yes! Solved problem in our case because we planned to kick the ionic loading anyway. Thanks a lot!

@shedd
Copy link

shedd commented Aug 30, 2014

I have seen this issue as well. After launching a modal, our users are unable to click any of the buttons on the modal. The app doesn't freeze, but the buttons don't respond. It is extremely hard to reproduce.

I've seen this with two separate modals, both in the browser and on actual hardware devices iPhones and Androids.

My app is currently running beta10.

It looks like I should try upgrading to beta11 and using the workaround from http://forum.ionicframework.com/t/modal-not-receiving-touch-events/8025/2 - will give that a try.

@perrygovier perrygovier added in progress and removed needs: reply the issue needs a response from the user labels Sep 8, 2014
@perrygovier
Copy link
Contributor

I think I know how to fix this, but I'm having trouble recreating the problem to test against. Can someone create a codepen or something that reproduces this? Is it just a specific device?
Also, a fix for the loading service may have fixed this already. Could you try a nightly build too?

@perrygovier
Copy link
Contributor

I'm going to call this closed. Let me know if it pops up again.

@pencilcheck
Copy link

Seems like this is still happening in "driftyco/ionic-bower#v1.0.0-beta.14". Don't know how to reproduce but have receive reports about it.

@iver56
Copy link

iver56 commented Jan 16, 2015

I also experience a freeze for about 4-10 seconds (depends on device) when I click a button that opens a modal. The content of the modal is simple. It has two form inputs and two buttons.

I did a CPU profile in Chrome. What could be the problem?
image

@perrygovier
Copy link
Contributor

I've no idea why, but it appears some collection repeat related methods are stuck in a loop. Does the issue still exist when you switch your collection-repeat for ng-repeat

@iver56
Copy link

iver56 commented Jan 16, 2015

I can now confirm that it is a problem with collection-repeat.

I implemented collection-repeat in the "home" view in my app yesterday. When I go back to a commit before I implemented it, I don't have the "freeze when I try to open the modal" issue. I used ng-repeat before, when I didn't have this issue.

My scenario is something like this:
"home" -> "form" -> open modal
From home I can navigate to a "form" view where I can open a modal by clicking a button. It looks like the collection-repeat in "home" is causing problems in the "form" view. Is this because the "home" view is cached and somehow still working and doing lots of stuff in the background? The "form" view and the modal doesn't have collection-repeat.

Edit: Oh, and my "home" view with collection-repeat has ~800 list items.
Edit2: using beta 14
Edit3: I tested with 1.0.0-beta.14-nightly-952, and the issue is there too

@perrygovier
Copy link
Contributor

@pencilcheck are the instances you're seeing using collection-repeat as well?

@iver56
Copy link

iver56 commented Jan 16, 2015

I'm also experiencing the same freeze issue when interacting with (close, open) a popover. Given that I use collection-repeat in that other view I navigated from.

@pencilcheck
Copy link

@perrygovier actually it's not collection-repeat, it's a lot of form and inputs

@felquis
Copy link

felquis commented Feb 5, 2015

I'm running into this after updating to v1.0.0-beta.14-nightly-978

@stellasoft-will
Copy link

I am also running into this issue, navigate from collection repeat page and modal freezes for around 4 seconds before the app comes back to life. this is a big issue for me as i require to list thousands of items in collection repeat. any news when this will be fixed. please reopen this issue
cpu-ngrepeat

@felquis
Copy link

felquis commented Feb 11, 2015

@stellasoft-will this issue was fixed (for me) in the v1.0.0-beta.14-nightly-1011 or newer.

@stellasoft-will
Copy link

@felquis thanks very much will try that tonight to see if that solves the issue.

@stellasoft-will
Copy link

I have added the nightly version of v1.0.0-beta.14-nightly-1025 and i am still having issues with collection repeat, not as bad but still unusable. I have tried with just ng-repeat and although for obvious reasons the page load is slow as i am loading 2000+ items the modal is popping up, slowly but still works. any idea for what could help. Also that nightly build 1025 collection-repeat is broke when scrolling.

@stellasoft-will
Copy link

@felquis #2964 seems to solve my issue, thanks for your help.

@adamdbradley adamdbradley assigned ajoslin and unassigned perrygovier Feb 12, 2015
@adamdbradley adamdbradley reopened this Feb 12, 2015
@adamdbradley adamdbradley added this to the 1.0.0-rc0 milestone Feb 16, 2015
@ajoslin
Copy link
Contributor

ajoslin commented Feb 24, 2015

This is fixed now.

@ajoslin ajoslin closed this as completed Feb 24, 2015
@dgobaud
Copy link

dgobaud commented Jan 16, 2016

Still happening lots in 1.7.12 HUGE problem. Might be related to sending app to background, then resuming, then opening modal.

@rodrigoords
Copy link

I still have this problem, when i dismiss a modal the screen freeze and i need to close app, only happen in device and randomly too.
In my app im using the background app to subscribe one function inside the modal.

@domisginger
Copy link

@rodrigoords did you find a fix for the issue? I'm having the same, screen freezing on modal dismiss on ionic 3

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

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