Cef 47: Render process crashes immediately

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.

Cef 47: Render process crashes immediately

Postby litereddonut » Tue Feb 02, 2016 8:32 pm

Just got my project building with CEF47 on my mac.

The render process immediately has issues on an assert in blink::ScriptState::from that the v8 context is empty.

I've traced it to blink::ScriptController::windowProxy where there is a comment:

// FIXME: There are some situations where we can return an uninitialized
// context. This is broken.

This is the bug I'm running into. The cefclient runs fine on the same test pages my app fails on. I was wondering if there is some configuration I'm missing?

Here are the arguments I have for CefExecuteProcess when spinning up the render process:
/path/to/renderer/exe --type=renderer --no-sandbox --lang=en-US --lang=en_US --log-file=/path/to/Logs/cef_log.txt --log-severity=info --user-agent=Mozilla/5.0 (Macintosh; OS X Unknown) AppleWebKit/537.4 (KHTML, like Gecko) my/user/agent --uncaught-exception-stack-size=10 --num-raster-threads=2 --enable-zero-copy --content-image-texture-target=3553,3553,3553,3553,3553,34037,3553,3553,3553,34037,3553,34037,34037 --video-image-texture-target=34037 --channel=39813.1.306268121
litereddonut
Techie
 
Posts: 19
Joined: Mon Jun 03, 2013 3:06 pm

Re: Cef 47: Render process crashes immediately

Postby magreenblatt » Tue Feb 02, 2016 8:35 pm

What OS and CEF version? What is the symbolized call stack for the crash? Does the problem reproduce with the cefclient sample app?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Cef 47: Render process crashes immediately

Postby litereddonut » Tue Feb 02, 2016 8:56 pm

Mac OSX 10.9.5
CEF 47.0.2526.80

does not reproduce with the sample app

call stack:

