Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Upgrade to Electron v0.30.6 - #7877

Merged
nathansobo merged 42 commits into
masterfrom
tj-electron-29
Sep 8, 2015
Merged

nathansobo merged 42 commits into
masterfrom
tj-electron-29

Conversation

@thomasjo

Copy link
Copy Markdown
Contributor

This is a continuation of #6877.

Blocking issues

  • Building with io.js v2.x is not supported.
  • Crash caused by invalid memory access during exit/closing window.
  • 8 failing spec assertions.
  • In OS X closing all windows exits the application.
  • Building on Linux (Ubuntu 12.04.5 LTS) is failing due to compilation errors.
  • Failing settings-view specs.
  • apm builds incompatible native modules.
  • Experiment with upgrading to Electron v0.31.x.
    Conclusion: Not viable in this PR since it requires bumping every single dependency to NAN 2.x.
  • Wait until Allow user to rebuild incompatible packages against the current version of Atom incompatible-packages#9 is ready to merge.
  • Preserve CustomEvent as type of object dispatched by command registry
  • Investigate why symbols-view is failing to find any symbols
  • Investigate extremely long paint times for cursor movement on first-gen MBP retinas

Issue details

Building with io.js v2.x is not supported

Resolution: Do not update npm. The version shipped with io.js is patched to work around the problems with node-gyp.

Any attempt to execute script/build when using io.js v2.x fails with

Installing build modules...
gyp ERR! configure error
gyp ERR! stack Error: 404 response downloading https://nodejs.org/dist/v2.4.0/node-v2.4.0.tar.gz
gyp ERR! stack     at Request.<anonymous> (/Users/thomasjo/.nvm/versions/io.js/v2.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:251:14)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:169:7)
gyp ERR! stack     at Request.onRequestResponse (/Users/thomasjo/.nvm/versions/io.js/v2.4.0/lib/node_modules/npm/node_modules/request/request.js:985:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:169:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:305:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "/Users/thomasjo/.nvm/versions/io.js/v2.4.0/bin/iojs" "/Users/thomasjo/.nvm/versions/io.js/v2.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/thomasjo/Code/atom/atom-electron/build/node_modules/runas
gyp ERR! node -v v2.4.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

Crash caused by invalid memory access during exit/closing window

Resolution: Solved in Electron v0.30.2.
Full crash log.
The problem is a bit tricky to reproduce, but when it occurs it happens when a window is closed or when exiting Atom, which leads me to believe the problem is related to storing state. Seems like the crash is caused by a nullptr reference.

8 failing spec assertions

Full output from apm test. Summary of failing specs;

command-registry-spec.coffee
package-manager-spec.coffee

All failures originate from it triggers the activation event on all handlers registered during activation.

  • Expected 0 to be 1.
  • Expected 0 to be 1.
  • Expected 0 to be 1.
  • Expected 0 to be 2.
  • Expected 0 to be 2.
  • Expected 0 to be 1.
pane-container-view-spec.coffee
  • Expected [ undefined ] to equal [ { 0 : HTMLNode, element : <getter>, activeItemModifiedChanged : Function, ... at pane-container-view-spec.coffee:60:21.

In OS X closing all windows exits the application

Resolution: Side-effect of crashing problem. Resolved in Electron v0.30.2.

When running against atom-shell v0.22.3 Atom behaves as expected and leaves the application running even after all application windows have been closed. When running against Electron v0.30.0 however, after all windows have been closed the application exits.

Building on Linux (Ubuntu 12.04.5 LTS) is failing due to compilation errors

Resolution: Using GCC 4.7+, or Clang 3.0+. Also fixed in CI by ensuring the usage of Clang instead of GCC.

Attempts to build on Ubuntu 12.04.5 LTS (64-bit) fails while compiling npm modules, throwing errors similar to

gyp ERR! cwd /home/travis/build/atom/atom/node_modules/oniguruma
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
In file included from /home/travis/.atom/.node-gyp/.node-gyp/0.30.1/src/node.h:42:0,
                 from ../node_modules/nan/nan.h:24,
                 from ../src/repository.h:29,
                 from ../src/repository.cc:22:
/home/travis/.atom/.node-gyp/.node-gyp/0.30.1/deps/v8/include/v8.h:543:1: error: expected unqualified-id before ‘using’
/home/travis/.atom/.node-gyp/.node-gyp/0.30.1/deps/v8/include/v8.h:922:1: error: expected unqualified-id before ‘using’

The compilation failure is caused by the fact that GCC 4.7 or newer is required due to V8 using the template alias feature in C++, and that is not supported in GCC 4.6.3 which is the newest GCC (officially) available in Ubuntu 12.04.5 LTS.

Solution: Compile with Clang 3.4 on Ubuntu 12.04.5 LTS;

$ sudo apt-get install clang-3.4
$ CXX=clang++ script/build

For Travis CI support, we should specify compiler: clang in .travis.yml. (http://docs.travis-ci.com/user/languages/c/#Choosing-compilers-to-test-against)

Failing settings-view specs

Resolution: Fixed bugs in settings-view [email protected].

ThemesPanel
  when a UI theme is selected
    it updates the 'core.themes' config key with the selected UI theme
      Expected [ 'atom-dark-syntax' ] to equal [ 'atom-light-ui', 'atom-dark-syntax' ]. (spec/themes-panel-spec.coffee:53:46)
  when a syntax theme is selected
    it updates the 'core.themes' config key with the selected syntax theme
      Expected [ 'atom-dark-ui' ] to equal [ 'atom-dark-ui', 'atom-light-syntax' ]. (spec/themes-panel-spec.coffee:58:46)
  when the 'core.config' key changes
    it refreshes the theme menus
      Expected 'atom-dark-ui' to be 'atom-light-ui'. (spec/themes-panel-spec.coffee:69:36)
      Expected 'atom-dark-syntax' to be 'atom-light-syntax'. (spec/themes-panel-spec.coffee:70:40)


Finished in 17.811 seconds
101 tests, 440 assertions, 4 failures, 0 skipped

apm builds incompatible native modules.

Resolution: Solved by apm v1.0.3.

When apm builds native modules they end up incompatible with Atom. See #7877 (comment) for more details.

Other potential problems

  1. Currently it does not seem like it's possible to use this build of Atom as a Git editor; closing the spawned window does not result in the process exiting as expected it seems like, and thus leaves the Git terminal process waiting for the input sequence to end.
    This is possibly related to issue In OS X closing all windows exits the application.
    Resolved by upgrading to Electron v0.30.2.

Fixes #6335
Fixes #3826
Fixes #7502
Fixes #3636
Fixes #6243
Fixes #6306
Fixes #6219
Fixes #7811
Fixes #7374
Fixes #8309
Fixes #6513

@thomasjo thomasjo self-assigned this Jul 13, 2015
@thomasjo
thomasjo force-pushed the tj-electron-29 branch 2 times, most recently from 24cc15b to a791809 Compare July 13, 2015 21:35
@jlord

jlord commented Jul 15, 2015

Copy link
Copy Markdown

Woot! I ran the branch on my ARM Chromebook, got the same errors you mention, but it did everything before then which is great, had trouble building #6877.

@lee-dohm

Copy link
Copy Markdown
Contributor

I've been using this branch lightly this morning. Haven't had any issues so far.

ares: "1.10.1-DEV"
atom-shell: "0.29.2"
chrome: "43.0.2357.65"
electron: "0.29.2"
http_parser: "2.5.0"
modules: "44"
node: "2.3.1"
openssl: "1.0.2c"
uv: "1.6.1"
v8: "4.3.61.21"
zlib: "1.2.8"

@lee-dohm

Copy link
Copy Markdown
Contributor

Started running into an issue. Here's what I did. Haven't tried to generalize or minimize the repro yet, but wanted to get this out there.

Repro Steps

  1. git revert HEAD → launches a new window
  2. Save with Cmd+S
  3. Close window with Cmd+Shift+W

Expected: Atom closes the window but does not exit
Actual: Atom closes the window and then crashes

No matter how I close the window, Atom crashes.

Crash logs are here: https://gist.github.com/lee-dohm/12798a98827934084766

@thomasjo

Copy link
Copy Markdown
Contributor Author

No matter how I close the window, Atom crashes.

Crash logs are here: https://gist.github.com/lee-dohm/12798a98827934084766

Yeah that's the same type of crash I've been getting all along. I've tried safe mode which doesn't help. Might try soft-nuking the entire .atom folder to see if it's related to persisted state. It definitely looks like a memory leak or an invalid pointer since we're seeing

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

I haven't been able to track down the exact issue yet. Maybe @zcbenz has any idea based on the crash log?

@zcbenz

zcbenz commented Jul 20, 2015

Copy link
Copy Markdown
Contributor

@thomasjo You can revert 2818cd1 and 9f7b8cf since they were a try to make V8 snapshot work in Atom but didn't work well. I'll look into the crash.

@thomasjo

Copy link
Copy Markdown
Contributor Author

@zcbenz Thanks, I rebased the branch and yanked out the snapshot commits.

The crash problem seems much harder to reproduce after the rebase. Whether coincidental or not, is unknown to me at this point.

@thomasjo

Copy link
Copy Markdown
Contributor Author

I'm having problems using Atom as a "Git Editor" using this branch; quitting the Atom instance spawned via e.g. git commit seems to just leave Git waiting for the process to exit. Can anyone else reproduce that behavior?

@benogle benogle mentioned this pull request Jul 20, 2015
@thomasjo thomasjo changed the title Upgrade to Electron v0.29.2 Upgrade to Electron v0.30.0 Jul 24, 2015
@thomasjo
thomasjo force-pushed the tj-electron-29 branch 2 times, most recently from ba082b0 to ee09dc6 Compare July 28, 2015 14:54
@mnquintana mnquintana mentioned this pull request Jul 28, 2015
@thomasjo thomasjo changed the title Upgrade to Electron v0.30.0 Upgrade to Electron v0.30.1 Jul 28, 2015
@thomasjo

Copy link
Copy Markdown
Contributor Author

The (temporary) hack I added in 1982167, fixes the failing core specs. There are still failing package specs though (archive-view and settings-view).

@thomasjo

Copy link
Copy Markdown
Contributor Author

@zcbenz Have you had a chance to investigate the crash? Also, has anything changed in Electron on OS X since v0.22.3 with regards to closing last window also exiting the application? Thanks 🙇

@thomasjo

Copy link
Copy Markdown
Contributor Author

Compiling with Clang 3.4 seems to have resolved the compilation issues on Ubuntu 12.04.5 LTS.

@nathansobo
nathansobo merged commit 9a129c2 into master Sep 8, 2015
@nathansobo
nathansobo deleted the tj-electron-29 branch September 8, 2015 15:41
@nathansobo

Copy link
Copy Markdown
Contributor

Thanks everyone for your patience. Onward and upward. 📈

@wzxu

wzxu commented Sep 8, 2015

Copy link
Copy Markdown

Kudos guys! Can't wait for the next version to land so I can use Atom in VM again. Wonder if there's any performance gain as well upgrading Chrome?

@anaisbetts

Copy link
Copy Markdown
Contributor

👏 👏 👏 👏 👏 👏 👏 👏 👏 👏

@despairblue

Copy link
Copy Markdown

🎆 now I can change my default browser back to chrome 🙇

@capouch

capouch commented Sep 8, 2015

Copy link
Copy Markdown

@despairblue is it working all right for you? It does not work in my VirtualBox instance. The previous versions were workable but lacked click-drag-select. My initial testing with this one does not show any difference; I still can't do it.

@sLite

sLite commented Sep 8, 2015

Copy link
Copy Markdown

@capouch I built directly from this branch today before it got merged, worked like a charm on Arch Linux in a VirtualBox.

@zackarychapple

Copy link
Copy Markdown

Fantastic!! Good job!

@batjko

batjko commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

woot 🎆

@v3ss0n

v3ss0n commented Sep 8, 2015

Copy link
Copy Markdown

👏 🎬 🎬 🎬 🎬 🎬 🎬 🎬 🎬

@v3ss0n

v3ss0n commented Sep 8, 2015

Copy link
Copy Markdown

Bump Atom to 1.1! worth it!

@hastebrot

Copy link
Copy Markdown

@v3ss0n Hmm, does the update of Electron cause backwards-incompatible changes that justify a minor version bump?

@mehcode

mehcode commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

@v3ss0n Hmm, does the update of Electron cause backwards-incompatible changes that justify a minor version bump?

Because this just broke any native packages still on NAN 1.x.

@despairblue

Copy link
Copy Markdown

@capouch I was actually referring to this, which would lock up atom on linux when clicking a link if your default browser is chrome or chromium. Electron fixed this in April and this PR pulls these changes in.

I don't use atom in a VM so I can't say anything about this.

@capouch

capouch commented Sep 8, 2015

Copy link
Copy Markdown

@despairblue it built just fine for me, but actually runs worse than the previous version. I am running it on Slackware 64-bit VirtualBox 4.3.28, Electron 0.32.0 is also installed on the machine so maybe that is causing the issues, but the mouse sprites are all over the place, and click-drag unchanged from earlier. Built this afternoon from the github master.

@marciobda

Copy link
Copy Markdown

Awesome work! It built just fine for me too.
I´m running it on Ubuntu 14.04 VirtualBox 5.0.2

@capouch

capouch commented Sep 9, 2015

Copy link
Copy Markdown

@marciobda have you tested that you can click-drag to select text in the VM environment?

@marciobda

Copy link
Copy Markdown

Yes. I was watching this thread specifically because that click-drag problem in VMs.
And now it's works like a charm

@v3ss0n

v3ss0n commented Sep 9, 2015

Copy link
Copy Markdown

As far as i Understand , this will break any packages using NaN 1.x right? So yes 1.1 is appropriate i think.

@wzxu

wzxu commented Sep 9, 2015

Copy link
Copy Markdown

@v3ss0n I think only Electron 0.31.0+ breaks NaN 1.x, which is why they settled at 0.30.6 for now. See #7877 (comment).

@v3ss0n

v3ss0n commented Sep 9, 2015

Copy link
Copy Markdown

Ah i c.

@martgnz

martgnz commented Sep 10, 2015

Copy link
Copy Markdown

I just updated to 1.0.11 and I still have the click-drag problem. Ubuntu 15.04 on VirtualBox.

@jacobnbrum

Copy link
Copy Markdown

1.0.11 is still the old version.

@martgnz

martgnz commented Sep 10, 2015

Copy link
Copy Markdown

When is this going to be released?

@jacobnbrum

Copy link
Copy Markdown

@capouch

capouch commented Sep 11, 2015

Copy link
Copy Markdown

@marciobda what is your precise operating environment? It shouldn't matter that I have Electron 0.32.0 and a API v46 Chrome installed on the same VM? I'm running 64bit Slackware ("current" as of mid-August) on VirtualBox 4.3.28. It's actually worse now--the mouse sprite doesn't change properly as I navigate. Built from sources; the build itself went perfectly.

@hak8or

hak8or commented Sep 11, 2015

Copy link
Copy Markdown

I recommend making a new github issue or continuing issue #6306 for further discussion about this. While I used to have the same issue (I didn't get a chance to test from master yet), I am pretty sure the dev's who worked on things relevant to this specific pull request would prefer to keep things more organized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.