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 segmentation fault with glibc 2.28 #2484

Merged

Conversation

crakoucas
Copy link
Contributor

This is fix 🐛
ERRROR : [1] 7816 segmentation fault (core dumped) in Ubuntu 18.10 and i think all linux distro with glibc 2.28

Issue

package.json Outdated
@@ -121,7 +121,7 @@
"css-loader": "^0.19.0",
"devtron": "^1.1.0",
"dom-storage": "^2.0.2",
"electron": "2.0.7",
"electron": "2.0.9",
Copy link
Contributor

Choose a reason for hiding this comment

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

@crakoucas can you update it to the lastest one. Thx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem

@daiyam
Copy link
Contributor

daiyam commented Oct 10, 2018

@crakoucas I was thinking more about the v2.0.11 but v3.0.3 is even better.

But sadly, there is a small bug due to it (when the window is restored, its size is wrong).
Here the patch to fix it:

diff --git a/dev-scripts/dev.js b/dev-scripts/dev.js
index 000a1bfd..9698a2fe 100644
--- a/dev-scripts/dev.js
+++ b/dev-scripts/dev.js
@@ -49,7 +49,7 @@ function startServer () {
 }
 
 function startElectron () {
-  spawn(electron, ['--hot', './index.js'])
+  spawn(electron, ['--hot', './index.js'], { stdio: 'inherit' })
     .on('close', () => {
       server.close()
     })
diff --git a/lib/main-window.js b/lib/main-window.js
index fa54d5ce..86b70bea 100644
--- a/lib/main-window.js
+++ b/lib/main-window.js
@@ -14,6 +14,7 @@ const mainWindow = new BrowserWindow({
   y: windowSize.y,
   width: windowSize.width,
   height: windowSize.height,
+  useContentSize: true,
   minWidth: 500,
   minHeight: 320,
   autoHideMenuBar: showMenu,

@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label Oct 11, 2018
@crakoucas crakoucas force-pushed the fix-electron-glibc-segmentation-fault branch from 77ae44b to d87310b Compare October 11, 2018 07:02
@crakoucas
Copy link
Contributor Author

@daiyam Done, but i can't reproduce the bug at home. Can you test it ?

@crakoucas crakoucas changed the title fix semgmentation fault with glibc 2.28 fix segmentation fault with glibc 2.28 Oct 11, 2018
@crakoucas crakoucas force-pushed the fix-electron-glibc-segmentation-fault branch from d87310b to a845d2e Compare October 11, 2018 07:10
Electron to V 3.0.3
Electron-gh-release to V2.0.4
Fix Bug restore windows size
@crakoucas crakoucas force-pushed the fix-electron-glibc-segmentation-fault branch from a845d2e to a331d82 Compare October 11, 2018 07:40
@daiyam
Copy link
Contributor

daiyam commented Oct 11, 2018

@crakoucas it's good for me (on macOS).

@Rokt33r
Copy link
Member

Rokt33r commented Oct 11, 2018

I'll check this on Windows and Linux now.

@Rokt33r Rokt33r self-requested a review October 11, 2018 08:34
@Rokt33r
Copy link
Member

Rokt33r commented Oct 11, 2018

I confirmed it works well on Windows

@KaiNissen
Copy link

I can confirm that this patch fixes the startup issue on Ubuntu 18.10.

@matthew-nm
Copy link

I am having the same issue on Kubuntu 18.10. Is this fix going to be merged?

@ngamradt-turner
Copy link

Do we know when this fix will be merged in?

@Rokt33r
Copy link
Member

Rokt33r commented Nov 6, 2018

I'll merge and publish this fix in this weekend. @ngamradt-turner @matthew-nm

@Rokt33r
Copy link
Member

Rokt33r commented Nov 6, 2018

Btw sorry for being late... I'd just forgot about it... If you want something really badly, please ping me on our slack!

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

Successfully merging this pull request may close these issues.

7 participants