brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.86k stars 2.33k forks source link

[ads] Crash with Custom Notification when showing a Reminder #36962

Open aseren opened 7 months ago

aseren commented 7 months ago

Crash id b42d0000-5a47-b10b-0000-000000000000:

[ 00 ] base::ImmediateCrash() ( immediate_crash.h:179 )
[ 01 ] logging::CheckFailure() ( check.h:211 )
[ 02 ] brave_ads::NotificationAdPopupCollection::Add(brave_ads::NotificationAdPopup*, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&) ( notification_ad_popup_collection.cc:29 )
[ 03 ] brave_ads::NotificationAdPopupHandler::Show(Profile*, brave_ads::NotificationAd const&, gfx::NativeWindow, gfx::NativeView) ( notification_ad_popup_handler.cc:31 )
[ 04 ] brave_ads::AdsServiceImpl::ShowNotificationAd(base::Value::Dict) ( ads_service_impl.cc:1461 )
[ 05 ] brave_ads::AdsServiceImpl::ShowReminder(brave_ads::mojom::ReminderType) ( ads_service_impl.cc:591 )
[ 06 ] brave_ads::AdsServiceImpl::OnExternalWalletConnected() ( ads_service_impl.cc:1843 )
[ 07 ] brave_rewards::RewardsServiceImpl::ExternalWalletConnected() ( rewards_service_impl.cc:2683 )
[ 08 ] brave_rewards::mojom::RewardsEngineClientStubDispatch::Accept(brave_rewards::mojom::RewardsEngineClient*, mojo::Message*) ( rewards_engine.mojom.cc:23419 )
[ 09 ] mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) ( interface_endpoint_client.cc:1021 )
[ 10 ] mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept(mojo::Message*) ( interface_endpoint_client.cc:368 )
[ 11 ] mojo::MessageDispatcher::Accept(mojo::Message*) ( message_dispatcher.cc:43 )
[ 12 ] mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) ( interface_endpoint_client.cc:706 )
[ 13 ] mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) ( multiplex_router.cc:1096 )
[ 14 ] mojo::internal::MultiplexRouter::Accept(mojo::Message*) ( multiplex_router.cc:710 )
[ 15 ] mojo::MessageDispatcher::Accept(mojo::Message*) ( message_dispatcher.cc:43 )
[ 16 ] mojo::Connector::DispatchMessage(mojo::ScopedHandleBase<mojo::MessageHandle>) ( connector.cc:554 )
[ 17 ] mojo::Connector::ReadAllAvailableMessages() ( connector.cc:611 )
[ 18 ] mojo::Connector::OnHandleReadyInternal(unsigned int) ( connector.cc:444 )
[ 19 ] mojo::Connector::OnWatcherHandleReady(char const*, unsigned int) ( connector.cc:410 )
[ 20 ] base::RepeatingCallback<void ()>::Run() const & ( callback.h:344 )
[ 21 ] void base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()>>::ForwardRepeating<>() ( cancelable_callback.h:128 )
[ 22 ] base::RepeatingCallback<void (unsigned int, mojo::HandleSignalsState const&)>::Run(unsigned int, mojo::HandleSignalsState const&) const & ( callback.h:344 )
[ 23 ] mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) ( simple_watcher.cc:278 )
[ 24 ] base::OnceCallback<void ()>::Run() && ( callback.h:156 )
[ 25 ] base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ( task_annotator.cc:202 )
[ 26 ] void base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3>(perfetto::StaticString, base::PendingTask&, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3&&) ( task_annotator.h:89 )
[ 27 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ( thread_controller_with_message_pump_impl.cc:473 )
[ 28 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:338 )
[ 29 ] non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:0 )
[ 30 ] base::MessagePumpCFRunLoopBase::RunWork() ( message_pump_apple.mm:444 )
[ 31 ] base::apple::CallWithEHFrame(void () block_pointer)
[ 32 ] base::MessagePumpCFRunLoopBase::RunWorkSource(void*) ( message_pump_apple.mm:415 )
[ 33 ] __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
[ 34 ] __CFRunLoopDoSource0
[ 35 ] __CFRunLoopDoSources0
[ 36 ] __CFRunLoopRun
[ 37 ] CFRunLoopRunSpecific
[ 38 ] RunCurrentEventLoopInMode
[ 39 ] ReceiveNextEventCommon
[ 40 ] _BlockUntilNextEventMatchingListInModeWithFilter
[ 41 ] 0x7ff80de6210c
[ 42 ] 0x7ff80de60fb6
[ 43 ] __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke ( chrome_browser_application_mac.mm:314 )
[ 44 ] base::apple::CallWithEHFrame(void () block_pointer)
[ 45 ] -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ( chrome_browser_application_mac.mm:313 )
[ 46 ] 0x7ff80de53638
[ 47 ] base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) ( message_pump_apple.mm:805 )
[ 48 ] base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) ( message_pump_apple.mm:156 )
[ 49 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ( thread_controller_with_message_pump_impl.cc:641 )
[ 50 ] non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ( thread_controller_with_message_pump_impl.cc:0 )
[ 51 ] base::RunLoop::Run(base::Location const&) ( run_loop.cc:134 )
[ 52 ] content::BrowserMainLoop::RunMainMessageLoop() ( browser_main_loop.cc:1095 )
[ 53 ] content::BrowserMainRunnerImpl::Run() ( browser_main_runner_impl.cc:160 )
[ 54 ] content::BrowserMain(content::MainFunctionParams) ( browser_main.cc:34 )
[ 55 ] content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool) ( content_main_runner_impl.cc:708 )
[ 56 ] content::ContentMainRunnerImpl::Run() ( content_main_runner_impl.cc:1144 )
[ 57 ] content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ( content_main.cc:335 )
[ 58 ] content::ContentMain(content::ContentMainParams) ( content_main.cc:348 )
[ 59 ] ChromeMain ( chrome_main.cc:192 )
[ 60 ] main ( chrome_exe_main_mac.cc:216 )
[ 61 ] 0x7ff80a99041f
[ 62 ] 0x7ff80a9905a0
[ 63 ] 0x7ff80a990536
[ 64 ] 0x7ff80a990000
[ 65 ] 0x7ff80a98f070
tmancey commented 7 months ago

CHECK fails because we are trying to show multiple reminders at the same time.