(lldb) bt
* thread #1: tid = 0x463846, 0x0000000106ff69bc Chromium Embedded Framework`blink::ScriptState::from(context=(val_ = v8::Context * = 0x0000000000000000)) + 108 at ScriptState.h:73, name = 'CrRendererMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfbadbeef)
* frame #0: 0x0000000106ff69bc Chromium Embedded Framework`blink::ScriptState::from(context=(val_ = v8::Context * = 0x0000000000000000)) + 108 at ScriptState.h:73
frame #1: 0x00000001087d6892 Chromium Embedded Framework`blink::ScriptState::forWorld(frame=0x00003b273fe88290, world=0x00003b273fe41fb0) + 162 at ScriptState.cpp:132
frame #2: 0x00000001087d67c3 Chromium Embedded Framework`blink::ScriptState::forMainWorld(frame=0x00003b273fe88290) + 51 at ScriptState.cpp:124
frame #3: 0x00000001087be0f3 Chromium Embedded Framework`blink::ScriptController::evaluateScriptInMainWorld(this=0x00003b273fe640b0, sourceCode=0x00007fff5fbf9158, accessControlStatus=SharableCrossOrigin, policy=DoNotExecuteScriptWhenScriptsDisabled, compilationFinishTime=0x0000000000000000) + 227 at ScriptController.cpp:557
frame #4: 0x00000001087be4ea Chromium Embedded Framework`blink::ScriptController::executeScriptInMainWorld(this=0x00003b273fe640b0, sourceCode=0x00007fff5fbf9158, accessControlStatus=SharableCrossOrigin, compilationFinishTime=0x0000000000000000) + 90 at ScriptController.cpp:540
frame #5: 0x000000010703e7cb Chromium Embedded Framework`blink::ScriptLoader::executeScript(this=0x00003b273fee58d0, sourceCode=0x00007fff5fbf9158, compilationFinishTime=0x0000000000000000) + 2523 at ScriptLoader.cpp:399
frame #6: 0x000000010703c910 Chromium Embedded Framework`blink::ScriptLoader::prepareScript(this=0x00003b273fee58d0, scriptStartPosition=0x00007fff5fbf9540, supportLegacyTypes=DisallowLegacyTypeInTypeAttribute) + 2352 at ScriptLoader.cpp:271
frame #7: 0x000000010767b237 Chromium Embedded Framework`blink::HTMLScriptRunner::runScript(this=0x00003b273fee4880, script=0x000034d457034010, scriptStartPosition=0x00007fff5fbf9540) + 583 at HTMLScriptRunner.cpp:352
frame #8: 0x000000010767af30 Chromium Embedded Framework`blink::HTMLScriptRunner::execute(this=0x00003b273fee4880, scriptElement=PassRefPtr<blink::Element> at 0x00007fff5fbf9528, scriptStartPosition=0x00007fff5fbf9540) + 192 at HTMLScriptRunner.cpp:214
frame #9: 0x000000010763e3c1 Chromium Embedded Framework`blink::HTMLDocumentParser::runScriptsForPausedTreeBuilder(this=0x00003b273ff343d0) + 273 at HTMLDocumentParser.cpp:326
frame #10: 0x000000010763fa84 Chromium Embedded Framework`blink::HTMLDocumentParser::processParsedChunkFromBackgroundParser(this=0x00003b273ff343d0, popChunk=PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk> at 0x00007fff5fbf9730) + 2388 at HTMLDocumentParser.cpp:510
frame #11: 0x000000010763dfe4 Chromium Embedded Framework`blink::HTMLDocumentParser::pumpPendingSpeculations(this=0x00003b273ff343d0) + 1300 at HTMLDocumentParser.cpp:571
frame #12: 0x000000010763da9d Chromium Embedded Framework`blink::HTMLDocumentParser::resumeParsingAfterYield(this=0x00003b273ff343d0) + 221 at HTMLDocumentParser.cpp:315
frame #13: 0x000000010766e1f6 Chromium Embedded Framework`blink::HTMLParserScheduler::continueParsing(this=0x00003b273fee2c90) + 38 at HTMLParserScheduler.cpp:170
frame #14: 0x000000010766f117 Chromium Embedded Framework`WTF::FunctionWrapper<void (this=0x000060000003c8e8, c=0x00003b273fee2c90)()>::operator()(blink::HTMLParserScheduler*) + 119 at Functional.h:83
frame #15: 0x000000010766f031 Chromium Embedded Framework`WTF::PartBoundFunctionImpl<1, WTF::FunctionWrapper<void (this=0x000060000003c8e0)()>, void (blink::HTMLParserScheduler*)>::operator()() + 65 at Functional.h:178
frame #16: 0x0000000104bfd71b Chromium Embedded Framework`blink::CancellableTaskFactory::CancellableTask::run(this=0x000060800001c760) + 107 at CancellableTaskFactory.cpp:29
frame #17: 0x000000010bd3eedc Chromium Embedded Framework`scheduler::WebTaskRunnerImpl::runTask(task=<unavailable>) + 44 at web_task_runner_impl.cc:45
frame #18: 0x000000010bd3e9d8 Chromium Embedded Framework`base::internal::RunnableAdapter<void (this=0x00007fff5fbf98f0, args=<unavailable>)(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >)>::Run(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >) + 72 at bind_internal.h:157
frame #19: 0x000000010bd3e890 Chromium Embedded Framework`base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (runnable=(function_ = (Chromium Embedded Framework`scheduler::WebTaskRunnerImpl::runTask(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >) at web_task_runner_impl.cc:44)), args=<unavailable>)(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >)>, base::internal::TypeList<scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> > > >::MakeItSo(base::internal::RunnableAdapter<void (*)(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >)>, scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >) + 64 at bind_internal.h:293
frame #20: 0x000000010bd3e814 Chromium Embedded Framework`base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<void (base=0x0000608000058f90)(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >)>, void (scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >), base::internal::TypeList<base::internal::PassedWrapper<scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> > > > >, base::internal::TypeList<base::internal::UnwrapTraits<base::internal::PassedWrapper<scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> > > > >, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (*)(scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> >)>, base::internal::TypeList<scoped_ptr<blink::WebTaskRunner::Task, base::DefaultDeleter<blink::WebTaskRunner::Task> > > >, void ()>::Run(base::internal::BindStateBase*) + 100 at bind_internal.h:343
frame #21: 0x000000010ae4053f Chromium Embedded Framework`base::Callback<void (this=0x00007fff5fbf9c60)>::Run() const + 63 at callback.h:396
frame #22: 0x00000001045ffcda Chromium Embedded Framework`base::debug::TaskAnnotator::RunTask(this=0x0000000125205d5c, queue_function=0x000000010fd988ce, pending_task=0x00007fff5fbf9c48) + 618 at task_annotator.cc:51
frame #23: 0x000000010bd1c398 Chromium Embedded Framework`scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(this=0x0000000125205c30, queue=0x0000000125207f90, out_previous_task=0x00007fff5fbf9ea0) + 1464 at task_queue_manager.cc:365
frame #24: 0x000000010bd19952 Chromium Embedded Framework`scheduler::TaskQueueManager::DoWork(this=0x0000000125205c30, decrement_pending_dowork_count=true) + 578 at task_queue_manager.cc:293
frame #25: 0x000000010bd23a24 Chromium Embedded Framework`base::internal::RunnableAdapter<void (this=0x00007fff5fbfa278, object=0x0000000125205c30, args=0x00006000000698f8)(bool)>::Run(scheduler::TaskQueueManager*, bool const&) + 148 at bind_internal.h:176
frame #26: 0x000000010bd23854 Chromium Embedded Framework`base::internal::InvokeHelper<true, void, base::internal::RunnableAdapter<void (runnable=(method_ = 0x000000010bd19710), weak_ptr=0x00006000000698e8, args=0x00006000000698f8)(bool)>, base::internal::TypeList<base::WeakPtr<scheduler::TaskQueueManager> const&, bool const&> >::MakeItSo(base::internal::RunnableAdapter<void (scheduler::TaskQueueManager::*)(bool)>, base::WeakPtr<scheduler::TaskQueueManager> const&, bool const&) + 100 at bind_internal.h:303
frame #27: 0x000000010bd237cf Chromium Embedded Framework`base::internal::Invoker<base::IndexSequence<0ul, 1ul>, base::internal::BindState<base::internal::RunnableAdapter<void (base=0x00006000000698c0)(bool)>, void (scheduler::TaskQueueManager*, bool), base::internal::TypeList<base::WeakPtr<scheduler::TaskQueueManager>, bool> >, base::internal::TypeList<base::internal::UnwrapTraits<base::WeakPtr<scheduler::TaskQueueManager> >, base::internal::UnwrapTraits<bool> >, base::internal::InvokeHelper<true, void, base::internal::RunnableAdapter<void (scheduler::TaskQueueManager::*)(bool)>, base::internal::TypeList<base::WeakPtr<scheduler::TaskQueueManager> const&, bool const&> >, void ()>::Run(base::internal::BindStateBase*) + 127 at bind_internal.h:343
frame #28: 0x000000010ae4053f Chromium Embedded Framework`base::Callback<void (this=0x00007fff5fbfa780)>::Run() const + 63 at callback.h:396
frame #29: 0x00000001045ffcda Chromium Embedded Framework`base::debug::TaskAnnotator::RunTask(this=0x0000000125205040, queue_function=0x000000010f16194c, pending_task=0x00007fff5fbfa768) + 618 at task_annotator.cc:51
frame #30: 0x0000000104680447 Chromium Embedded Framework`base::MessageLoop::RunTask(this=0x0000000125204ee0, pending_task=0x00007fff5fbfa768) + 839 at message_loop.cc:475
frame #31: 0x0000000104680726 Chromium Embedded Framework`base::MessageLoop::DeferOrRunPendingTask(this=0x0000000125204ee0, pending_task=0x00007fff5fbfa768) + 86 at message_loop.cc:484
frame #32: 0x000000010468096d Chromium Embedded Framework`base::MessageLoop::DoWork(this=0x0000000125204ee0) + 301 at message_loop.cc:596
frame #33: 0x00000001045d3a08 Chromium Embedded Framework`base::MessagePumpCFRunLoopBase::RunWork(this=0x00006000001830c0) + 104 at message_pump_mac.mm:328
frame #34: 0x00000001045d397a Chromium Embedded Framework`___ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv_block_invoke(.block_descriptor=<unavailable>) + 42 at message_pump_mac.mm:305
frame #35: 0x0000000104652f5a Chromium Embedded Framework`base::mac::CallWithEHFrame(void () block_pointer) + 10 at call_with_eh_frame_asm.S:36
frame #36: 0x00000001045d2d05 Chromium Embedded Framework`base::MessagePumpCFRunLoopBase::RunWorkSource(info=0x00006000001830c0) + 101 at message_pump_mac.mm:304
frame #37: 0x00007fff903fe5b1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #38: 0x00007fff903efc62 CoreFoundation`__CFRunLoopDoSources0 + 242
frame #39: 0x00007fff903ef3ef CoreFoundation`__CFRunLoopRun + 831
frame #40: 0x00007fff903eee75 CoreFoundation`CFRunLoopRunSpecific + 309
frame #41: 0x00007fff936ac0fc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 253
frame #42: 0x00000001045d47f7 Chromium Embedded Framework`base::MessagePumpNSRunLoop::DoRun(this=0x00006000001830c0, delegate=0x0000000125204ee0) + 151 at message_pump_mac.mm:606
frame #43: 0x00000001045d360d Chromium Embedded Framework`base::MessagePumpCFRunLoopBase::Run(this=0x00006000001830c0, delegate=0x0000000125204ee0) + 125 at message_pump_mac.mm:236
frame #44: 0x000000010467fe33 Chromium Embedded Framework`base::MessageLoop::RunHandler(this=0x0000000125204ee0) + 275 at message_loop.cc:439
frame #45: 0x00000001046e0d05 Chromium Embedded Framework`base::RunLoop::Run(this=0x00007fff5fbfbab8) + 85 at run_loop.cc:55
frame #46: 0x000000010467ed2d Chromium Embedded Framework`base::MessageLoop::Run(this=0x0000000125204ee0) + 269 at message_loop.cc:282
frame #47: 0x000000010b6976ec Chromium Embedded Framework`content::RendererMain(parameters=0x00007fff5fbfc338) + 1484 at renderer_main.cc:208
frame #48: 0x000000010df24d27 Chromium Embedded Framework`content::RunNamedProcessTypeMain(process_type=0x00007fff5fbfc360, main_function_params=0x00007fff5fbfc338, delegate=0x00007fff5fbfc750) + 247 at content_main_runner.cc:378
frame #49: 0x000000010df25f11 Chromium Embedded Framework`content::ContentMainRunnerImpl::Run(this=0x00006080000a4440) + 577 at content_main_runner.cc:798
frame #50: 0x000000010df247e0 Chromium Embedded Framework`content::ContentMain(params=0x00007fff5fbfc728) + 144 at content_main.cc:19
frame #51: 0x00000001042874f9 Chromium Embedded Framework`CefExecuteProcess(args=0x00007fff5fbfc8e0, application=CefRefPtr<CefApp> at 0x00007fff5fbfc8d8, windows_sandbox_info=0x0000000000000000) + 361 at context.cc:105
frame #52: 0x00000001040d3632 Chromium Embedded Framework`cef_execute_process(args=0x00007fff5fbfce70, application=0x00006080000c3c80,
litereddonut
Techie
 
