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: properly fire serial-port-added and serial-port-removed events #34958

Merged
merged 1 commit into from Jul 25, 2022

Conversation

jkleinsc
Copy link
Contributor

@jkleinsc jkleinsc commented Jul 18, 2022

Description of Change

Closes #34887.

Checklist

Release Notes

Notes: fixed serial-port-added and serial-port-removed events not firing.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jul 18, 2022
@zcbenz zcbenz added the semver/patch backwards-compatible bug fixes label Jul 19, 2022
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It look like the tests themselves pass but then in the dtor there's a crash:

Received signal 11 <unknown> 000000000000
0   Electron Framework                  0x0000000123eb0952 base::debug::CollectStackTrace(void**, unsigned long) + 18
1   Electron Framework                  0x0000000123dcd413 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x0000000123eb08a1 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 1345
3   libsystem_platform.dylib            0x00007ff803414dfd _sigtramp + 29
4   Electron Framework                  0x0000000125dbcb25 mojo::core::ports::Node::AcceptEvent(mojo::core::ports::NodeName const&, std::Cr::unique_ptr<mojo::core::ports::Event, std::Cr::default_delete<mojo::core::ports::Event>>) + 2277
5   Electron Framework                  0x0000000123e22b21 base::ScopedValidateSequenceChecker::ScopedValidateSequenceChecker(base::SequenceCheckerImpl const&) + 33
6   Electron Framework                  0x0000000123df0e97 base::internal::WeakReference::IsValid() const + 39
7   Electron Framework                  0x000000011f3e6dc8 base::ObserverList<content::SerialDelegate::Observer, false, true, base::internal::CheckedObserverAdapter>::RemoveObserver(content::SerialDelegate::Observer const*) + 104
8   Electron Framework                  0x000000011f3e90d7 electron::SerialChooserController::~SerialChooserController() + 327
9   Electron Framework                  0x000000011f3e566c electron::ElectronSerialDelegate::~ElectronSerialDelegate() + 124
10  Electron Framework                  0x000000011f37dbce electron::ElectronBrowserClient::~ElectronBrowserClient() + 190
11  Electron Framework                  0x000000011f37dc6e electron::ElectronBrowserClient::~ElectronBrowserClient() + 14
12  Electron Framework                  0x000000011f27c850 ElectronMain + 192
13  dyld                                0x000000010966651e start + 462
[end of stack trace]
✗ Electron tests failed with kill signal SIGSEGV.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jul 19, 2022
@jkleinsc jkleinsc force-pushed the fix-serial-device-changed-events branch from c4a1a66 to dfdb74d Compare July 21, 2022 18:13
@jkleinsc
Copy link
Contributor Author

The crash was resolved by following an approach similar to: [webhid] Notify chooser context observers on shutdown.

@jkleinsc
Copy link
Contributor Author

Merging as CI failure is known CI issue unrelated to this PR.

@jkleinsc jkleinsc merged commit 648c993 into main Jul 25, 2022
@jkleinsc jkleinsc deleted the fix-serial-device-changed-events branch July 25, 2022 14:50
@release-clerk
Copy link

release-clerk bot commented Jul 25, 2022

Release Notes Persisted

fixed serial-port-added and serial-port-removed events not firing.

@trop
Copy link
Contributor

trop bot commented Jul 25, 2022

I was unable to backport this PR to "17-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/17-x-y label Jul 25, 2022
@trop
Copy link
Contributor

trop bot commented Jul 25, 2022

I was unable to backport this PR to "18-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jul 25, 2022

I was unable to backport this PR to "19-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jul 25, 2022

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

schetle pushed a commit to schetle/electron that referenced this pull request Nov 3, 2022
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web Serial API removed and added events are never called
5 participants