-
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] Crash when trying to reload Brackets with or without extensions. #5841
Comments
Comment by RaymondLim Process: Brackets [11186] Date/Time: 2014-01-08 16:57:12.877 -0800 Interval Since Last Report: 372578 sec Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) VM Regions Near 0xc79c0a4f: Application Specific Information: Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread Thread 1:: Dispatch queue: com.apple.libdispatch-manager Thread 2:: NetworkConfigWatcher Thread 3:: DnsConfigService Thread 4:: Chrome_DBThread Thread 5:: Chrome_WebKitThread Thread 6:: Chrome_FileThread Thread 7:: Chrome_FileUserBlockingThread Thread 8:: Chrome_ProcessLauncherThread Thread 9:: Chrome_CacheThread Thread 10:: Chrome_IOThread Thread 11:: MediaStreamDeviceThread Thread 12:: NetworkConfigWatcher Thread 13:: BrowserBlockingWorker1/32259 Thread 14:: Chrome_DevToolsHandlerThread Thread 15:: Proxy resolver Thread 16:: com.apple.NSURLConnectionLoader Thread 17:: JavaScriptCore::BlockFree Thread 18:: JavaScriptCore::Marking Thread 19:: JavaScriptCore::Marking Thread 20:: JavaScriptCore::Marking Thread 21: Thread 22:: BrowserBlockingWorker2/94519 Thread 23: Thread 24: Thread 25: Thread 26:: WorkerPool/49651 Thread 27:: CVDisplayLink Thread 0 crashed with X86 Thread State (32-bit): Binary Images: |
Comment by RaymondLim My first crash was reproduced by using keyboard shortcuts, but I was able to reproduce the second crash with selecting menu items in the above steps. |
Comment by njx I'm not able to reproduce with the same steps (to be clear, you reload without extensions twice, then with extensions once, then without extensions twice, right?). Do you actually have any extensions installed? Maybe it depends on having an extension installed that adds some particular set of menu items. |
Comment by RaymondLim I'm still nailing down the exact steps. |
Comment by RaymondLim Mac OS 10.8.5. You can see it from the call stack also. |
Comment by RaymondLim Updated steps as I was able to reproduce with new steps twice. |
Comment by njx Still not able to repro even after cycling through those steps a few times. Do you have any extensions installed? |
Comment by RaymondLim
|
Comment by redmunds I can't repo on Mac or Win. Are you using menus, shortcuts, or both? |
Comment by RaymondLim
|
Comment by RaymondLim Extensions that I have to reproduce the crash are Emmet, brackets-beautify, brackets-minifier, dkehrig.show-whitespace, mikaeljorhult.brackets-autoprefixer and some more. But I don't think the set of extensions does matter. What matters is the number of shortcuts (or menu items) registered by these extensions and having Emmet in the set is a must since it registers the most shortcuts (and menu items). |
Comment by lkcampbell
But since you can, if I write you a fix that makes sure the key bindings are removed when the menu items are removed, can you test it out for me and see if it fixes this issue? |
Comment by RaymondLim
|
Comment by RaymondLim Looking at the call stack and the crash message EXC_BAD_ACCESS, I think we're trying to remove something that is already removed or deallocated from memory. And I don't think it is due to something that we miss to remove or deallocate. |
Comment by RaymondLim I found out the real issue that is causing the crash. My dev tools console is showing an error loading Emmet extension and somehow I have a modified version of Emmet that will only work with services.widget approach we had for a research project in last August. After I reinstall the correct Emmet, I can't reproduce the crash any more. But we still need to consider whether we need to take care of the crash scenario in this issue. If an extension fails to load successfully and some menu items are registered, then how do we avoid a crash when reloading w/o extensions? |
Comment by lkcampbell
Any changes that extensions create that are non-shell related will get reset as part of the reloading of the code. This reloading process is the same with or without extensions. The only difference is the definition of the paths of extension directories that are loaded up. Normal reload includes the dev and user paths and the "without extensions" reload does not. Any changes that extensions create that change the state of the Brackets Shell need to be explicitly wiped clean just prior to the reload. This assures that the default values replace the changes during the reload. So the question becomes, what change of the buggy Emmet code is "sticking around" in the Brackets Shell between reloads? What state data in the shell are not being cleared out? Not sure at this point. The code explicitly removes all menus, menu items, and menu dividers just prior to the reload. It does not, however, clear out key bindings, so that's the fix I want to try next. If you have theories on what other state data might be sticking around, let me know and we can look into explicitly clearing that data out as well. |
Comment by lkcampbell
|
Comment by redmunds Not only does Emmet have a lot of shortcuts, many of them conflict with core command shortcuts, so that may also be a factor. |
Comment by RaymondLim
|
Comment by lkcampbell
|
Comment by redmunds I added "extension problem" tag. Is this really "Mac only"? |
Comment by njx Removing "extension problem" since that tag is really intended to be used for bugs that are caused by specific (real) extensions, while this is really a bug that only (so far) has shown up in an unreleased, hacked-up version of Emmet that Raymond was using for prototyping. Marking low priority - |
Comment by lkcampbell
Also, this isn't caused by issue #6452, is it? Are you doing two quick reloads in a row or allowing a pause between reloads? |
Comment by RaymondLim
|
Issue by RaymondLim
Thursday Jan 09, 2014 at 01:11 GMT
Originally opened as adobe/brackets#6422
Result: crash with the following call stack. And the crash usually happens when you reload w/o extensions in step 1.
The text was updated successfully, but these errors were encountered: