Skip to content

fix: handle empty event scenario in ipc callbacks#48987

Merged
jkleinsc merged 1 commit intomainfrom
robo/fix_internal_event_crash
Nov 17, 2025
Merged

fix: handle empty event scenario in ipc callbacks#48987
jkleinsc merged 1 commit intomainfrom
robo/fix_internal_event_crash

Conversation

@deepak1556
Copy link
Copy Markdown
Member

Description of Change

Regression from #48161

Don't have a reliable repro, but possible fix for the following crash

Crashed Thread:        0  CrBrowserMain  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Codes:       0x0000000000000001, 0x0000000000000008

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [86287]

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0   Electron Framework            	       0x10da818f8 gin::WrappableBase::GetWrapper(v8::Isolate*)
1   Electron Framework            	       0x10f200a94 electron::ElectronApiIPCHandlerImpl::MessageSync(bool, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, blink::CloneableMessage, base::OnceCallback<void (blink::CloneableMessage)>)
2   Electron Framework            	       0x111450368 electron::mojom::ElectronApiIPCStubDispatch::AcceptWithResponder(electron::mojom::ElectronApiIPC*, mojo::Message*, std::__Cr::unique_ptr<mojo::MessageReceiverWithStatus, std::__Cr::default_delete<mojo::MessageReceiverWithStatus>>)
3   Electron Framework            	       0x10f200e38 electron::mojom::ElectronApiIPCStub<mojo::RawPtrImplRefTraits<electron::mojom::ElectronApiIPC>>::AcceptWithResponder(mojo::Message*, std::__Cr::unique_ptr<mojo::MessageReceiverWithStatus, std::__Cr::default_delete<mojo::MessageReceiverWithStatus>>)
4   Electron Framework            	       0x10d1f1590 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept(mojo::Message*)
5   Electron Framework            	       0x10c9c84c8 mojo::MessageDispatcher::Accept(mojo::Message*)
6   Electron Framework            	       0x10c9c83b0 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*)
7   Electron Framework            	       0x10e3b8be0 IPC::ChannelAssociatedGroupController::AcceptSyncMessage(unsigned int, unsigned int, IPC::(anonymous namespace)::ScopedUrgentMessageNotification)
8   Electron Framework            	       0x10e3b8a80 base::internal::Invoker<base::internal::FunctorTraits<void (IPC::ChannelAssociatedGroupController::*&&)(unsigned int, unsigned int, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), IPC::ChannelAssociatedGroupController*&&, unsigned int&&, unsigned int&&, IPC::(anonymous namespace)::ScopedUrgentMessageNotification&&>, base::internal::BindState<true, true, false, void (IPC::ChannelAssociatedGroupController::*)(unsigned int, unsigned int, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), scoped_refptr<IPC::ChannelAssociatedGroupController>, unsigned int, unsigned int, IPC::(anonymous namespace)::ScopedUrgentMessageNotification>, void ()>::RunOnce(base::internal::BindStateBase*)
9   Electron Framework            	       0x10c981668 base::TaskAnnotator::RunTaskImpl(base::PendingTask&)
10  Electron Framework            	       0x10c980af0 non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
11  Electron Framework            	       0x10d1d7dd8 invocation function for block in base::MessagePumpCFRunLoopBase::RunWorkSource(void*)
12  Electron Framework            	       0x10cb88244 base::apple::CallWithEHFrame(void () block_pointer)
13  Electron Framework            	       0x10efc239c base::MessagePumpCFRunLoopBase::RunWorkSource(void*)
14  CoreFoundation                	       0x19b986a64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
15  CoreFoundation                	       0x19b9869f8 __CFRunLoopDoSource0
16  CoreFoundation                	       0x19b986764 __CFRunLoopDoSources0
17  CoreFoundation                	       0x19b9853b8 __CFRunLoopRun
18  CoreFoundation                	       0x19b9849e8 CFRunLoopRunSpecific
19  HIToolbox                     	       0x1a742327c RunCurrentEventLoopInMode
20  HIToolbox                     	       0x1a74264e8 ReceiveNextEventCommon
21  HIToolbox                     	       0x1a75b1484 _BlockUntilNextEventMatchingListInModeWithFilter
22  AppKit                        	       0x19f8a4a34 _DPSNextEvent
23  AppKit                        	       0x1a0243940 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
24  AppKit                        	       0x19f897be4 -[NSApplication run]
25  Electron Framework            	       0x10e56d33c base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*)
26  Electron Framework            	       0x10e56d154 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*)
27  Electron Framework            	       0x10deef06c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta)
28  Electron Framework            	       0x10e010a28 base::RunLoop::Run(base::Location const&)
29  Electron Framework            	       0x10e76656c content::BrowserMainLoop::RunMainMessageLoop()
30  Electron Framework            	       0x10e7664bc content::BrowserMainRunnerImpl::Run()
31  Electron Framework            	       0x10e7c7ff4 content::BrowserMain(content::MainFunctionParams)
32  Electron Framework            	       0x10e7c7efc content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*)
33  Electron Framework            	       0x10e3deec4 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool)
34  Electron Framework            	       0x10e3db848 content::ContentMainRunnerImpl::Run()
35  Electron Framework            	       0x10e662054 content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*)
36  Electron Framework            	       0x10e661a14 content::ContentMain(content::ContentMainParams)
37  Electron Framework            	       0x10f124260 ElectronMain
38  dyld                          	       0x19b4fab98 start

Release Notes

Notes: fix crash when creating event object for ipc events

@deepak1556 deepak1556 requested a review from ckerr November 16, 2025 14:36
@deepak1556 deepak1556 added semver/patch backwards-compatible bug fixes target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. labels Nov 16, 2025
@electron-cation electron-cation bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Nov 16, 2025
@jkleinsc jkleinsc merged commit 530be28 into main Nov 17, 2025
112 of 113 checks passed
@jkleinsc jkleinsc deleted the robo/fix_internal_event_crash branch November 17, 2025 20:28
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Nov 17, 2025

Release Notes Persisted

fix crash when creating event object for ipc events

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Nov 17, 2025

I have automatically backported this PR to "40-x-y", please check out #48991

@trop trop bot added in-flight/40-x-y and removed target/40-x-y PR should also be added to the "40-x-y" branch. labels Nov 17, 2025
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Nov 17, 2025

I have automatically backported this PR to "39-x-y", please check out #48992

@trop trop bot added in-flight/39-x-y merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. and removed target/39-x-y PR should also be added to the "39-x-y" branch. in-flight/39-x-y in-flight/40-x-y labels Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants