Skip to content

[Bug]: Tray setImage can segfault on Linux #36274

Closed

Description

@nicks

Preflight Checklist

Problem Description

We've been tracking down reports for a while about our app segfaulting on Linux. We narrowed down the issue to calling Tray's setImage function. More discussion on the issue here:

libayatana-appindicator
https://github.com/AyatanaIndicators/libayatana-appindicator/issues/51

Unfortunately, we can't guarantee that our users have a fixed version of the shared library installed. So we've removed all calls to Tray's setImage, to ensure that their apps don't crash randomly.

Proposed Solution

We humbly request that the docs should contain a note about this problem - that setImage is known to cause segfaults, and should not be used on Linux.

https://www.electronjs.org/docs/latest/api/tray

Alternatives Considered

Have some code in Electron to detect when broken versions of the shared library are used, and avoid calling into it. But this seemed way more complex to implement.

Additional Information

Thanks!

Activity

  1. changed the title [-][Feature Request]: docs - add a note that Tray setImage can segfault on Linux[/-] [+]docs - add a note that Tray setImage can segfault on Linux[/+] on Nov 8, 2022
  2. zcbenz commented on Nov 8, 2022

    @zcbenz
    Contributor

    I'm good adding the note in our docs, but in the long term I think we should get rid of libappindicator and use dbus directly.

  3. nicks commented on Nov 10, 2022

    @nicks
    Author

    opened a pr as #36310

  4. Atharva-17 commented on Nov 23, 2022

    @Atharva-17

    Hey, @nicks I added a note in tray.md please check opened a PR as #36432

  5. changed the title [-]docs - add a note that Tray setImage can segfault on Linux[/-] [+][Bug]: Tray setImage can segfault on Linux[/+] on Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions