Updating code to trunk: CefExecuteProcess return 0

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.

Updating code to trunk: CefExecuteProcess return 0

Postby TomDigitale » Thu Jul 10, 2014 10:36 am

Hello,

I've been notified that hardware acceleration using off-screen rendering has been implemented in r1751(issue 1257 resolved.) and wanted to try it.
So I've updated a simple off-screen program which was using r1628 from "I-don't-remember-wich-branch" to the last available version of the trunk.
But the simplest program does not seem to work, because CefExecuteProcess return 0, preventing the application to continue.

Here's the program I'm currently running on windows 8.1 with the last available CEF trunk version: CEF3.2078.1759

Code: Select all
int main(int argc, char** argv)
{
   CefRefPtr<sfw::SFApp> app(new sfw::SFApp);

   CefSettings settings;
   settings.windowless_rendering_enabled = true;

   CefMainArgs main_args;
   int exitCode = CefExecuteProcess(main_args, app.get(), NULL); // this return 0, preventing the application to do anything.
   if (exitCode >= 0)
   {
      std::exit(0);
   }

   CefInitialize(main_args, settings, app.get(), NULL);
   
        // creating a window using SFML
   sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Window");
   while (window.isOpen())
   {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        CefDoMessageLoopWork();

        window.clear();
        window.display();
   }

   CefShutdown();
   return 0;
}


Is it because the main process could now return 0 instead of -1? I can't see anything in the documentation mentioning this so I don't think so, but I don't find what's wrong in my code, wich worked with my old revision
TomDigitale
Techie
 
Posts: 18
Joined: Fri Mar 14, 2014 6:00 am

Re: Updating code to trunk: CefExecuteProcess return 0

Postby magreenblatt » Thu Jul 10, 2014 12:22 pm

Are you sure CefExecuteProcess is returning 0 for the main process? Are there any messages in the log file, or crashes/debug assertions?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Updating code to trunk: CefExecuteProcess return 0

Postby TomDigitale » Thu Jul 10, 2014 1:15 pm

I retried on another computer at home and it works perfectly fine as suspected.

I'm sorry for the inconvenience, I should have tried it before. I will investigate my work station's strange behavior next week (and try the hardware acceleration performances right now ! :mrgreen: ).
TomDigitale
Techie
 
Posts: 18
Joined: Fri Mar 14, 2014 6:00 am

Re: Updating code to trunk: CefExecuteProcess return 0

Postby aksvs » Tue Jul 28, 2015 2:30 am

Hi,

Did you get the reason for cefexecuteprocess returning value 0 ?

Thanks.
aksvs
Newbie
 
Posts: 1
Joined: Tue Jul 28, 2015 2:26 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 85 guests