Project

General

Profile

Actions

Bug #730

closed

Crash when exiting settings if a proxy dialog is displayed

Added by Soren Stoutner almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Next Release
Start date:
06/03/2021
Due date:
% Done:

0%

Estimated time:

Description

This happens if either Tor or I2P proxying is enabled and the indicated app is not installed.

This is caused by line 4308, 4318, or 4345 in MainWebViewActivity:

https://gitweb.stoutner.com/?p=PrivacyBrowser.git;a=blob;f=app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java;h=52d5f69998a21541177f67a634083bbd7795f0ec;hb=5c9367467e671483924626fa69eb8a4e61d24352

i2pNotInstalledDialogFragment.show(getSupportFragmentManager(), getString(R.string.proxy_not_installed_dialog));

Which causes a `Can not perform this action after onSaveInstanceState` error.

It looks like it is just attempting to display the dialog too quickly.

https://stackoverflow.com/questions/15729138/on-showing-dialog-i-get-can-not-perform-this-action-after-onsaveinstancestate

Actions #1

Updated by Soren Stoutner almost 3 years ago

  • Description updated (diff)
Actions #2

Updated by Soren Stoutner almost 3 years ago

We can probably use a similar fix as https://redmine.stoutner.com/issues/663.

Actions #3

Updated by Soren Stoutner almost 3 years ago

  • Status changed from New to Closed

It turns out that the previous fix trying to detect if the activity window was active and running the `wait()` command no longer worked with target API 30, so all the previous fixes were broken. I implemented a more robust fix that stores pending dialogs in an array and displays them in `onStart()`.

Fixed in https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=2bf00b70e1626bb941ec517fc6749f18ddb255c6.

Actions

Also available in: Atom PDF