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

[ads] brave crashing when switching profiles due to legacy_confirmation_migration #36658

Closed
kjozwiak opened this issue Mar 8, 2024 · 1 comment · Fixed by brave/brave-core#22520
Assignees
Labels
crash feature/ads OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA/No release-notes/exclude

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Mar 8, 2024

Description

Whenever switching profiles on my Nightly installation, Brave crashes every single time via the crash shown below. After speaking with @tmancey, this is due to the ads migration that occurred on Nightly. As per @tmancey confirmations should be v6 in this case.

            "state":
            {
                "has_migrated":
                {
                    "client":
                    {
                        "v5": true
                    },
                    "confirmations":
                    {
                        "v5": true
                    }
                }
            }
[ 00 ] std::__Cr::basic_stringbuf<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >::view() ( sstream:658 )
[ 01 ] base::internal::Invoker<base::internal::BindState<`lambda at ..\..\brave\components\brave_ads\core\internal\legacy_migration\confirmations\legacy_confirmation_migration.cc:46:12',base::OnceCallback<void (bool)> >,void (const std::__Cr::optional<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > > &)>::RunOnce(base::internal::BindStateBase *,std::__Cr::optional<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > > const &) ( bind_internal.h:904 )
[ 02 ] base::OnceCallback<void (const std::__Cr::optional<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > > &)>::Run(std::__Cr::optional<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > > const &) ( callback.h:156 )
[ 03 ] bat_ads::mojom::BatAdsClient_Load_ForwardToCallback::Accept(mojo::Message *) ( bat_ads.mojom.cc:7233 )
[ 04 ] mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message *) ( interface_endpoint_client.cc:1017 )
[ 05 ] mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept(mojo::Message *) ( interface_endpoint_client.cc:368 )
[ 06 ] mojo::MessageDispatcher::Accept(mojo::Message *) ( message_dispatcher.cc:43 )
[ 07 ] mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper *,mojo::internal::MultiplexRouter::ClientCallBehavior,base::SequencedTaskRunner *) ( multiplex_router.cc:1095 )
[ 08 ] mojo::internal::MultiplexRouter::Accept(mojo::Message *) ( multiplex_router.cc:708 )
[ 09 ] mojo::MessageDispatcher::Accept(mojo::Message *) ( message_dispatcher.cc:43 )
[ 10 ] mojo::Connector::DispatchMessageW(mojo::ScopedHandleBase<mojo::MessageHandle>) ( connector.cc:553 )
[ 11 ] mojo::Connector::ReadAllAvailableMessages() ( connector.cc:611 )
[ 12 ] mojo::Connector::OnHandleReadyInternal(unsigned int) ( connector.cc:444 )
[ 13 ] base::internal::Invoker<base::internal::BindState<void (mojo::Connector::*)(const char *, unsigned int),base::internal::UnretainedWrapper<mojo::Connector,base::unretained_traits::MayNotDangle,0>,base::internal::UnretainedWrapper<const char,base::unretained_traits::MayNotDangle,0> >,void (unsigned int)>::Run(base::internal::BindStateBase *,unsigned int) ( bind_internal.h:911 )
[ 14 ] mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback<void (unsigned int)> const &,unsigned int,mojo::HandleSignalsState const &) ( simple_watcher.h:192 )
[ 15 ] base::internal::FunctorTraits<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &)>::Invoke((base::RepeatingCallback<void (unsigned int)> const &,unsigned int,mojo::HandleSignalsState const &) const &,base::RepeatingCallback<void (unsigned int)> const &,unsigned int &&,mojo::HandleSignalsState const &) ( bind_internal.h:641 )
[ 16 ] base::internal::InvokeHelper<0,void,0>::MakeItSo((base::RepeatingCallback<void (unsigned int)> const &,unsigned int,mojo::HandleSignalsState const &) const &,std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)> > const &,unsigned int &&,mojo::HandleSignalsState const &) ( bind_internal.h:860 )
[ 17 ] base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::HandleSignalsState &)>::RunImpl((base::RepeatingCallback<void (unsigned int)> const &,unsigned int,mojo::HandleSignalsState const &) const &,std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)> > const &,std::__Cr::integer_sequence<unsigned long long,0>,unsigned int &&,mojo::HandleSignalsState const &) ( bind_internal.h:991 )
[ 18 ] base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::HandleSignalsState &)>::Run(base::internal::BindStateBase *,unsigned int,mojo::HandleSignalsState const &) ( bind_internal.h:911 )
[ 19 ] base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run(unsigned int,mojo::HandleSignalsState const &) ( callback.h:344 )
[ 20 ] mojo::SimpleWatcher::OnHandleReady(int,unsigned int,mojo::HandleSignalsState const &) ( simple_watcher.cc:278 )
[ 21 ] base::internal::InvokeHelper<1,void,0,1,2,3>::MakeItSo((int,unsigned int,mojo::HandleSignalsState const &) &&,std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState> &&) ( bind_internal.h:881 )
[ 22 ] base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunImpl((int,unsigned int,mojo::HandleSignalsState const &) &&,std::__Cr::tuple<base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState> &&,std::__Cr::integer_sequence<unsigned long long,0,1,2,3>) ( bind_internal.h:991 )
[ 23 ] base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunOnce(base::internal::BindStateBase *) ( bind_internal.h:904 )
[ 24 ] base::TaskAnnotator::RunTaskImpl(base::PendingTask &) ( task_annotator.cc:201 )
[ 25 ] base::TaskAnnotator::RunTask(perfetto::StaticString,base::PendingTask &,base::internal::TaskTracker::RunTaskImpl::<lambda_0> &&) ( task_annotator.h:89 )
[ 26 ] base::internal::TaskTracker::RunSkipOnShutdown(base::internal::Task &,base::TaskTraits const &,base::internal::TaskSource *,base::internal::SequenceToken const &) ( task_tracker.cc:664 )
[ 27 ] base::internal::TaskTracker::RunTask(base::internal::Task,base::internal::TaskSource *,base::TaskTraits const &) ( task_tracker.cc:521 )
[ 28 ] base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) ( task_tracker.cc:416 )
[ 29 ] base::internal::WorkerThread::RunWorker() ( worker_thread.cc:430 )
[ 30 ] base::internal::WorkerThread::RunDedicatedWorker() ( worker_thread.cc:335 )
[ 31 ] base::`anonymous namespace'::ThreadFunc(void *) ( platform_thread_win.cc:133 )
[ 32 ] BaseThreadInitThunk
[ 33 ] RtlUserThreadStart
[ 34 ] 0x7ff8c604cd70

Steps to Reproduce

Unfortunately I don't really have any STR/Cases but here's a video of the crash occurring:

crashNightly.mp4

Actual result:

Brave crashing whenever attempting to open profiles which don't have Rewards enabled.

Expected result:

Brave shouldn't be crashing when opening other profiles.

Reproduces how often:

100% reproducible on my profile/installation but as mentioned above, there's no STR/Cases to reproduce on a clean install.

Brave version (brave://version info)

Brave | 1.65.67 Chromium: 122.0.6261.111 (Official Build) nightly (64-bit)
-- | --
Revision | b9336aa9d2cb7900833a664f6dc9b9f25105c3bb
OS | Windows 11 Version 23H2 (Build 22631.3235)

Version/Channel Information:

  • Can you reproduce this issue with the current release? N/A (@tmancey mentioned this change only landed on Nightly)
  • Can you reproduce this issue with the beta channel? N/A (@tmancey mentioned this change only landed on Nightly)
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

@kjozwiak
Copy link
Member Author

kjozwiak commented Mar 9, 2024

Updated to 1.65.69 Chromium: 123.0.6312.29 and can't reproduce the issue anymore 👍 Opening both profiles without any issues/crashes.

@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
@tmancey tmancey changed the title brave crashing when switching profiles due to legacy_confirmation_migration [ads] brave crashing when switching profiles due to legacy_confirmation_migration Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash feature/ads OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA/No release-notes/exclude
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants