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

Snap crashes with Segmentation fault (core dumped) #2981

Closed
kspearrin opened this issue Jun 4, 2018 · 27 comments
Closed

Snap crashes with Segmentation fault (core dumped) #2981

kspearrin opened this issue Jun 4, 2018 · 27 comments

Comments

@kspearrin
Copy link

kspearrin commented Jun 4, 2018

  • Version: ^20.15.1
  • Target: --linux --x64

We have been publishing our snap in the past without issue. We recently updated to electron 2.0.2 and builder 20.15.1 and now we get the following crash when trying to run a built snap. This seems to happen on Ubuntu 16, 17, and 18.

$ snap run myapp
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"

The Gtk errors are normal. A long pause of ~15 seconds happens. Then I see the app window appear for a split second and then.

Segmentation fault (core dumped)

This issue seems related, but was said to have been fixed.

Reference app: https://github.com/bitwarden/desktop

Building AppImage works and runs fine.

@DimitarNestorov
Copy link

@kspearrin Have you managed to fix it? I'm experiencing the same issue.

@develar
Copy link
Member

develar commented Jul 18, 2018

@DimitarNestorov Do you build on Linux?

@DimitarNestorov
Copy link

@develar No (I use the template, on macOS). But I will try that now

@develar
Copy link
Member

develar commented Jul 18, 2018

Ok... Please set env _REMOTE_BUILD=true does it help? If not, please "Is option useTemplateApp (under snap) help you?" (only on Linux or macOS with Docker).

@develar
Copy link
Member

develar commented Jul 18, 2018

If your app has native deps and no prebuild, you can build only on Linux.

@kspearrin
Copy link
Author

@DimitarNestorov @develar Have not found a fix yet. We build on Ubuntu.

@DimitarNestorov
Copy link

Tried _REMOTE_BUILD=true, didn't work.
Tried "useTemplateApp": true on Ubuntu, didn't work.
Tried "useTemplateApp": false on Ubuntu, 2 hours later, didn't work.

@develar
Copy link
Member

develar commented Jul 18, 2018

Do you have native deps?

@kspearrin
Copy link
Author

Yes, see the repo mentioned in the original issue: https://github.com/bitwarden/desktop

@DimitarNestorov
Copy link

DimitarNestorov commented Jul 18, 2018

Do you have native deps?

No.

@DimitarNestorov
Copy link

I'm using the package @sentry/electron@0.5.4 for error tracking. Calling it's init method is the cause of this error on my app.

@develar
Copy link
Member

develar commented Jul 19, 2018

@DimitarNestorov So, it is app specific issue?

@DimitarNestorov
Copy link

@kspearrin
Copy link
Author

@develar Any reason why this was closed? My original issue still remains. I am not using the referenced sentry-electron package.

@develar
Copy link
Member

develar commented Jul 20, 2018

@kspearrin "reply needed" was added to get answer from you. And now you have answered :)

@develar develar reopened this Jul 20, 2018
@DimitarNestorov
Copy link

I just tried building electron-quick-start with your snap configuration and it worked
image

You should check out your runtime code for something similar to my issue.

@develar
Copy link
Member

develar commented Jul 20, 2018

@kspearrin please check your app works as unpacked / AppImage.

@develar develar closed this as completed Jul 20, 2018
@kspearrin
Copy link
Author

@develar Yes, it does. We are distributing it already as an AppImage under that version.

@develar
Copy link
Member

develar commented Jul 20, 2018

@kspearrin have you tried useTemplateApp: false?

@kspearrin
Copy link
Author

@kspearrin
Copy link
Author

@develar Is there a way for me to get more feedback about what's crashing the app here other than just "Segmentation fault (core dumped)" . It doesn't seem to be very helpful.

@kspearrin
Copy link
Author

@develar Updated to electron 2.0.5 and builder ^20.25.0 , but it made no difference. Same problem still. Can this be reopened please?

@develar develar reopened this Jul 24, 2018
@kspearrin
Copy link
Author

kspearrin commented Jul 26, 2018

@develar I've spent today trying to debug this issue more.

I placed console.log message all throughout the app startup process and I can see that the main process executes without issue. The BrowserWindow is created, index.html loaded, and window.show() without any error.

Then Segmentation fault (core dumped) error happens when the window first appears and application crashes.

@DimitarNestorov
Copy link

Do you mind commenting the contents of the init method of src/main/powerMonitor.main.ts and test again?

@kspearrin
Copy link
Author

@DimitarNestorov It works now after commenting out the references to power monitor, which has references to desktop-idle (a native module). Thanks for the tip.

@develar Any reason why desktop-idle won't work with snaps anymore? It used to. Do I need to add some stage package for it? Their docs say:

Linux Requirements
X server development package and pkg-config are required:
apt install libxss-dev pkg-config

I have these installed on the local dev machine that I am building from.

@DimitarNestorov
Copy link

No, that is not the issue.
This is the issue: electron/electron#13767

@kspearrin
Copy link
Author

@DimitarNestorov Thanks. Fixed with bitwarden/desktop@fea8ab5 for now. Closing since this is an electron bug.

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

3 participants