-
Notifications
You must be signed in to change notification settings - Fork 613
[NOT READY] fix some linux compile issues with CEF 2171 #489
Conversation
Merge release branch back into master
Support cmd-a, c, v, x for text input in native dialogs like file open, save
… into jeff/cef_2171
Prashanth's changes based off cef 2171
FYI below is the current error message when building linux on the current
|
let me check this out. Thanks @jasonsanjose. |
… into jeff/cef_2171
copy new ucidtl.dat instead of icudl.dll
Current build error:
|
I'm currently getting the following upon launching Brackets, and selecting index.html:
|
@Mark-Simulacrum Hmm, interesting... someone hit that recently when trying to run generic cefclient too: adobe/brackets#6427 (comment). These Chromium docs imply Chromium expects to find a root-owned special permissions executable in |
Yes, I see the same issue. I see two Windows in the beginning and then Brackets crashes. I can't find the core dumps on my Ubuntu 14.10 system. @Mark-Simulacrum do you know where they hide? |
In CEF bug #524, Marshall says "Linux: For binary distributions a new chrome-sandbox executable with SUID permissions must be placed next to the CEF executable." Odd that their own cefclient distros seem to be failing to do that correctly, though... bug on their end, maybe? |
@ingorichter No, and I can't seem to find anything about core dumps. I haven't done much development though. Will post back if I find more information. |
The funny thing is, that we have disabled sandboxing on Windows, OSX and Linux. The docs recommended this (if you are certain to understand what you are doing by disabling this security feature). |
I may have found the way to access the coredump, but I'm not completely certain. Execute |
Thanks @Mark-Simulacrum! I have the same issues with my changes. The main issues at the moment are
In both cases there are different code paths for each method. They have some codepath in common, but they are getting triggered in a different way. But this is only, because I haven't been able so far to trigger the window destruction from
It seems that we need to trigger the destruction of the GTK window. This would give us a chance to run the same function that is called when the window gets closed. |
@ingorichter The way I understand |
@Mark-Simulacrum I have tried this, but it didn't work either. This was only a guess, since this shouldn't be required to terminate the app. The test app uses |
@ingorichter I can't come up with anything else to try. Will keep you posted if I think of anything, and will happily test anything that comes up. Sorry about my novelty to CEF/GTK/C++. |
@Mark-Simulacrum No worries. All help and ideas are welcome at the moment. Sometimes the most unlikely ones are leading to success. Consider this a great learning experience. |
@ingorichter @Mark-Simulacrum I tried building this branch and ended up with the same errors which @jasonsanjose had got. To fix these, I have added pthread library to appshell.gyp file. That seemed to fix the issue and I was able to launch Brackets on Linux. I spent some time in understanding the difference between CefClient and Brackets esp cefclient_gtk.cpp. After numerous hours of investigation, I found that commenting Apart from this change I had to make another change. In this branch as void ClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
REQUIRE_UI_THREAD();
g_message("OnBeforeClose called");
if (CanCloseBrowser(browser)) {
if (m_BrowserId == browser->GetIdentifier()) {
// Free the browser pointer so that the browser can be destroyed
m_Browser = NULL;
}
browser_window_map_.erase((ClientWindowHandle)browser->GetHost()->GetWindowHandle());
}
// As m_quitting was not being set on this experimental branch I had to explicitly
// call CefQuitMessageLoop() here.
/*
if (m_quitting) {
g_message("Call DispatchCloseToNextBrowser()");
DispatchCloseToNextBrowser();
AfterClose();
}
*/
CefQuitMessageLoop();
} The other change(which may be minor) is that I have called After these changes I could quit Brackets with one click on the close button or using Ctrl+Q. However even with these changes, I could still see a core dump, if I launch from the terminal or using gdb. But at least it is quitting :) and we can look at the core dump problem as a separate issue. Hope this helps! |
@ingorichter @Mark-Simulacrum I am able to dismiss the crash by calling So I am not sure if just by moving |
My theory, that I mentioned above, does not seem to hold good. This seems to be intermittent. Today I am not able to reproduce what I had observed on Friday 😞 However I tried moving One issue I found in my unit testing is that, upon opening a new window and closing that window, the entire application quits(along with the old window). I am thinking, this may be because of some experimental changes that are present in this branch. |
@nethip Thank you for investigating this issue. I think the code that closed the window doesn't take into account that there might be more than one window left. This is part of this experiment and needs to be fixed. I wonder if it's a good idea to start the node process before everything else is ready. What happens, if Brackets can't start up properly, then we could end up with this lonely node process. |
@ingorichter, what is the difference between |
@busykai |
Add -lpthread to LIBS (libraries).
thanks, @nethip! so i've gotten to the point where the shell would quit from the message loop, but it started to hang in shutdown. looking at to threads state in the hang, i found that
I don't have much knowledge of CEF/Chromium internals, so learning as I go. I wonder where the renderer thread went... |
Thanks @busykai for looking into this. Sure this is a great learning experience for all of us. In case you didn't know, Brackets uses CEF3 which has a multi-process architecture. All of the java script execution happens in a different process called render process. The name of the render process for Brackets is again Brackets on Linux (that is why you see more than one Brackets processes in the Activity Monitor). So I am not sure if render thread is what the main thread is waiting on. Is it possible for you to figure out which thread the main thread is waiting on? While I was experimenting on this branch I found out that, if I call @ingorichter I have a question on calling And from the above call stack do we suspect anything with disabling sandboxing? |
I don't think that the |
@ingorichter If the ping pong does not take care of the orphan process problem then we should place of calling About not calling startNodeProcess, I did that and it took away the crash. Brackets would terminate gracefully. I am pretty much sure it has something to do with statNodeProcess itself. Either the thread or the way we are forking or something else that I am not able to catch. @busykai Did you get a chance to look at this issue? |
Closing. Will create a new PR. |
Updated PR with cleaned up branch here #499 |
This PR fixes some compile issues, but I'm still seeing errors that I haven't been able to resolve:
The closest thing I've found on the forums is http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10786, but making the suggested change to
appshell.gyp
, runninggrunt setup
andgrunt build
again doesn't improve anything.Another notable bug with 2171 is that the sample
cefclient
doesn't build with Ubuntu 14.04 https://code.google.com/p/chromiumembedded/issues/detail?id=1430. It's patched later in build 3.2171.1941,