-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] [CEF 2171] Crash on quit. #6905
Comments
Below is the call stack from the release build
|
|
I didn't try it and now I'm back to master. But I did debug it yesterday and it is our exit command that is quitting immediately instead of waiting for JS callback's return. I believe message handling/routing changes in cef 1750 are causing this behavior. |
I don't know much about the message handling/routing. I do know that the Can you try to dSym the stack? The CEF functions are nameless. |
I was wrong in guessing the possible cause to message handling/routing changes in cef 1750. I debug it in the old cef and I got the same breakpoints and Brackets still quit without a crash. When I debug the issue with some more breakpoints in cef 1750 shell, I got the following call stack when it crashes, but the main thread seems to be still alive. So the crash seems to be in the helper thread (or JS side). |
After realizing the crash is in JS side, I used bisect to locate between sprint-36 and sprint-37. It turns out that it is my commit adobe/brackets@4eee5ea that implements the new view states migration from the old pref. Apparently, the crash is the result of the shell code tearing down everything while the pref manager is still handling some fileIO by writing out some view states. |
How does that sound? |
Reminder: this is a CEF 1750 bug, so be sure to use the cc |
|
Marking Release 41 |
With PR #7930, the problem is greatly reduced and then seems to be a problem with Quiting while JS Code Hints engine is still initializing. See my notes here. |
|
Thanks I'll pass it on On Jun 16, 2014, at 8:24 PM, "Randy Edmunds" <notifications@github.commailto:notifications@github.com> wrote:
Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/7683#issuecomment-46263517. |
https://code.google.com/p/chromiumembedded/issues/detail?id=1319 |
Needs Review. If this only occurs on shutdown after startup it doesn't feel like a case that we should hold up the release for. I suggest Medium. Added Tracking and removed Fix in Progress labels. |
It's a little broader than that -- it can also happen if you shutdown after switching projects or selecting a file in a new folder (that JS Code Hints has not yet processed files for). |
Suggested next steps for whoever picks this up:
|
Side note: that same test app NJ suggested writing could also prove handy when we start investigating Find in Files performance & asynchrony -- understanding how a storm of |
I just tried on my win 7 today and was unable to reproduce the crash any more. I've been on jeff/cef_1750 branch for a long while. So to be sure I did re-run Update: after reviewing Randy's note in adobe/brackets#8062, I was able to reproduce it with a js file open in the working set. |
Based on Randy's note in pull request #8062, I used my new code hints pref implemented in my pull request #8272 to prevent JS code hints from running the Tern worker and was able to prevent the remaining crash issue. So if we're going to fix the remaining crash on our end, then we need to wait for the Tern worker to terminate before quitting. So we need to make JS code hint provider listen to the "beforeAppClose" event and then have an api to return a deferred object to the code that terminates Brackets. |
I created a small sample test app and it does crash when running in Brackets shell but not in a custom cefclient shell (with required appshell extension apis). So I tried to narrow down the actual crash issue in appshell apis and it seems to be the callback stack that causes the crash and not the file IO that we originally suspected. The following function can crash in Brackets when it is called before quitting the app.
I intentionally nested the three api calls to cause the crash. If I don't nest them, then no crash. |
|
|
I believe Randy's theory was that the problem was not the web worker but rather that JS code hints requests a lot of files, which is possible if our v8 extensions are the problem. |
|
The crash can happen only if we have three or more levels of nested callbacks (regardless of named or anonymous). Below is a rewrite of the sample code using named callbacks.
|
Closed since this is now tracked on the Backlog - https://trello.com/c/2codTAEZ/1364-brackets-7683-cef-1750-crash-on-quit-issue |
We should see if we can still reproduce this issue with branch 2171 |
This still repros in cef 2171 :( |
Tuesday Apr 29, 2014 at 03:45 GMT
Originally opened as adobe/brackets#7683
Launch Brackets and press Ctrl+Q to quit. You will get a crash with the message saying "Brackets has stopped working."
Workaround: click on 'X' button in the title bar to quit.
The text was updated successfully, but these errors were encountered: