Open Popup -> abort() has been called

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Open Popup -> abort() has been called

Postby cl90 » Wed Jun 06, 2018 4:11 am

Hello,

every time i use window.open() my CEF application is closing automatically by calling abort().
I'm on a Windows 7 OS and use CEF_3.3071.1634

Why is the CEF calling abort()?
cl90
Newbie
 
Posts: 5
Joined: Wed Jun 06, 2018 4:04 am

Re: Open Popup -> abort() has been called

Postby magreenblatt » Wed Jun 06, 2018 9:49 am

Sounds like your application is crashing. What is the symbolized call stack for the crash?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Open Popup -> abort() has been called

Postby cl90 » Thu Jun 07, 2018 1:23 am

where do i get this information?
cl90
Newbie
 
Posts: 5
Joined: Wed Jun 06, 2018 4:04 am

Re: Open Popup -> abort() has been called

Postby ndesktop » Thu Jun 07, 2018 7:33 am

You can download the corresponding symbols from Spotify (or build CEF yourself) and run the app under debugger, then capture a crash dump.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Open Popup -> abort() has been called

Postby cl90 » Wed Jun 13, 2018 3:47 am

I've finaly loaded the debug informations for the CEF Lib.
but i cant realy debug into the CEF, because i'm missing the source files.

I've placed an Breakpoint in the "OnBeforePopup" function. From there on it goes through:
- life_span_handler_cpptoc.cc (which i have the source of)
- life_span_handler_ctoccpp.cc (which i cant find the source of)
- browser_info_manager.cc (also no source...)
- content_browser_client.cc (no source)
- render_frame_host_impl.cc (no source)
And here it crashes

how do i capture a crash dump?
cl90
Newbie
 
Posts: 5
Joined: Wed Jun 06, 2018 4:04 am

Re: Open Popup -> abort() has been called

Postby ndesktop » Wed Jun 13, 2018 5:10 am

- browser_info_manager.cc and content_browser_client.cc
Get the sources (git clone https://bitbucket.org/chromiumembedded/cef.git), switch to branch 3071 (might need to dig for a specific sha1 depending on what 1634 corresponds to), then set debugger to add cef location to debugger srcpath.
- render_frame_host_impl.cc is in src/content/browser/frame_host/render_frame_host_impl.cc (part of Chromium, not CEF)
For this you will need the chromium source code :( so other than using automate-git.py --branch=3071 (or looking in CEF chrome compatibility file and download a tarball if any) I have no other idea.

Anyways, if the crash is not a programming error triggered from the CEF app or some weird Chrome inner bug, it looks like you are hitting a (D)CHECK.
Most of the render_frame_host_impl.cc such (D)CHECKs are referring to incorrect thread ID.
For example, things like DCHECK_CURRENTLY_ON(BrowserThread::IO); or
Code: Select all
void RenderFrameHostImpl::ExecuteJavaScript(
    const base::string16& javascript) {
  CHECK(CanExecuteJavaScript());
  Send(new FrameMsg_JavaScriptExecuteRequest(routing_id_,
                                             javascript,
                                             0, false));
}

I do not have a 3071 built, but if you can find someone to help or you have the time to go thru the entire ordeal of building 3071 in debug, that would be the way.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Open Popup -> abort() has been called

Postby cl90 » Wed Jun 13, 2018 7:50 am

Thanks for The Sourcecode!
I need to correct myself. my CEF version is: 3.3239.1716

with the sourcecode i could debug a little further into browser_info_manager.cc.
the following code is passed without errors and (allow) is true:
Code: Select all
  if (allow) {
    CefBrowserHostImpl::CreateParams create_params;

    if (!browser->IsViewsHosted())
      create_params.window_info = std::move(window_info);

    create_params.settings = pending_popup->settings;
    create_params.client = pending_popup->client;

    pending_popup->platform_delegate =
        CefBrowserPlatformDelegate::Create(create_params);
    CHECK(pending_popup->platform_delegate.get());

    // Between the calls to CanCreateWindow and GetCustomWebContentsView
    // RenderViewHostImpl::CreateNewWindow() will call
    // RenderProcessHostImpl::FilterURL() which, in the case of "javascript:"
    // URIs, rewrites the URL to "about:blank". We need to apply the same filter
    // otherwise GetCustomWebContentsView will fail to retrieve the PopupInfo.
    opener->GetProcess()->FilterURL(false, &pending_popup->target_url);

    PushPendingPopup(std::move(pending_popup));
  }


after that i end up in the "render_frame_host_impl.cc" file, which again i dont have the source of.
Does that mean CEF is working completly fine?

i have created the Popup in my Javascript code on the html page. Is that ok? or do i need to create it in the C++ context with CEF itself?
cl90
Newbie
 
Posts: 5
Joined: Wed Jun 06, 2018 4:04 am

Re: Open Popup -> abort() has been called

Postby magreenblatt » Wed Jun 13, 2018 10:53 am

You can copy/paste the symbolized call stack, which includes file names and line numbers, without debugging into the source code yourself. Posting the symbolized call stack may allow us to identify the issue that you're experiencing.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Open Popup -> abort() has been called

Postby cl90 » Thu Jun 14, 2018 12:21 am

i would gladly give you the Callstack, if only i knew where i can find it...
I hope its this one:

Code: Select all
    libcef.dll!logging::LogMessage::~LogMessage() Zeile 791   C++
    libcef.dll!`anonymous namespace'::`dynamic atexit destructor for 'g_shutdown_checker''()   C++
>   libcef.dll!_execute_onexit_table::__l2::<lambda>() Zeile 206   C++
    libcef.dll!__crt_seh_guarded_call<int>::operator()<<lambda_7777bce6b2f8c936911f934f8298dc43>,int <lambda>(void) & __ptr64,<lambda_3883c3dff614d5e0c5f61bb1ac94921c> >(__acrt_lock_and_call::__l2::<lambda_7777bce6b2f8c936911f934f8298dc43> && setup, _execute_onexit_table::__l2::int <lambda>(void) & action=int <lambda>(void){...}, __acrt_lock_and_call::__l2::<lambda_3883c3dff614d5e0c5f61bb1ac94921c> && cleanup={...}) Zeile 204   C++
    libcef.dll!_execute_onexit_table(_onexit_table_t * table=0x000007fedcef5308) Zeile 231   C++
    libcef.dll!common_exit::__l2::<lambda>() Zeile 215   C++
    libcef.dll!__crt_seh_guarded_call<void>::operator()<<lambda_d80eeec6fff315bfe5c115232f3240e3>,void <lambda>(void) & __ptr64,<lambda_2358e3775559c9db80273638284d5e45> >(__acrt_lock_and_call::__l2::<lambda_d80eeec6fff315bfe5c115232f3240e3> && setup, common_exit::__l2::void <lambda>(void) & action=void <lambda>(void){...}, __acrt_lock_and_call::__l2::<lambda_2358e3775559c9db80273638284d5e45> && cleanup={...}) Zeile 224   C++
    libcef.dll!common_exit(const int return_code=0, const _crt_exit_cleanup_mode cleanup_mode=_crt_exit_full_cleanup, const _crt_exit_return_mode return_mode=_crt_exit_return_to_caller) Zeile 263   C++
    libcef.dll!__scrt_dllmain_uninitialize_c() Zeile 407   C++
    libcef.dll!dllmain_crt_process_detach(const bool is_terminating=true) Zeile 107   C++
    libcef.dll!dllmain_dispatch(HINSTANCE__ * const instance=0x000007fed5080000, const unsigned long reason=0, void * const reserved=0x0000000000000001) Zeile 211   C++
    ntdll.dll!0000000077ad75eb()   Unbekannt
    ntdll.dll!0000000077adc040()   Unbekannt
    HIL_Simulator.exe!exit_or_terminate_process(const unsigned int return_code=3) Zeile 130   C++
    HIL_Simulator.exe!common_exit(const int return_code=3, const _crt_exit_cleanup_mode cleanup_mode=_crt_exit_no_cleanup, const _crt_exit_return_mode return_mode=_crt_exit_terminate_process) Zeile 271   C++
    HIL_Simulator.exe!_exit(int return_code=3) Zeile 288   C++
    HIL_Simulator.exe!raise(int signum=22) Zeile 468   C++
    HIL_Simulator.exe!common_message_window<wchar_t>(const int report_type=1, void * const return_address=0x000000014029b841, const wchar_t * const file_name=0x0000000000000000, const wchar_t * const line_number=0x0000000000000000, const wchar_t * const module_name=0x0000000000000000, const wchar_t * const user_message=0x0000000000289bf0) Zeile 414   C++
    HIL_Simulator.exe!__acrt_MessageWindowW(const int report_type=1, void * const return_address=0x000000014029b841, const wchar_t * const file_name=0x0000000000000000, const wchar_t * const line_number=0x0000000000000000, const wchar_t * const module_name=0x0000000000000000, const wchar_t * const user_message=0x0000000000289bf0) Zeile 452   C++
    HIL_Simulator.exe!_VCrtDbgReportW(int nRptType=1, void * returnAddress=0x000000014029b841, const wchar_t * szFile=0x0000000000000000, int nLine=0, const wchar_t * szModule=0x0000000000000000, const wchar_t * szFormat=0x00000001403737e8, char * arglist=0x000000000028bc98) Zeile 642   C++
    HIL_Simulator.exe!_CrtDbgReportW(int report_type=1, const wchar_t * file_name=0x0000000000000000, int line_number=0, const wchar_t * module_name=0x0000000000000000, const wchar_t * format=0x00000001403737e8, ...) Zeile 273   C++
    HIL_Simulator.exe!issue_debug_notification(const wchar_t * const message=0x000000014047e848) Zeile 122   C++
    HIL_Simulator.exe!__acrt_report_runtime_error(const wchar_t * message=0x000000014047e848) Zeile 142   C++
    HIL_Simulator.exe!abort() Zeile 61   C++
    HIL_Simulator.exe!terminate() Zeile 59   C++
    HIL_Simulator.exe!std::thread::_Move_thread(std::thread & _Other={...}) Zeile 111   C++
    HIL_Simulator.exe!std::thread::operator=(std::thread && _Other={...}) Zeile 68   C++
    HIL_Simulator.exe!WebSocketServer::start() Zeile 134   C++
    HIL_Simulator.exe!Distributor::startWebserver() Zeile 13   C++
    HIL_Simulator.exe!CEF_Handler::OnAfterCreated(scoped_refptr<CefBrowser> browser={...}) Zeile 113   C++
    HIL_Simulator.exe!`anonymous namespace'::life_span_handler_on_after_created(_cef_life_span_handler_t * self=0x00000000006a0bc0, _cef_browser_t * browser=0x00000000073dd0a0) Zeile 138   C++
    libcef.dll!CefLifeSpanHandlerCToCpp::OnAfterCreated(scoped_refptr<CefBrowser> browser={...}) Zeile 89   C++
    libcef.dll!CefBrowserHostImpl::CreateInternal(const CefStructBase<CefBrowserSettingsTraits> & settings={...}, scoped_refptr<CefClient> client={...}, content::WebContents * web_contents, scoped_refptr<CefBrowserInfo> browser_info={...}, scoped_refptr<CefBrowserHostImpl> opener={...}, bool is_devtools_popup=false, scoped_refptr<CefRequestContext> request_context={...}, std::unique_ptr<CefBrowserPlatformDelegate,std::default_delete<CefBrowserPlatformDelegate> > platform_delegate={...}, scoped_refptr<CefExtension> extension={...}) Zeile 430   C++
    libcef.dll!CefBrowserHostImpl::WebContentsCreated(content::WebContents * source_contents=0x00000000028798c0, int opener_render_process_id, int opener_render_frame_id, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & frame_name={...}, const GURL & target_url={...}, content::WebContents * new_contents=0x000000000a4b7cf0) Zeile 2444   C++
    libcef.dll!content::WebContentsImpl::CreateNewWindow(content::RenderFrameHost * opener=0x0000000007411890, int render_view_route_id=-2, int main_frame_route_id=4, int main_frame_widget_route_id=3, const content::mojom::CreateNewWindowParams & params={...}, content::SessionStorageNamespace * session_storage_namespace=0x000000000a359a90) Zeile 2412   C++
    libcef.dll!content::RenderFrameHostImpl::CreateNewWindow(mojo::StructPtr<content::mojom::CreateNewWindowParams> params, base::OnceCallback<void __cdecl(mojo::InlinedStructPtr<content::mojom::CreateNewWindowReply>)> callback={...}) Zeile 2838   C++
    libcef.dll!content::mojom::FrameHostStubDispatch::AcceptWithResponder(content::mojom::FrameHost * impl=0x00000000074118d8, mojo::Message * message=0x000000000028db88, std::unique_ptr<mojo::MessageReceiverWithStatus,std::default_delete<mojo::MessageReceiverWithStatus> > responder={...}) Zeile 1114   C++
    libcef.dll!content::mojom::FrameHostStub<mojo::RawPtrImplRefTraits<content::mojom::FrameHost> >::AcceptWithResponder(mojo::Message * message, std::unique_ptr<mojo::MessageReceiverWithStatus,std::default_delete<mojo::MessageReceiverWithStatus> > responder={...}) Zeile 670   C++
    libcef.dll!mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message * message=0x000000000028db88) Zeile 393   C++
    libcef.dll!mojo::FilterChain::Accept(mojo::Message * message=0x000000000028db88) Zeile 41   C++
    libcef.dll!IPC::`anonymous namespace'::ChannelAssociatedGroupController::AcceptSyncMessage(unsigned int interface_id, unsigned int message_id=0) Zeile 821   C++
    libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl IPC::`anonymous namespace'::ChannelAssociatedGroupController::*)(unsigned int,unsigned int) __ptr64,scoped_refptr<IPC::`anonymous namespace'::ChannelAssociatedGroupController>,unsigned int,unsigned int>,void __cdecl(void)>::Run(base::internal::BindStateBase * base=0x000000000a471f30) Zeile 334   C++
    libcef.dll!base::OnceCallback<void __cdecl(void)>::Run() Zeile 64   C++
    libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function=0x000007fedc83b508, base::PendingTask * pending_task=0x000000000028eb10) Zeile 58   C++
    libcef.dll!base::MessageLoop::RunTask(base::PendingTask * pending_task=0x000000000028eb10) Zeile 395   C++
    libcef.dll!base::MessageLoop::DeferOrRunPendingTask(base::PendingTask pending_task={...}) Zeile 409   C++
    libcef.dll!base::MessageLoop::DoWork() Zeile 450   C++
    libcef.dll!base::MessagePumpForUI::DoRunLoop() Zeile 174   C++
    libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Zeile 58   C++
    libcef.dll!base::RunLoop::Run() Zeile 117   C++
    libcef.dll!CefBrowserMessageLoop::RunMessageLoop() Zeile 122   C++
    HIL_Simulator.exe!CefRunMessageLoop() Zeile 413   C++
    HIL_Simulator.exe!wWinMain(HINSTANCE__ * hInstance=0x000000013fda0000, HINSTANCE__ * hPrevInstance=0x0000000000000000, wchar_t * lpCmdLine=0x0000000000384f84, int nCmdShow=10) Zeile 78   C++
    HIL_Simulator.exe!invoke_main() Zeile 118   C++
    HIL_Simulator.exe!__scrt_common_main_seh() Zeile 253   C++
    HIL_Simulator.exe!__scrt_common_main() Zeile 296   C++
    HIL_Simulator.exe!wWinMainCRTStartup() Zeile 17   C++
    kernel32.dll!00000000778959cd()   Unbekannt
    ntdll.dll!0000000077af383d()   Unbekannt

cl90
Newbie
 
Posts: 5
Joined: Wed Jun 06, 2018 4:04 am

Re: Open Popup -> abort() has been called

Postby ndesktop » Thu Jun 14, 2018 2:01 am

Code: Select all
HIL_Simulator.exe!std::thread::_Move_thread(std::thread & _Other={...}) Zeile 111   C++

is the line triggering the crash. But this is called from OnAfterCreated inside Distributor::statrWebserver, so I think it has nothing to do with CEF.

My suggestion would be to isolate this specific code and make a simple console executable with the same code, maybe the crash is reproducing.
Look also for compiler and (especially) linker warnings, /Md vs /MT, things like these.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 88 guests

cron