Posts: 19
Joined: Mon Jun 03, 2013 3:06 pm

Re: Cef 47: Render process crashes immediately

Postby magreenblatt » Tue Feb 02, 2016 9:11 pm

What HTML/JS content are you loading? Have you tried loading that content in the sample app?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Cef 47: Render process crashes immediately

Postby litereddonut » Wed Feb 03, 2016 12:58 pm

I've tried the google home page and some other simple html files. All render properly on the cefclient app.
litereddonut
Techie
 
Posts: 19
Joined: Mon Jun 03, 2013 3:06 pm

Re: Cef 47: Render process crashes immediately

Postby magreenblatt » Wed Feb 03, 2016 1:19 pm

What are you doing in your helper exe that's different from the sample app?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Cef 47: Render process crashes immediately

Postby litereddonut » Wed Feb 03, 2016 8:35 pm

Not that I can see. The render process spins up and attempts a call on cefExecuteProcess. It does hit many of the CefRenderProcessHandler methods that I've implemented, such as OnWebkitInitialized. I've changed these methods to be essentially no-ops like in the cefclient helper. When attempting to hit the google home page i get the same issue as seen in the above call stack.

code snippet below:

Code: Select all
int main ( int argc, char *argv[] )
{
    // add argument strings to a string list
    QStringList cmdList;
    for (int i = 0; i < argc; i++) {
        cmdList << argv[i];
    }
    SetProcessNameFromCommandLine( cmdList );
    DebuggerWait ( cmdList );

    // Initialize the AutoRelease pool.
    gAutoReleasePool = [[NSAutoreleasePool alloc] init];

    if ( !::Storage::InitStorageLocations () )
    {
        cleanUpAppBeforeReturn();
        return 1;
    }

    gAppRef = CefRefPtr<::App> (new ::App ( argc, argv ));

    int exit_code (0);
    if( gAppRef->alreadyRunning() )
    {
        cleanUpAppBeforeReturn();
        return exit_code;
    }

    // this calls cefInitialize
    if ( gAppRef->init ( CefMainArgs ( argc, argv ) ) )
    {       
        CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
        command_line->InitFromArgv(argc, argv);
       
        // Execute the secondary process, if any.
        exit_code = CefExecuteProcess (CefMainArgs ( argc, argv ), CefRefPtr<CefApp>(gAppRef), NULL);

        // if the above process execution returns -1 then we are running the browser process
        if (exit_code < 0)
        {
            exit_code = runBrowserProcess ();
        }
        else
        {
            gAppRef->startShutdown();
        }
    }
    else
    {
        MLOG_ERROR_EVENT ( name ( "ApplicationInitializationFailed" ) );
        exit_code = 1;
    }

    if (gAppRef)
    {
        gAppRef->shutdown();
    }

    cleanUpAppBeforeReturn();

    return exit_code;
}
litereddonut
Techie
 
Posts: 19
Joined: Mon Jun 03, 2013 3:06 pm

Re: Cef 47: Render process crashes immediately

Postby litereddonut » Mon Feb 08, 2016 6:28 pm

Still experiencing this issue and have had no luck resolving it. Any further insights?

Thanks
litereddonut
Techie
 
Posts: 19
Joined: Mon Jun 03, 2013 3:06 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 45 guests