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

fix(electron): potential crash on quit #8829

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

pengx17
Copy link
Collaborator

@pengx17 pengx17 commented Nov 14, 2024

fix AF-1696

Related log:

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0   Electron Framework            	       0x10c3bb09c electron::MessagePort::Close()
1   Electron Framework            	       0x10c3bcb78 gin::internal::Dispatcher<void (electron::MessagePort*)>::DispatchToCallbackImpl(gin::Arguments*)
2   Electron Framework            	       0x10c3bc984 gin::internal::Dispatcher<void (electron::MessagePort*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&)
3   ???                           	       0x147e0f58c ???
4   ???                           	       0x147e0d45c ???
5   ???                           	       0x147e0d45c ???
6   ???                           	       0x147e0d45c ???
7   ???                           	       0x1401743b8 ???
8   ???                           	       0x147e0b088 ???
9   ???                           	       0x147e0acd4 ???
10  Electron Framework            	       0x10d657578 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*)
11  Electron Framework            	       0x10d53e478 v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)
12  Electron Framework            	       0x11337ad34 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context)
13  Electron Framework            	       0x11337b0b0 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context)
14  Electron Framework            	       0x10c46d9dc gin_helper::internal::CallMethodWithArgs(v8::Isolate*, v8::Local<v8::Object>, char const*, base::span<v8::Local<v8::Value>, 18446744073709551615ul, v8::Local<v8::Value>*>)
15  Electron Framework            	       0x10c3833b0 bool gin_helper::EventEmitterMixin<electron::api::WebContents>::Emit<>(std::__Cr::basic_string_view<char, std::__Cr::char_traits<char>>)
16  Electron Framework            	       0x10c38324c electron::api::WebContents::WebContentsDestroyed()
17  Electron Framework            	       0x10ebc2ee8 void content::WebContentsImpl::WebContentsObserverList::NotifyObservers<void (content::WebContentsObserver::*)()>(void (content::WebContentsObserver::*)())
18  Electron Framework            	       0x10ebc229c content::WebContentsImpl::~WebContentsImpl()
19  Electron Framework            	       0x10ebc32b0 content::WebContentsImpl::~WebContentsImpl()
20  Electron Framework            	       0x10c4212dc electron::InspectableWebContents::~InspectableWebContents()
21  Electron Framework            	       0x10c4213ac electron::InspectableWebContents::~InspectableWebContents()
22  Electron Framework            	       0x10c382ffc electron::api::WebContents::~WebContents()
23  Electron Framework            	       0x10c383498 non-virtual thunk to electron::api::WebContents::~WebContents()
24  Electron Framework            	       0x10c46cb80 gin_helper::CleanedUpAtExit::DoCleanup()
25  Electron Framework            	       0x10c3ec994 electron::JavascriptEnvironment::DestroyMicrotasksRunner()
26  Electron Framework            	       0x10c3d2828 electron::ElectronBrowserMainParts::PostMainMessageLoopRun()
27  Electron Framework            	       0x10e663458 content::BrowserMainLoop::ShutdownThreadsAndCleanUp()
28  Electron Framework            	       0x10e664a80 content::BrowserMainRunnerImpl::Shutdown()
29  Electron Framework            	       0x10e661098 content::BrowserMain(content::MainFunctionParams)
30  Electron Framework            	       0x10c6339a4 content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*)
31  Electron Framework            	       0x10c634968 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool)
32  Electron Framework            	       0x10c6347e8 content::ContentMainRunnerImpl::Run()
33  Electron Framework            	       0x10c633208 content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*)
34  Electron Framework            	       0x10c6332f0 content::ContentMain(content::ContentMainParams)
35  Electron Framework            	       0x10c2e98c0 ElectronMain
36  dyld                          	       0x18b5a8274 start

Copy link

graphite-app bot commented Nov 14, 2024

Your org has enabled the Graphite merge queue for merging into canary

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Collaborator Author

pengx17 commented Nov 14, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the app:electron Related to electron app label Nov 14, 2024
@pengx17 pengx17 marked this pull request as ready for review November 14, 2024 12:37
Copy link

nx-cloud bot commented Nov 14, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit df99e2c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.30%. Comparing base (18089c7) to head (ef39fbf).

Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #8829      +/-   ##
==========================================
+ Coverage   70.24%   70.30%   +0.05%     
==========================================
  Files         550      550              
  Lines       33978    33978              
  Branches     3052     3052              
==========================================
+ Hits        23869    23887      +18     
+ Misses       9737     9719      -18     
  Partials      372      372              
Flag Coverage Δ
server-test 77.21% <ø> (+0.06%) ⬆️
unittest 46.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

graphite-app bot commented Nov 15, 2024

Merge activity

fix AF-1696

Related log:
```
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0   Electron Framework            	       0x10c3bb09c electron::MessagePort::Close()
1   Electron Framework            	       0x10c3bcb78 gin::internal::Dispatcher<void (electron::MessagePort*)>::DispatchToCallbackImpl(gin::Arguments*)
2   Electron Framework            	       0x10c3bc984 gin::internal::Dispatcher<void (electron::MessagePort*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&)
3   ???                           	       0x147e0f58c ???
4   ???                           	       0x147e0d45c ???
5   ???                           	       0x147e0d45c ???
6   ???                           	       0x147e0d45c ???
7   ???                           	       0x1401743b8 ???
8   ???                           	       0x147e0b088 ???
9   ???                           	       0x147e0acd4 ???
10  Electron Framework            	       0x10d657578 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*)
11  Electron Framework            	       0x10d53e478 v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)
12  Electron Framework            	       0x11337ad34 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context)
13  Electron Framework            	       0x11337b0b0 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context)
14  Electron Framework            	       0x10c46d9dc gin_helper::internal::CallMethodWithArgs(v8::Isolate*, v8::Local<v8::Object>, char const*, base::span<v8::Local<v8::Value>, 18446744073709551615ul, v8::Local<v8::Value>*>)
15  Electron Framework            	       0x10c3833b0 bool gin_helper::EventEmitterMixin<electron::api::WebContents>::Emit<>(std::__Cr::basic_string_view<char, std::__Cr::char_traits<char>>)
16  Electron Framework            	       0x10c38324c electron::api::WebContents::WebContentsDestroyed()
17  Electron Framework            	       0x10ebc2ee8 void content::WebContentsImpl::WebContentsObserverList::NotifyObservers<void (content::WebContentsObserver::*)()>(void (content::WebContentsObserver::*)())
18  Electron Framework            	       0x10ebc229c content::WebContentsImpl::~WebContentsImpl()
19  Electron Framework            	       0x10ebc32b0 content::WebContentsImpl::~WebContentsImpl()
20  Electron Framework            	       0x10c4212dc electron::InspectableWebContents::~InspectableWebContents()
21  Electron Framework            	       0x10c4213ac electron::InspectableWebContents::~InspectableWebContents()
22  Electron Framework            	       0x10c382ffc electron::api::WebContents::~WebContents()
23  Electron Framework            	       0x10c383498 non-virtual thunk to electron::api::WebContents::~WebContents()
24  Electron Framework            	       0x10c46cb80 gin_helper::CleanedUpAtExit::DoCleanup()
25  Electron Framework            	       0x10c3ec994 electron::JavascriptEnvironment::DestroyMicrotasksRunner()
26  Electron Framework            	       0x10c3d2828 electron::ElectronBrowserMainParts::PostMainMessageLoopRun()
27  Electron Framework            	       0x10e663458 content::BrowserMainLoop::ShutdownThreadsAndCleanUp()
28  Electron Framework            	       0x10e664a80 content::BrowserMainRunnerImpl::Shutdown()
29  Electron Framework            	       0x10e661098 content::BrowserMain(content::MainFunctionParams)
30  Electron Framework            	       0x10c6339a4 content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*)
31  Electron Framework            	       0x10c634968 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool)
32  Electron Framework            	       0x10c6347e8 content::ContentMainRunnerImpl::Run()
33  Electron Framework            	       0x10c633208 content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*)
34  Electron Framework            	       0x10c6332f0 content::ContentMain(content::ContentMainParams)
35  Electron Framework            	       0x10c2e98c0 ElectronMain
36  dyld                          	       0x18b5a8274 start
```
@Brooooooklyn Brooooooklyn force-pushed the xp/11-14-fix_electron_potential_crash_on_quit branch from ef39fbf to df99e2c Compare November 15, 2024 02:58
@graphite-app graphite-app bot merged commit df99e2c into canary Nov 15, 2024
47 checks passed
@graphite-app graphite-app bot deleted the xp/11-14-fix_electron_potential_crash_on_quit branch November 15, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:electron Related to electron app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants