Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Mac OSX - Freeze - Grey Screen (in project using enchant.js) #7308

Open
ooJulien opened this issue Mar 24, 2014 · 19 comments
Open

Mac OSX - Freeze - Grey Screen (in project using enchant.js) #7308

ooJulien opened this issue Mar 24, 2014 · 19 comments

Comments

@ooJulien
Copy link

What happens:
The screen turns grey. Brackets does not respond anymore.

brackets_sprint37_greyscreenissue

How to reproduce:
There is no clear pattern to trigger this issue. Already happened while typing or navigating between applications.

Brackets version: Sprint 37
OS version: OSX Mavericks 10.9.2
Reproduced using the "reload without extensions" option.
Similar to: brackets-userland/brackets-git#149

@IjzerenHein
Copy link

I'm having the same problem. It seems to have started yesterday when I was using Brackets 36. Upgraded to 37 and also rebooted, problem remains. It happens quite often, sometimes after 2 minutes, the last time after 30 minutes. I seem to have collected quite a few crash-reports on my system, I will try to attach them to this issue.

Edit: I can't find how to attach a zip-file. I have a zip-file with about 10 crash-reports regarding this issue sitting here. Here is a dump of the last crash (I checked the other crashes and they also show that the WebCore: Worker thread crashes):

(pflynn: Edit: moved to https://gist.github.com/peterflynn/ce072a1ab1ea7d550b2c to improve readability)

@njx
Copy link
Contributor

njx commented Mar 25, 2014

Marking high priority - we should try to symbolize this stack trace.

@njx
Copy link
Contributor

njx commented Mar 25, 2014

@IjzerenHein - you can't upload zip files unfortunately, but maybe you could paste a few more stack traces into gists on gist.github.com and post links to them here. Thanks!

@IjzerenHein
Copy link

@njx - I've placed the crash dumps here: https://gist.github.com/IjzerenHein/9766462
GL

@njx
Copy link
Contributor

njx commented Mar 25, 2014

@dangoor - it looks like this is in the Tern worker, so assigning to you.

@IjzerenHein - thanks!

@peterflynn
Copy link
Member

@IjzerenHein Is it possible to estimate how many .js files are in your project, and how many KB/MB those files comprise in total? Do you have a large set of node_modules or any large minified JS libraries in your project, by any chance?

@IjzerenHein
Copy link

@peterflynn, Yes there are quite a bit of files, see this gist: https://gist.github.com/IjzerenHein/9773968

It basically consists of the ionic seed project:
http://ionicframework.com/getting-started/

@RaymondLim
Copy link
Contributor

Seems to be related to #7262.

@IjzerenHein
Copy link

After reading #7262, I took some screenshots of the activity monitor. It seems to be related to the Brackets Helper:

screen shot 2014-03-26 at 09 29 38
screen shot 2014-03-26 at 09 29 49

@bchintx
Copy link
Contributor

bchintx commented Mar 31, 2014

@ooJulien Can you please take a look at #7262 and see if the excluding directories workaround solves your problem too? It appears that it addresses @IjzerenHein's reported issue, but we want to hear from you before deciding how to handle this specific issue. Thanks!

@ooJulien
Copy link
Author

ooJulien commented Apr 1, 2014

@bchintx I am going to need some help to try this workaround as I do not know how to implement it in my project (beginner here...) :(

Not sure I am having the same issue on my side though: the only framework I am using is enchant.js and my main.js file was still small the first time I encountered this issue.

main.js:
enchant();
var game;
 
window.onload = function() {
       game = new Core(320, 320);
       game.onload = function() {
                  
       };
       game.start();
};

My project folder only includes three files: enchant.js, main.js and an index.html
I also managed to reproduce the crash with an almost empty .js file. I only wrote var one = 1; then waited for a few minutes before it crashed.

@dangoor
Copy link
Contributor

dangoor commented Apr 1, 2014

@ooJulien Thanks for the details about your project. That will help, especially if I can reproduce what you're seeing.

Just to double check something: was the enchant.js the uncompressed enchant.js or is it enchant.min.js? I'm trying to reproduce the issue with enchant.js.

@dangoor
Copy link
Contributor

dangoor commented Apr 1, 2014

So far, running release 37 on Mac OS 10.9.2, with main.js as above and enchant.js, I have been unable to reproduce the crash and I'm even getting decent code hints when I type game. within that window.onload

@ooJulien
Copy link
Author

ooJulien commented Apr 1, 2014

@dangoor I was using the uncompressed enchant.js when it happened.
Is there any other information I can provide to help?

@dangoor
Copy link
Contributor

dangoor commented Apr 2, 2014

@ooJulien I'm still not able to reproduce this crash. One thing I will say is that it's not dissimilar to others we've seen and I'm hoping that rearchitecting our JS code hints integration will allow us to reduce the impact.

In the meantime, you could add enchant.js to excluded files in the JS code hints. It's sad that you won't get code hints for that, but it's better than crashing...

@dangoor
Copy link
Contributor

dangoor commented Apr 7, 2014

Adjusting priority to medium, as this is similar to other issues we've seen.

@peterflynn peterflynn changed the title Mac OSX - Freeze - Grey Screen Mac OSX - Freeze - Grey Screen (in project using enchant.js) May 2, 2014
@peterflynn
Copy link
Member

The issue @IjzerenHein mentioned is definitely a dupe of #7262 (Ionic related crashes), so I've retitled this to describe @ooJulien's issue more specifically

@fdecampredon
Copy link

I know it will seems weird but I had similar issue with tern worker moving to very high CPU (like 600%) on mac os, and sometimes crash, I debugged a bit the tern worker and it seems that onProtoProp and broadcastProps in tern was looping on a prop named 'ReactTools' I updated a bit the file and everything worked but that tern worker if very unstable, the original file was :

var ReactTools = require('react-tools');  
module.exports = { 
  process: function (src, path) {     
    if (path.indexOf('node_modules') === -1) {
      return ReactTools.transform(src, {harmony: true, stripTypes: true});   
    }
    return src;
  } 
};

after updating it to :

var ReactTools = require('react-tools');  
function process (src, path) {     
  if (path.indexOf('node_modules') === -1) {
    return ReactTools.transform(src, {harmony: true, stripTypes: true});   
  }
  return src;
} 

module.exports = { process: process};

it worked, my project is a bit strange (it use flow file with type annotations guess it's not helping acorn) has a lot of node_modules.

@dangoor
Copy link
Contributor

dangoor commented Dec 2, 2014

I have noticed that it does not always seem to halt on a file with a real problem. I would guess that Flow type annotations would indeed confuse Acorn.

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

No branches or pull requests

9 participants