Skip to content

fix: properly fire serial-port-added and serial-port-removed events - #34958

Merged
jkleinsc merged 1 commit into
mainfrom
fix-serial-device-changed-events
Jul 25, 2022
Merged

fix: properly fire serial-port-added and serial-port-removed events#34958
jkleinsc merged 1 commit into
mainfrom
fix-serial-device-changed-events

Conversation

@jkleinsc

@jkleinsc jkleinsc commented Jul 18, 2022

Copy link
Copy Markdown
Member

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 recently label Jul 18, 2022
@zcbenz zcbenz added the semver/patch backwards-compatible bug fixes label Jul 19, 2022

@codebytere codebytere left a comment

Copy link
Copy Markdown
Member

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.

Comment thread shell/browser/serial/serial_chooser_controller.cc
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently 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
Copy Markdown
Member Author

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

@jkleinsc

Copy link
Copy Markdown
Member 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

release-clerk Bot commented Jul 25, 2022

Copy link
Copy Markdown

Release Notes Persisted

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

@trop

trop Bot commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

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

trop Bot commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

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