Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Crash when trying to add or edit bookmark #3032

Closed
parsd51 opened this issue Nov 12, 2020 · 21 comments · Fixed by #3043
Closed

Crash when trying to add or edit bookmark #3032

parsd51 opened this issue Nov 12, 2020 · 21 comments · Fixed by #3043

Comments

@parsd51
Copy link

parsd51 commented Nov 12, 2020

Description:

Crash when trying to add or edit bookmark on Apple iPad Air 2, iPadOS 14.2

Steps to Reproduce

  1. Existing sync chain with Windows 10 PC and Android phone. (Don’t know if both devices are needed)
  2. Install brave 1.21 as new installation.
  3. Add iPad to the sync chain.
  • Try adding a bookmark on the iPad. Crash
  • Try editing existing bookmark on the iPad. Crash.

Removing sync from the iPad makes no change.
Removing sync from the iPad and deleting all bookmarks makes (edit remove: above work.)
(edit add: it possible to add a bookmark and edit it)

Actual result:
Crash

Expected result:
Be able to add or edit bookmark.

Reproduces how often: [Easily reproduced, Intermittent Issue]
Easy (for me)

Brave Version:

Device details:

Website problems only:

  • did you check with Brave Shields down?
  • did you check in Safari/Firefox (WkWebView-based browsers)?

Additional Information

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

Some additional info:
Creating a new sync chain doesn’t solve it.
PC and Android versions are the latest released.
Brave version is installed from App Store (no developer account).
I wrote “crash”, from user point it’s hanging.

Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<com.brave.ios.browser>:8403] failed to terminate gracefully after 10.0s | ProcessVisibility: Unknown | ProcessState: Running | WatchdogEvent: process-exit | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 18.270 (user 18.270, system 0.000), 57% CPU", | "Elapsed application CPU time (seconds): 10.446, 33% CPU" | ) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0

@iccub
Copy link
Contributor

iccub commented Nov 12, 2020

Thanks for the detailed ticket, does the crash happen no matter what website you add bookmarks?
Do you use english language on your device?

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

Well, there are a lot of websites to try out, but I haven’t found one that works. Bookmarking a simple google search does it.
Editing is the same no matter desktop or mobile bookmarks. Local favourites seems to work.

The iPad has Danish language, but defaults to English for Brave. I have tried Norsk (Norwegian) for Brave and Danish for the iPad and English for the iPad and Brave, but it doesn’t make a difference.

When I first discovered the problem it was an update from 1.20.

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

Not sure if it matters, but

  • Brave rewards is not active. Hide icon ON
  • “always request desktop site” is ON
  • New tab page, default images only.
  • Show tabs bar ON
  • Show bookmarks icon ON
  • Brave is (of cause) default browser

@iccub
Copy link
Contributor

iccub commented Nov 12, 2020

Do you remember if you got any popup about 'Bookmark migration'? Either when you joined a sync chan or at first launch after upgrading to 1.21 @parsd51

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

I’m not sure, but I don’t remember having seen any popup with ‘Bookmark migration’.
I have tried starting a whole new sync chain with PC as ‘master’ and no bookmarks on android phone or iPad.

@iccub
Copy link
Contributor

iccub commented Nov 12, 2020

Did you have any bookmarks added to iOS before you enabled sync?

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

No iPad Brave bookmarks before sync.

@iccub
Copy link
Contributor

iccub commented Nov 12, 2020

After this step
Removing sync from the iPad and deleting all bookmarks makes above work.
does it work for you finally, or did it work only for first bookmark you added, then started to fail again?

thanks you for providing us details, it really helps

@parsd51
Copy link
Author

parsd51 commented Nov 12, 2020

I think I only tried adding one bookmark and edited it and saw it working on the iPad with no sync.
After that I tried with a whole new sync chain with PC as ‘master’ and no bookmarks on android phone or iPad and it didn’t solve it.

@parsd51
Copy link
Author

parsd51 commented Nov 13, 2020

PC sync is set to only sync bookmarks.
Disabling Brave shields for the website to add bookmark for, doesn’t help.

@srirambv
Copy link
Contributor

Can't repro the crash on iPhone/iPad

@parsd51
Copy link
Author

parsd51 commented Nov 13, 2020

I have tried to narrow it down. Here is what I did and found out.

I left the Android out and it was the same problem.
I have been copying bookmark files and then tried export/import. Same problem.
So I tried editing my bookmarks. I have around 1400.

I discovered it worked with few bookmarks, then I tried with depth of path and more bookmarks.
Here I saw a little lack when trying to edit or add, so I tried with all bookmarks and patience - and it works, but it takes a lot of time:

Adding or editing a bookmark: 50 seconds for the UI to show up.
On Android snapdragon 675 it’s instantly.

@parsd51
Copy link
Author

parsd51 commented Nov 13, 2020

When editing a bookmark, it takes long time to save.

When adding a bookmark, I press save, save is grayed out and after a long time

  • it comes back “ungrayed”, so I can press cancel or save again
  • I expect it to have saved and take down the UI.
    Pressing cancel seems to have saved the bookmark.

@parsd51
Copy link
Author

parsd51 commented Nov 13, 2020

I have a couple of those Client.cpu_resource:

{"app_name":"Client","timestamp":"2020-11-13 17:35:16.00 +0100","app_version":"1.21","slice_uuid":"FE1B7815-DFFE-3F41-BA75-560ED071DD2F","adam_id":1052879175,"build_version":"20.11.10.16","bundleID":"com.brave.ios.browser","share_with_app_devs":0,"is_first_party":0,"bug_type":"202","os_version":"iPhone OS 14.2 (18B92)","incident_id":"20455A94-BED7-4E9D-9446-DE0C705CF06D","name":"Client"}
Date/Time: 2020-11-13 17:33:46.399 +0100
End time: 2020-11-13 17:35:16.627 +0100
OS Version: iPhone OS 14.2 (Build 18B92)
Architecture: arm64
Report Version: 32
Incident Identifier: 20455A94-BED7-4E9D-9446-DE0C705CF06D

Data Source: Microstackshots
Shared Cache: 1DF3AC0F-6F2E-3BC1-A063-E0E4BB55929C slid base address 0x199ba0000, slide 0x19ba0000

Command: Client
Path: /private/var/containers/Bundle/Application/B9FF7DE2-9BBB-4BE7-A2CC-95B83D8681CF/Client.app/Client
Identifier: com.brave.ios.browser
Version: 1.21 (20.11.10.16)
Adam ID: 1052879175
Is First Party: No
Beta Identifier: 2F5DF8E0-7068-4750-B581-7F70A2F6C700
Parent: UNKNOWN [1]
PID: 10203

Event: cpu usage
Action taken: none
CPU: 90 seconds cpu time over 90 seconds (100% cpu average), exceeding limit of 50% cpu over 180 seconds
CPU limit: 90s
Limit duration: 180s
CPU used: 90s
CPU duration: 90s
Duration: 90.23s
Duration Sampled: 84.66s
Steps: 40

Hardware model: iPad5,4
Active cpus: 3

@iccub
Copy link
Contributor

iccub commented Nov 13, 2020

@parsd51 thanks for all your help, i sent you a small BAT tip for your effort

Looks like this is a performance problem on our end for users with many bookmarks, we are now going to recreate 'big bookmarks' stack scenario and debug it

@parsd51
Copy link
Author

parsd51 commented Nov 13, 2020

Thanks, and thank you for your fast action and interest.

I have bookmarks, with a mix of long name, long url and with
ICON="data:image/png;base64......

I hope you can replicate it, else don’t hesitate to return.

@iccub
Copy link
Contributor

iccub commented Nov 16, 2020

We localized the issue, it is a performance problem when user has many nested folders.
The more folders you have the longer UI freezes for

In general it seems to happen only for users with hundreds of bookmarks, we are working on a fix

@iccub
Copy link
Contributor

iccub commented Nov 19, 2020

Test file with a lot of bookmarks:
Bookmarks_debug.html.zip

Test plan:
Preparation, this can be done once for all tests,
make sure each test you perform has this large amount of bookmarks imported:

  • On desktop, import the attached bookmarks file
  • Create a new sync chain
  • Install 1.22 on your mobile device
  • Join the desktop sync chain, wait until sync completed

Bookmarks screen:

  • Open bookmarks screen, verify it doesn't take few seconds to open it
  • Scroll down the bookmark list, verify that it's smooth, it can be slightly laggy but should be usable

Add bookmark screen:

  • Go to a website and add it as a bookmark
  • Verify that add-bookmark screen opens without a lag
  • Expand the save folder location, verify there's no lag

Edit bookmark screen:

  • Open bookmarks screen
  • Edit a bookmark
  • Verify that edit-bookmark screen opens without a lag
  • Expand the save folder location, verify there's no lag

@parsd51
Copy link
Author

parsd51 commented Nov 19, 2020

I have discovered a few, to me, minor things. I don’t know if they are fixed already, so I will not file them separately:

  • Editing a folder also takes long time to edit.
  • Editing a bookmark or folder, puts it at the bottom of the list, when only name or url is changed.

@srirambv
Copy link
Contributor

Verification passed on iPhone 7+ with iOS 14.2 running 1.22(20.11.20.16)


Verification passed on iPhone XR with iOS 13.5 running 1.22(20.11.20.16)


Verification passed on iPad Pro with iOS 12.4.1 running 1.22(20.11.20.16)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.