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

Crash when closing desktop notification on Windows #15251

Closed
dbkr opened this issue Oct 18, 2018 · 3 comments
Closed

Crash when closing desktop notification on Windows #15251

dbkr opened this issue Oct 18, 2018 · 3 comments

Comments

@dbkr
Copy link
Contributor

dbkr commented Oct 18, 2018

  • Output of node_modules/.bin/electron --version: 3.0.4
  • Operating System (Platform and Version): Windows 7, 32 & 64 bit
  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): 2.0.8

Expected Behavior
Calling .close() on a Notification object should cause the notification to no longer be shown to the user, or if it isn't shown, do nothing.

Actual behavior
Calling .close() on a Notification object after having displayed a notification will cause the electron process to crash with a null pointer exception.

To Reproduce
Clone and run https://github.com/dbkr/electron-quick-start then click the button labelled 'crash'.

Basically, show 2 notifications with the same 'tag' using new global.Notification(). Observe that the onclose handler of the first notification is called when the second is displayed. When calling .close() on the second notification (ie. the one whose onclose has not been called), electron will crash with a NPE in desktop_notification_controller.cc:374 - if (data_->controller) in DesktopNotificationController::Notification::Close().

Screenshots
None

Additional Information
After electron crashes, it also seems to leave an electron.exe in the background using about 20% of a core.

@welcome
Copy link

welcome bot commented Oct 18, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

dbkr added a commit to dbkr/electron-quick-start that referenced this issue Oct 18, 2018
@dbkr
Copy link
Contributor Author

dbkr commented Oct 18, 2018

I've added a minimal repo that demonstrates this. It turns out it only happens when displaying multiple notifications with the same 'tag'. I've updated the description appropriately.

This isn't reproducible with 4.0.0-beta.3, and it turns out we were using tag erroneously anyway, so this is no longer an issue for us.

@sofianguy
Copy link
Contributor

If it is fixed in version 4.x, please upgrade. We are no longer supporting versions earlier than v4.2.x. Let us know if this is still an issue for you and we'd be happy to reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants