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

The app crashed after wake up #325

Closed
qwfpg opened this issue May 17, 2021 · 5 comments
Closed

The app crashed after wake up #325

qwfpg opened this issue May 17, 2021 · 5 comments
Assignees
Milestone

Comments

@qwfpg
Copy link

qwfpg commented May 17, 2021

iOS 14.5.1. Trying to wake up application crashed it. Settings of tab security setup on remember tab. Similar issues described here but on beta iOS version

@tladesignz
Copy link
Contributor

Sorry, but this is way too little information.

You might have experienced that it sometimes does not crash when coming back? So, while it might crash sometimes (or even often) when you use it, that's not the case with standard usage. Otherwise we would have noticed and fixed, already.

So, there must be certain circumstances. Typically bridges? If you're using Snowflake bridges, then that wouldn't surprise me. We're working on improving that, but that's a hard nut to crack, because that's third-party code and a lot of stuff outside the realms of Onion Browser. (E.g.: there must be a snowflake available for you!)

Or it's something else which is triggered by some specific configuration and/or list of pages you have loaded.

@qwfpg
Copy link
Author

qwfpg commented May 26, 2021

@tladesignz so, I try to use it with default configuration without third party bridges. Just check remember tabs in tab security

@tladesignz
Copy link
Contributor

Ok, I played around more and finally understood, when the problem happens.

Steps to reproduce:

  1. Should work with current master build.
  2. Start Onion Browser fresh (direct connection, no bridges)
  3. Send in background by either switching off the device or via home button/swipe.
  4. Switch back on/get it back into foreground, while iOS didn't shut it down completely, yet.
  5. After Tor is restarted and the blurred image should go away, app will instead crash, but only if not debugging!

That's going to be tricky. It's not happening while connected to the debugger. Not sure how to debug this.

@tladesignz tladesignz self-assigned this May 26, 2021
@tladesignz
Copy link
Contributor

Additional note: Must be a real device. Doesn't crash in Simulator regardless if debugger is connected or not.

@tladesignz
Copy link
Contributor

Ok, got this:

The watchdog timer kills the app:

https://developer.apple.com/documentation/xcode/addressing-watchdog-terminations

Reason: #applicationDidEnterBackground is still processing when app is returning to foreground.

Underlying problem: HSTS cache file is too big. > 10 MB, takes over 10 seconds to write. Moving in background thread remedies the crash, but cache file still takes too long to write. HSTSCache needs to be improved.

Fix will be contained in next release!

@tladesignz tladesignz added this to the 2.7.4 milestone May 26, 2021
tladesignz added a commit that referenced this issue May 27, 2021
…ng app shutdown due to a huge disk write of the HSTS file, which got mostly ignored anyway. D'oh!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants