Crashing in BraveShieldsDataController::ClearAllResourcesList() toggling Block scripts
See original GitHub issueDescription
Steps to Reproduce
- install
1.38.32 - launch Brave
- open
brave://flags/#brave-shields-v2 - click on
Defaultand set it toEnabled - click on the
Relaunchbutton - load
https://www.aol.com/news/ - open a new window
- load
https://www.aol.com/news/in the 2nd window - now, click on the new Shields icon in the URL bar
- toggle
Block scriptstoON - reload your 1st window
- toggle
Block scriptstoOFF - keep repeating around this flow: 1) disable Shields in one window 2) refresh in other window 3) either repeat the same, or alternative windows, and repeat
Actual result:
Crashes, here:
[ 00 ] brave_shields::BraveShieldsDataController::ClearAllResourcesList()
[ 01 ] void content::WebContentsImpl::WebContentsObserverList::NotifyObservers<void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&>(void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&)
[ 02 ] <name omitted>
[ 03 ] content::NavigationRequest::~NavigationRequest()
[ 04 ] <name omitted>
[ 05 ] <name omitted>
[ 06 ] <name omitted>
[ 07 ] base::internal::Invoker<base::internal::BindState<void (content::RenderFrameHostImpl::*)(content::NavigationRequest*, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadInterfaceParams>), base::internal::UnretainedWrapper<content::RenderFrameHostImpl>, base::internal::UnretainedWrapper<content::NavigationRequest> >, void (mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadInterfaceParams>)>::RunOnce(base::internal::BindStateBase*, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>&&, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadInterfaceParams>&&)
[ 08 ] content::mojom::NavigationClient_CommitNavigation_ForwardToCallback::Accept(mojo::Message*)
[ 09 ] <name omitted>
[ 10 ] <name omitted>
[ 11 ] <name omitted>
[ 12 ] base::internal::Invoker<base::internal::BindState<void (mojo::(anonymous namespace)::ThreadSafeInterfaceEndpointClientProxy::*)(mojo::Message), scoped_refptr<mojo::(anonymous namespace)::ThreadSafeInterfaceEndpointClientProxy>, mojo::Message>, void ()>::RunOnce(base::internal::BindStateBase*)
[ 13 ] <name omitted>
[ 14 ] non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
[ 15 ] invocation function for block in base::MessagePumpCFRunLoopBase::RunWorkSource(void*)
[ 16 ] base::mac::CallWithEHFrame(void () block_pointer)
[ 17 ] base::MessagePumpCFRunLoopBase::RunWorkSource(void*)
[ 18 ] 0x7fff2096237c
[ 19 ] 0x7fff209622e4
[ 20 ] 0x7fff20962064
[ 21 ] 0x7fff20960a8c
[ 22 ] 0x7fff2096004c
[ 23 ] 0x7fff28ba8a83
[ 24 ] 0x7fff28ba87e5
[ 25 ] 0x7fff28ba8583
[ 26 ] 0x7fff23168d72
[ 27 ] 0x7fff23167545
[ 28 ] __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke
[ 29 ] base::mac::CallWithEHFrame(void () block_pointer)
[ 30 ] -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
[ 31 ] 0x7fff23159869
[ 32 ] base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*)
[ 33 ] base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*)
[ 34 ] <name omitted>
[ 35 ] <name omitted>
[ 36 ] <name omitted>
[ 37 ] content::BrowserMain(content::MainFunctionParams)
[ 38 ] content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*)
[ 39 ] <name omitted>
[ 40 ] <name omitted>
[ 41 ] content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*)
[ 42 ] content::ContentMain(content::ContentMainParams)
[ 43 ] ChromeMain
[ 44 ] main
[ 45 ] 0x7fff20885f3d
Expected result:
No crash
Reproduces how often:
100%, given time
Brave version (brave://version info)
| Brave | 1.38.32 Chromium: 99.0.4844.51 (Official Build) nightly (x86_64) |
|---|---|
| Revision | d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875} |
| OS | macOS Version 11.6.3 (Build 20G415) |
Version/Channel Information:
- Can you reproduce this issue with the current release?
no - Can you reproduce this issue with the beta channel?
no - Can you reproduce this issue with the nightly channel?
yes
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Constantly crashing on scripts with 10k+ lines of code
7.5, I'm constantly crashing right after I just type a few characters on that code. That makes Visual Studio completely unusable as it...
Read more >FM Pro 14 - Crash - Division by zero
Sometimes when users execute scripts that create records, a division by zero crash occurs in FileMaker Pro or Advanced. The script that crashes...
Read more >Script crashing ArcMap - problems related to locks I think
I have been having a heck of a time trying to get this script to run. The best I get is it will...
Read more >Is there a way to stop a js script from crashing the application?
This crashes because it runs out of memory. You can disable abort-on-OoM but there's no guarantee you will be able to recover cleanly...
Read more >python - Avoiding script crash - gspread - Stack Overflow
If I paste the function api_requests_timer() before every request sent to Google Spreadsheet API, the function will measure how many API ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I suspect this crash also comes from same cause of https://github.com/brave/brave-browser/issues/22224
Verification
PASSEDonFollowed steps from the bug and confirmed no crashes using the above build