-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CefSharp3 crashes shortly after startup in some proxy use cases #309
Comments
I grabbed the correct libcef.dll debug build and symbols from the cefbuild downloads. The crash was the same but the crash data looked different, and pointed to an exception in platform-win32.cc. But I don't have that source file. I'll include more info a little later. |
Try with this project: https://github.com/cefsharp/CefSharp.MinimalExample It should be a well-working, simple example of how to get CefSharp3 running in your (WPF) app. Does it compile and run on your machine? |
Hi @oxbough and welcome! Argh! @perlun just beat me on the finish line here - still - here's the more elaborate post Your persistence with getting to the bottom of this is appreciated. That's the kind of attitude we need around here 👍 The codebase have evolved some since 3.29 and IMHO have seen some good improvements regarding resource management etc. with a lot of the heavy lifting done by @JanEggers. We are working towards 3.31 (which will be named just 31.0.0 according to the venerable @perlun 😉). So to save you some hassle with something that might end up being either due to:
I'd suggest you check if you still see this issue with either a CefSharp source build or through the Compared to 3.29 the source build has changed to now pull in the upstream CEF code through NuGet since #288 got merged. This way you are able to compare apples to apples with There are also since today #137 (comment) the first functional (on my machine at least) NuGet packages which I'm really keen on getting feedback on A good testing vehicle for that is the https://github.com/cefsharp/CefSharp.MinimalExample repo. |
Hehe! 😉 I'm actually on the Heathrow Express at the moment, on my way back home from London. Too bad they have Internet on the trains these times, for you... 😀 |
hah! Here comes hi-speed @perlun .... BTW try looking at the change you just did with 31.0.0 ChangeLog (as per my suggestion) as someone not logged in to GitHub - not very informative! |
That's a good point. How do we come around that? |
No problem getting the repos. But it's still failing. |
Huh, that's not intended behaviour at all! I'm on win7 + VS2010 too but with SP1. Let's try isolating it to CEF alone or with CefSharp on top. Either build |
OK. I downloaded the cef-binary zip file for 3.1650.1562, opened the vs2010.sln file and built the cefclient.exe. That works. I used it's larger libcef.dll with the CefSharp.Wpf.Example.exe file I built and the wpf example still crashes like before. |
Oh, And while the wpf example still crashes, the winforms example does not crash, but it won't navigate. The navigation url window and the back and forward buttons exist, but the HTML rendering area remains blank. |
Also grabbed the cefsharp cef-binary repo and built it. Same results as the cef-binary zip file as above, as expected. cefclient works there. |
Yes the WinForms thing is in need of quite some love. If you apply jornh@e951c2f I hope - for consistency - you should have that chrashing too? |
Here is a dropboxed MinimalExample x86 Release binary zip I built with VS2010 SP1 and this https://staging.nuget.org/packages/CefSharp.Wpf/3.31.0-pre1 fairly recent 3.31 staging NuGet - which runs just fine on my Lenovo T420 machine. I guess that will also crash on your machine? But then we have ruled out your build environment as source of the problem. My understanding of the problem will then be: "cefclient.exe works in your environment, anything CefSharp3 on top of CEF3 crashes due to your hardware or general Windows configuration".. If so, it will basically leave us back at square one - and next step is probably to continue from where you were heading with debugging the crash from the top of this issue - or what do you think? Or could you try on another machine? Oh, one last thing: Does it get as far as it leaves something in the |
Thanks @jornh . Yes when I apply jornh/CefSharp@e951c2f the winforms example navigates to the page and crashes. I tried finding the line of code where the crash happens. The debugger told me line 5649 in api.cc, but I couldn't figure out which version of that file I needed to gab. Nothing seemed to make sense. I grabbed the version Nov 14 based on when I thought the particular version of CEF was built. And tried versions around that date. Nothing matched up with the disassembly. I will try the info in your second post. |
OK, thanks for the update! I haven't really seriously dug around up the CEF -> Chromium food chain before. But here is what I think (hope?) we need to follow:
So, how/where did you dig up e.g. that |
I pulled the symbol files from cefbuilds. In one instance I even replaced the libcef.dll with the debug version available. When it crashes, I collect the dmp file generated and load it into VS2010. That told me the exception happened at the specific location, ie. filename and line number. VS2010 tells me it not the matching source file, and I can see that it was about 200 lines off on the location. Right file, wrong version. It appears to be crashing in a call to an "External::new" method or nearby in the file. I think it's in the v8 javascript engine. The source for the file itself was obtainable in all revisions via google search. |
I ran the minimal example you provided. It crashed the same way, and the crash dump showed it happened at the same place. |
I think the problem is that you lack the VS2012 C++ redistributable (Yes, 2012) on the machine in question. Since |
Thanks @perlun. You are probably correct. |
Duh, I knew that already with VCRedist 2012 for the builds using the official CefSharp NuGets wrapping all the native/unmanaged code built on @perlun's VS2012 - so why did I not write it? Still, how would that explain this crash with a "CefSharp from sources build"?
Hmm, here's hoping that at least installing VCRedist 2012 gets you running with MinimalExample ... Maybe we should add runtime detection of the VCRedist version matching what CefSharp.Core.dll got compiled with? It should be the only remaining dependency in the FAQ not accounted for now that all the others should be handled by the |
I'm having trouble following what I need to do for the redist. I downloaded a VC2012 redist file (about 7 MB) and installed. I did this rather silently. Never created the directories noted in the FAQ. I found an msvcr110.dll in my system32 dir. But now what? I'm installing VS2012. Hopefully I get the files from that? |
Download and install like you did should be all that is needed. The installer for it is quite silent... After this you should be able to get MinimalExample running when building with VS2010 update the directory noted in the FAQ is where you copy it from (on a developer machine with VS2012) if you as a developer want to just copy the two DLLs as part of deploying your CefSharp based app to client machines. So it's the alternative to make sure VCRedist is deployed on very client. |
OK. Your minimalexample binary runs without crashing but displays only about:blank. I rebuilt the minimal example but that crashes. Could there be an overriding setting in my VS that changes the output even when using a pre-canned solution file? |
Ok so it seems installing the VCRedist made a difference - at least to my binary drop even though it's not running as expected - any clues in it's debug.log file? Can you get it running on another machine? The continued crashing with your VS2010 builds really baffles me. But as you say, it can be any little detail or setting. Again switch environment somehow - another machine - or as you suggest - try a fresh VS2012 install. It might flip something into the right position. This remote debugging really is frustrating. ... And I'm not even the one who has to look at all the crashes 😀 ... |
It seems it crashes when navigating. My build of cefsharp.wpf.example sat at about:blank without crashing. It let me type in google.com, and crashed a second after hitting "go". Thanks for all the suggestions. I am using a Lenovo T510. I did run a copy on a desktop yesterday, That crashed the same way. But of course, there was no VC2012 redist on that. But even the minimal example you built still crashes on my laptop. |
I did try the various executables on an HP desktop PC running Windows 7 Home Premium. |
Hi @oxbough when you say crash do you have the debugger connecting to the project and can you get us some information about the crash? (Missing dependencies...etc) I would suspect the debug Cefsharp.dll is failing to load the vs debug dependencies. If you want to double check go ahead and download http://technet.microsoft.com/en-us/sysinternals/bb545021.aspx |
Thanks @brock8503 If I run in debug mode within VS, it crashes, but does not stop in the debugger. Just terminates as if not in the debugger. Perhaps I have some settings that are avoiding it ??? I will look at running procmon. Won't happen until Monday now. I also plan to create a VM on a lab PC and load a fresh OS to see if it behaves differently. |
Still failing. :( Created a Win7 Prof 32 bit VM, installed the VC2012 redist, applied DotNet 4.0, ran a release version of CefSharp.Wpf.Example. It crashed as usual. |
OK, I found out how to capture the exception in VS2010 ...
And I get the same info in debug mode as using the dump file. Line 5649 in api.cc. But still don't have the right version of api.cc |
That release version - did you build it yourself form the CefSharp sources?
32 bit or 64 bit OS? Which VCRedist versions does it have if you look under "Add remove programs"?
32 bit or 64 bit OS? Which VCRedist x86 versions does it have? Note: Just to clarify, whenever you use an "official" CefSharp.dll use VCRedist 2012 - when you use those you build from source with your VS2010 SP1 make sure the machine you run it on has VCRedist for VS2010 SP1. Maybe you are already fully aware but better be on the safe side I just tried my dropbox .zip from above of MinimalExample on a VMWare Server 2008 R2 (yeah 64bit) which had only 2008 VCRedist to start with. It crashed on startup - as expected. I then installed http://www.microsoft.com/en-us/download/details.aspx?id=8328 and it ran as expected. I forgot to mention that in the "excitement" yesterday Reason: The obvious; I built it with VS2010 SP1 - not VS2012 as @perlun does for the official binaries. I note one minor difference here. The crashes are different in that without the right VCRedist it never gets as far as launching any window (from what I have seen). What you experience is it crashes when it gets down to presumably allocate resources for something V8'ish ... in other words - "lets process on some JavaScript". Also, does it get as far as it gives any clues in I could see tomorrow if I can get hold of a good ol' XP 32bit and see what happens when I throw some CefSharp3 at it. |
I have a 64 bit Win7 Prof. My builds have all been 32 bit. I did one build of x64, just to try that. Didn't work either. I only installed the x86 (32bit) 2012 redist - update 4 (version 11.0.61030). I did build the exe myself from the cefsharp3 sources. I'm concentrating my app starts on cefshart.wpf.example.exe built from the cefsharp repo, but my own simple app built using the simple app suggestion examples behaves the same way. I also installed the x64 2012 redist, and I downloaded x86 and x64 2010 redists and selected "repair" on start of these packages. cefsharp still failing. Oh, the debug log has several entries like this ... |
Found the following post with what appears to be the same problem with CEF3 a year ago. |
As suggested by the post, passing the command line parameter --no-proxy-server cures it from crashing. Why does this fix it? Why does it crash on some PCs and not others? |
hah - just found the same! proxy settings - wow ... sound like you are onto something now 😄 ... about time we got closer to it ... |
Right! It shouldn't.. Well AFAIK one difference is the Wpf example uses offscreen rendering. Cefclient doesn't. update not to say that it's directly related. Just to say that there are differences ...
Not really ATM - is both your simple app and cefsharp.wpf.example built from recent |
My simple app is still using the downloaded cefsharp 29 library. I'd say your zip drop of minimalexample is also completing the page in a delayed manner. Some parts of the google page came up almost immediately, but the large colourful font Google name was really delayed the first time I launched it. Faster on subsequent launches. I'll move my new work over to the newer master. |
And the CEF issue born out of above forum thread is still open - and confirmed by others with CEF 1650 ~ Chromium 31 https://code.google.com/p/chromiumembedded/issues/detail?id=927 so now we can adjust title and put a few flags on this issue |
CefSharp does not appear to have a way to programatically set no-proxy-server for CEF like it does for MultiThreadedMessageLoop=true. |
That might be the case. Please investigate and see if you could add that as an option, and submit a pull request. We'll leave this case open in the meanwhile. |
@oxbough the proxy settings are required at Cef Init time so you will need to pass this parameter as args to the main program wrapping the cef initialize call. |
@oxbough @jornh our team actually was able to reproduce this and this workaround worked for us. http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11711 |
With #365 now merged the reason for keeping this issue open: #309 (comment) is gone. So let's close this one. The upstream issue isn't gone though. Hopefully it will some day when we update ... |
My organization is very interested in embedding CEF3 in our WPF app. I am starting investigation of CefSharp3. I used NuGet to populate my VS2010 solution with the latest CefSharp3 files and built a simple example. I had done the same for the latest CefSharp1. The CefSharp1 build works, but the CefSharp3 version crashes shortly after startup. So I downloaded the CefSharp-3.29.0-pre.0 source zip file and built the CefSharp.Wpf.Example executable from there. It also crashes shortly after startup. For this I see the rendering of the custom://cefsharp/home page for a few seconds and then it crashes. Using the VS2010 debugger on the dump file shows that there is null pointer exception in libcef.dll at 081470fd...
081470DB cmp eax,40h
081470DE jge 081470EA
081470E0 mov esi,dword ptr fs:[eax_4+0E10h]
081470E8 jmp 081470FD
081470EA mov eax,dword ptr fs:[00000F94h]
081470F0 mov ecx,dword ptr ds:[94BE1C0h]
081470F6 mov esi,dword ptr [eax+ecx_4-100h]
*** 081470FD cmp dword ptr [esi],1
08147100 je 08147155
08147102 cmp byte ptr ds:[94BE2B7h],0
08147109 jne 08147114
0814710B cmp byte ptr ds:[94BE2B6h],0
08147112 je 08147122
Registers:
EAX = 0000002F EBX = 09E21CC0 ECX = 00000000 EDX = 0BDDF7E0 ESI = 00000000 EDI = 09E21CC0 EIP = 081470FD ESP = 0BDDF6C8 EBP = 0BDDF6D4 EFL = 00010283
Why do I get this? Is there a solution available?
If I can't get a working version of CefSharp3 built by me under VS2010, I can't even start to integrate it into our project.
The text was updated successfully, but these errors were encountered: