Open core-ai-bot opened 3 years ago
Comment by RaymondLim Tuesday Apr 29, 2014 at 06:37 GMT
Below is the call stack from the release build
libcef.dll!521241f6()
[Frames below may be incorrect and/or missing, no symbols loaded for libcef.dll]
libcef.dll!51444e5c()
libcef.dll!51444fab()
libcef.dll!5143b667()
libcef.dll!514dbf29()
libcef.dll!5143ca90()
libcef.dll!5143c61e()
libcef.dll!5142853b()
libcef.dll!514263d1()
libcef.dll!513f2e67()
ntdll.dll!_bsearch() + 0x66 bytes
Brackets.exe!CefCToCpp<CefV8ValueCToCpp,CefV8Value,_cef_v8value_t>::Release() Line 79 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::erase(std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> > > _Last) Line 1382 + 0xb bytes C++
Brackets.exe!ClientApp::`scalar deleting destructor'() + 0x1c bytes C++
Brackets.exe!ClientApp::Release() Line 138 + 0x2e bytes C++
Brackets.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 277 C++
Brackets.exe!__tmainCRTStartup() Line 275 + 0x1c bytes C
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
Comment by JeffryBooher Wednesday Apr 30, 2014 at 16:10 GMT
@
RaymondLim Does File > Exit crash as well?
Comment by RaymondLim Wednesday Apr 30, 2014 at 16:15 GMT
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.
Comment by JeffryBooher Wednesday Apr 30, 2014 at 16:57 GMT
I don't know much about the message handling/routing. I do know that the PreKeyEvent
gets called twice for keys. One of those calls the os_event
is NULL which caused a crash. Do you know of other such places in the code? I was unable to reproduce this.
Can you try to dSym the stack? The CEF functions are nameless.
Comment by RaymondLim Friday May 02, 2014 at 16:47 GMT
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).
Comment by RaymondLim Friday May 02, 2014 at 18:34 GMT
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 https://github.com/adobe/brackets/commit/4eee5ea8e8d81d7be944c6bf776b62633576af13 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.@
dangoor Can you suggest how we can return a promise from pref manager to the code that handles the quit command?
Comment by dangoor Monday May 05, 2014 at 16:35 GMT
@
RaymondLim PreferencesBase.PreferencesSystem.save
would seem to hold the key. I'm thinking that adding a _finalize
method to PreferencesSystem
might make sense. That would:
_nextSaveDeferred
if there is one. If there isn't, return the promise for the current save operation (if there is one). If there isn't one of those, return a resolved promise.save()
after that point should either throw, reject the promise or just silently fail. I don't know what else happens on quit, so it's hard for me to say which is the best choice there. My guess is that rejecting the promise is likely the best choice.How does that sound?
Comment by redmunds Friday May 23, 2014 at 23:54 GMT
@
dangoor I am unable to trap this crash in debugger, so I have attempted to implement your suggestion in PR #7930 . Please take a look and let me know if I understood correctly -- it seems to prevent crash sometimes, but not always.
Reminder: this is a CEF 1750 bug, so be sure to use the jeff/cef_1750
branch on brackets-shell. This is a Windows-only bug and has only been reproduced on Win7, so may be Win7-only.
cc@
RaymondLim@
JeffryBooher
Comment by RaymondLim Saturday May 24, 2014 at 15:52 GMT
@
redmunds I tried in your branch and still crash on exit with Ctrl+Q all the time if I made no changes in any document. If I made a change in a document, then your code seems to work correctly, but not in the build w/o your changes. As you said, I can't trap the crash in debugger. If I do, then I won't be able to use File > Exit or Ctrl+Q to quit any more. It seems like we have dangling promises after debugging.
Note that if I have the same breakpoints in a build before your changes, I can quit without a crash though.
Comment by redmunds Thursday Jun 05, 2014 at 20:44 GMT
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.
Comment by redmunds Tuesday Jun 17, 2014 at 03:23 GMT
@
JeffryBooher Here's the callstack from the remaining crash:
> libcef.dll!v8::internal::GlobalHandles::Node::DecreaseBlockUses() Line 439 + 0x3 bytes C++
libcef.dll!CefV8ValueImpl::Handle::~Handle() Line 1062 + 0xd bytes C++
libcef.dll!CefV8ValueImpl::Handle::`scalar deleting destructor'() + 0xb bytes C++
libcef.dll!CefV8DeleteOnMessageLoopThread::Destruct<CefV8HandleBase>(const CefV8HandleBase * x) Line 77 + 0x8 bytes C++
libcef.dll!CefV8ValueImpl::~CefV8ValueImpl() Line 1274 + 0x39 bytes C++
libcef.dll!CefV8ValueImpl::`scalar deleting destructor'() + 0x10 bytes C++
libcef.dll!CefV8ValueImpl::Release() Line 346 + 0x2d bytes C++
libcef.dll!CefCppToC<CefV8ValueCppToC,CefV8Value,_cef_v8value_t>::Release() Line 109 C++
libcef.dll!CefCppToC<CefV8ValueCppToC,CefV8Value,_cef_v8value_t>::struct_release(_cef_base_t * base) Line 142 + 0xb bytes C++
Brackets.exe!CefCToCpp<CefV8ValueCToCpp,CefV8Value,_cef_v8value_t>::Release() Line 79 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 + 0x1a bytes C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::_Node * _Rootnode) Line 1617 C++
Brackets.exe!std::_Tree<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> >::erase(std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> > > _First, std::_Tree_const_iterator<std::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> >,std::less<int>,std::allocator<std::pair<int const ,std::pair<CefRefPtr<CefV8Context>,CefRefPtr<CefV8Value> > > >,0> > > _Last) Line 1382 + 0xb bytes C++
Brackets.exe!ClientApp::`scalar deleting destructor'() + 0x1c bytes C++
Brackets.exe!ClientApp::Release() Line 138 + 0x2e bytes C++
Brackets.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 277 C++
Brackets.exe!__tmainCRTStartup() Line 275 + 0x1c bytes C
kernel32.dll!76ba338a()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!7724bf32()
ntdll.dll!7724bf05()
Comment by JeffryBooher Tuesday Jun 17, 2014 at 03:39 GMT
Thanks I'll pass it on
On Jun 16, 2014, at 8:24 PM, "Randy Edmunds" notifications@github.com<mailto:notifications@github.com> wrote:
@
JeffryBooherhttps://github.com/JeffryBooher Here's the callstack from the remaining crash:
libcef.dll!v8::internal::GlobalHandles::Node::DecreaseBlockUses() Line 439 + 0x3 bytes C++ libcef.dll!CefV8ValueImpl::Handle::~Handle() Line 1062 + 0xd bytes C++ libcef.dll!CefV8ValueImpl::Handle::
scalar deleting destructor'() + 0xb bytes C++ libcef.dll!CefV8DeleteOnMessageLoopThread::Destruct<CefV8HandleBase>(const CefV8HandleBase * x) Line 77 + 0x8 bytes C++ libcef.dll!CefV8ValueImpl::~CefV8ValueImpl() Line 1274 + 0x39 bytes C++ libcef.dll!CefV8ValueImpl::
scalar deleting destructor'() + 0x10 bytes C++ libcef.dll!CefV8ValueImpl::Release() Line 346 + 0x2d bytes C++ libcef.dll!CefCppToC<CefV8ValueCppToC,CefV8Value,_cef_v8value_t>::Release() Line 109 C++ libcef.dll!CefCppToC<CefV8ValueCppToC,CefV8Value,_cef_v8value_t>::struct_release(_cef_base_t * base) Line 142 + 0xb bytes C++ Brackets.exe!CefCToCpp<CefV8ValueCToCpp,CefV8Value,_cef_v8value_t>::Release() Line 79 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr>,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 + 0x1a bytes C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Erase(std::_Tree_nodstd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::_Node * _Rootnode) Line 1617 C++ Brackets.exe!std::_Treestd::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> >::erase(std::_Tree_const_iteratorstd::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> > > _First, std::_Tree_const_iteratorstd::_Tree_val<std::_Tmap_traits<int,std::pair<CefRefPtr<CefV8Context,CefRefPtr >,std::less ,std::allocator<std::pair<int const ,std::pair<CefRefPtr ,CefRefPtr > > >,0> > > _Last) Line 1382 + 0xb bytes C++ Brackets.exe!ClientApp::`scalar deleting destructor'() + 0x1c bytes C++ Brackets.exe!ClientApp::Release() Line 138 + 0x2e bytes C++ Brackets.exe!wWinMain(HINSTANCE * hInstance, HINSTANCE * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 277 C++ Brackets.exe!__tmainCRTStartup() Line 275 + 0x1c bytes C kernel32.dll!76ba338a() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!7724bf32() ntdll.dll!7724bf05()
Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/7683#issuecomment-46263517.
Comment by JeffryBooher Wednesday Jun 18, 2014 at 18:27 GMT
https://code.google.com/p/chromiumembedded/issues/detail?id=1319
Comment by JeffryBooher Wednesday Jun 18, 2014 at 18:31 GMT
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.
Comment by redmunds Monday Jun 23, 2014 at 20:18 GMT
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).
Comment by njx Wednesday Jul 09, 2014 at 17:33 GMT
Suggested next steps for whoever picks this up:
Comment by peterflynn Wednesday Jul 09, 2014 at 20:04 GMT
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 brackets.fs
read requests interacts with the native code would probably be simpler in an isolated test app like this.
Comment by RaymondLim Wednesday Jul 09, 2014 at 22:16 GMT
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 grunt setup
and grunt
, but still cannot reproduce the crash even after removing the Brackets cache and preference files.
Update: after reviewing Randy's note in https://github.com/adobe/brackets/pull/8062, I was able to reproduce it with a js file open in the working set.
Comment by RaymondLim Thursday Jul 10, 2014 at 16:52 GMT
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.
Comment by RaymondLim Wednesday Jul 16, 2014 at 23:17 GMT
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.
function openThreeURLs() {
appshell.app.openURLInDefaultBrowser("https://www.google.com/", function () {
console.log("google");
appshell.app.openURLInDefaultBrowser("http://www.cnbc.com/", function () {
console.log("cnbc");
appshell.app.openURLInDefaultBrowser("http://www.cnet.com/news/", function () {
console.log("cnet news");
});
});
});
}
openThreeURLs();
window.close();
I intentionally nested the three api calls to cause the crash. If I don't nest them, then no crash.
@
JeffryBooher See you can figure out why callback stack can cause the crash or do you think we need to pass this info to Marshall for a fix in CEF?
Comment by JeffryBooher Wednesday Jul 16, 2014 at 23:21 GMT
@
RaymondLim is it any nested V8 call or just certain ones? Can you make some similar change in the CefClient sample app and get it to crash?
Comment by RaymondLim Wednesday Jul 16, 2014 at 23:27 GMT
@
JeffryBooher As I mentioned I did start it with file IO apis and then switch to a simple non-fileio api. So it can be any api call with a callback. Also I already mentioned that even the file IO apis do not crash the CefClient sample app with nested calls.
Comment by dangoor Thursday Jul 17, 2014 at 01:53 GMT
@
RaymondLim Looking at your comment from 6 days ago regarding turning off code hints you say that the crash went away when you turned off code hints. The tern worker doesn't do any file I/O or access any appshell v8 extensions. Is it possible that the real problem is that there's a crash on quit if there's a web worker still running? That should be easy to simulate in stock cefclient (even better if it could then be reproduced in Chrome!). Web workers are the kind of not-widely-used feature in the web platform that could have bugs that aren't caught for a time.
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.
Comment by RaymondLim Thursday Jul 17, 2014 at 03:05 GMT
@
dangoor Sorry, I was vague in that comment saying that I stop the Tern worker. What I meant is stopping JS Code Hints from processing all the files with my code hints pref. So the issue may not have anything to do with a web worker still running.
Comment by RaymondLim Thursday Jul 17, 2014 at 03:51 GMT
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.
function func3() {
console.log("cnet news");
}
function func2() {
console.log("cnbc");
appshell.app.openURLInDefaultBrowser("http://www.cnet.com/news/", func3);
// If commenting out the above one and uncomment this one, then no crash
// since we only have two levels of nested callbacks.
// appshell.app.getApplicationSupportDirectory();
}
function func1() {
console.log("google");
appshell.app.openURLInDefaultBrowser("http://www.cnbc.com/", func2);
}
function openThreeURLs() {
appshell.app.openURLInDefaultBrowser("https://www.google.com/", func1);
}
openThreeURLs();
window.close();
Comment by peterflynn Tuesday Sep 30, 2014 at 20:02 GMT
Closed since this is now tracked on the Backlog - https://trello.com/c/2codTAEZ/1364-brackets-7683-cef-1750-crash-on-quit-issue
Comment by pthiess Thursday Nov 13, 2014 at 21:23 GMT
We should see if we can still reproduce this issue with branch 2171
Issue by RaymondLim Tuesday Apr 29, 2014 at 03:45 GMT Originally opened as https://github.com/adobe/brackets/issues/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.