Hanging when calling GetText/GetSource

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.

Hanging when calling GetText/GetSource

Postby emerick » Sat Mar 13, 2010 8:51 pm

I can't quite figure this one out. When I call browser->GetMainFrame()->GetText(), I sometimes end up hanging in CefBrowserImpl::GetText when it calls WaitForSingleThread to wait for the UI thread callback. The same thing happens when calling browser->GetMainFrame()->GetSource(). I'd say it hangs at least half the time, with no apparent rhyme or reason. It feels like a timing bug to me, but I'm not sure. Am I doing something wrong here? I'm running the CEF in multi-threaded message loop mode, BTW.

Thanks,

Emerick
emerick
Expert
 
Posts: 154
Joined: Sun Feb 21, 2010 7:57 pm
Location: Belmont, MA

Re: Hanging when calling GetText/GetSource

Postby emerick » Mon Mar 15, 2010 12:38 pm

This behavior can also be seen if you modify cefclient.cpp to call browser->GetMainFrame()->GetText() when the ID_TESTS_JAVASCRIPT_EXECUTE menu option is selected (for example). Any idea what would cause this behavior?
emerick
Expert
 
Posts: 154
Joined: Sun Feb 21, 2010 7:57 pm
Location: Belmont, MA

Re: Hanging when calling GetText/GetSource

Postby jerryprez » Sat Mar 27, 2010 5:22 am

I faced this type of problems too.
Does anyone have a solution or clue on how this happens?
It's strange that it won't happen if I run step by step through IDE debugger (when the cefclient UI is completely hidden, i.e. no UI msg processing)
jerryprez
Newbie
 
Posts: 7
Joined: Thu Feb 25, 2010 6:04 am

Re: Hanging when calling GetText/GetSource

Postby magreenblatt » Mon Mar 29, 2010 1:00 pm

I've created an entry in the CEF issue tracker for this: http://code.google.com/p/chromiumembedd ... tail?id=79

I am unable to reproduce the problem using CEF rev 72 on Windows 7 64bit. What operating system version are you using? Does the problem tend to occur more often with certain URLs than others? If so, please provide the URL(s) where you are experiencing this problem.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Hanging when calling GetText/GetSource

Postby jerryprez » Mon Mar 29, 2010 10:40 pm

Glad to hear your response, Marshall.
I've just run this with http://www.google.com and youtube.com
To reproduce this bug, just make some modifications in cefclient.cpp like Emerick suggested and undefine the TEST_SINGLE_THREADED_MESSAGE_LOOP.
When cefclient started, select the appropriate menu item, if it doesn't hang for the first time, try it again then you'll likely get it hang.
I built cef with VS2008 SP1 on Windows XP SP3 using cef r71 synced against chromium trunk@38776.
Hope you can give us some clues.
Regards.
jerryprez
Newbie
 
Posts: 7
Joined: Thu Feb 25, 2010 6:04 am

Re: Hanging when calling GetText/GetSource

Postby magreenblatt » Tue Mar 30, 2010 8:15 am

Hi Jerry,

What are the specifications for the computer that you are using, specifically processor and memory?

Thanks,
Marshall
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Hanging when calling GetText/GetSource

Postby emerick » Tue Mar 30, 2010 9:30 am

Hi Marshall,

I'm running on a 32-bit Windows 7 computer using r71 of the CEF. The problem seems to occur with any URL, but I've been testing with http://www.google.com/ for the most part. When the problem occurs, I'm left hanging at the call to WaitForSingleObject. Although PostTask was called to launch the UIT_GetDocumentTextNotify function, that function ends up not being called (i.e., I don't see it getting triggered in the debugger), and thus never signals the calling thread to wake up. As I mentioned, this probably happens about 50% of the time or so. Obviously, this only occurs when not running on the UI thread.

Let me know if you need me to try anything. I'm anxious to figure this out.

Thanks,

Emerick
emerick
Expert
 
Posts: 154
Joined: Sun Feb 21, 2010 7:57 pm
Location: Belmont, MA

Re: Hanging when calling GetText/GetSource

Postby jerryprez » Wed Mar 31, 2010 3:27 am

magreenblatt wrote:Hi Jerry,

What are the specifications for the computer that you are using, specifically processor and memory?

Thanks,
Marshall


Hi Marshall,
My computer is a DELL Latitude D531 with AMD Turion64 X2 and DDRAM2 800MHz.
I also build and test with my desktop (Intel Core2 Duo E4600, DDRAM2 800MHz) and the problem still persists.
I'm trying on this issue for several days now and still no lucky.

@Emerick: Wish you more luck! ;)

Thank you!
jerryprez
Newbie
 
Posts: 7
Joined: Thu Feb 25, 2010 6:04 am

Re: Hanging when calling GetText/GetSource

Postby jerryprez » Wed Mar 31, 2010 10:28 pm

I've updated to r72 (vs trunk@42941) and the problem still happens.
jerryprez
Newbie
 
Posts: 7
Joined: Thu Feb 25, 2010 6:04 am

Re: Hanging when calling GetText/GetSource

Postby magreenblatt » Wed Apr 07, 2010 3:59 pm

Please see my comments and suggested resolution in the issue tracker.

http://code.google.com/p/chromiumembedd ... tail?id=79
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests