2

I'm trying to use DCEF3 TChromium as a replacement for TWebbrowser component. I downloaded the packages and installed it on my IDE (Delphi 2007).

I'm testing the demo on demos\guiclient and when i try to open certain web pages, i get tons of Access Violation exceptions and my app crashes. If i'm inside Delphi, i get this exception before Delphi itself crashes :

'Assertion failure : 'item.src' in \win32scr\DBKIMPL.CPP' at line 2691'

One example of a page that has this problem is www.whatsmyuseragent.com

One example of a page that opens correctly is www.google.com

After a lot of testing i found out if i set TChromium.Options.Javascript to STATE_DISABLED, the app does not crash anymore. BUT it won't run the JS code of the page, so it's useless as the page itself won't load properly.

Any ideas would be very appreciated, this issue interests everyone who have apps using TWebbrowser and need urgent a replacement for it. Because TWebbrowser uses Internet Explorer and it has been discontinued, even if Microsoft keeps shipping MSHTML in future Windows versions, it won't follow future web standards and pages won't load correctly in the future. In fact, i'm already having this kind of issue in pages using most up-to-date web standards.

delphirules
  • 6,443
  • 17
  • 59
  • 108
  • 1
    hard to say without code? but first, where did you download the client, I use [this distribution](https://github.com/hgourvest/dcef3). just fire up the cefclient demo (or the guiclient demo), change cefuseragent string in ceflib.pas to a recent chrome version and load WhatsApp Web. It works for me (Delphi XE7 under W8.1 x64) – whosrdaddy Dec 10 '15 at 12:36
  • I did not remember where i download, but i will download again from the source you mentioned and try again ; i post the results here. Thank you for the info ! :) – delphirules Dec 10 '15 at 16:56
  • @whosrdaddy is there a way to contact you directly ? i need some urgent support about DCEF3, i can pay for it. – delphirules Dec 10 '15 at 17:00
  • I am not a DCEF guru either. Did you try the demo? – whosrdaddy Dec 10 '15 at 17:34
  • Yes, it runs on Delphi XE, but on Delphi 2007 i get tons of AVs and the app crashes... Same files, same installation. – delphirules Dec 10 '15 at 18:10
  • It seems that the lib only supports from XE2 and up. Why insist on D2007 if you have XE? – whosrdaddy Dec 10 '15 at 19:53
  • Actually i could run it on D2007, the problem only occurs if i use the TChromium component ; the demo runs ok because it seems to use another component , created at runtime. I'm trying to understand more, problem is the documentation is very limited... – delphirules Dec 11 '15 at 14:50
  • Post the code you use to create and load the url – Toby Allen Dec 21 '15 at 12:46
  • @TobyAllen it's just chromium1.load('www.whatsmyuseragent.com'); I edited the post with a link to download my app source code. – delphirules Dec 21 '15 at 13:03
  • @delphirules you have 700 rep points so you must have figured it out by now. You need to post your code in Stackoverflwo, not as a download from a 3rd party site. i don't want all your code, i'm not going to spend my afternoon on your problem. if the code above is all the code you are using, then of course you're getting an AV as you have not created your object. The most basic knowledge of delphi would point this out to you . Rather than offering 50 bounty, why not actually post the code as you have been asked to do by at least 3 people. Update your question with info from comments – Toby Allen Dec 21 '15 at 13:14
  • have you tried the solution here http://stackoverflow.com/a/7455200/6244 – Toby Allen Dec 21 '15 at 13:17
  • Did you look at the solution to the other question I link to above where you contacted me, it looks like this is the same issue? – Toby Allen Dec 21 '15 at 13:20
  • I could find out if i set TChromium.Options.Javascript to STATE_DISABLED, the app does not crash anymore. BUT it won't run the JS code of the page, so it's useless. No solution yet, but the good news if was possible to note the crash has to do with something related to Javascript. – delphirules Dec 21 '15 at 18:36
  • @whosrdaddy, i've discovered if i disable javascript, the app won't crash anymore, but the page won't load correctly because any JS won't run. Any ideas ? – delphirules Dec 22 '15 at 12:55
  • Rather than be rude to those who are merely pointing out the guidelines here, which require *all relevant source code to be in the question itself*, you should actually pay attention. Posting a link to source on an external site is specifically against the site guidelines. Expecting us to leave this site to get information necessary to the question itself is inappropriate, and so is expecting us to download 45MBs of cruft to try and help you solve a problem. Please review the [How to ask](http://stackoverflow.com/help/how-to-ask) page. – Ken White Dec 22 '15 at 17:58
  • @KenWhite there is no need to post sources anymore, as the same problem occurs while using the demo provided by the DCEF3. Sorry but i was rude only after the guy was rude with me. – delphirules Dec 22 '15 at 18:13
  • No one was rude with you. You were asked *repeatedly* to post the source code here in your question, and your response was to post a 45MB file off-site with a link, and then to be rude with your remark about how the person should *provide real help or just ignore the question*. If you want **real help** here, follow the guidelines and **include the relevant source here in your question** like everyone else. IOW, *please follow the guidelines here or ask your questions somewhere else*. (No more rude than *provide real help or just ignore the question*, right?) – Ken White Dec 22 '15 at 18:18
  • @KenWhite as i told before, there is no need of source anymore, the problem occurs on the demo inside the component itself. For me phrases like 'i'm not going to spend my afternoon on your problem' and 'the most basic knowledge of delphi would point this out to you' are rude. I'm not new on SO and know how things work here. – delphirules Dec 22 '15 at 18:29
  • If you're *not new on SO and know how things work here*, you should have posted your code in the first place, as Toby Allen pointed out to you (in the comment you're calling rude). As a *not new on SO* user, we shouldn't **have** to ask you for the code; it should be there in the original question, so telling us you're *not new* doesn't match your behavior here. Act like you're not new, and include the relevant information in your post in the first place. – Ken White Dec 22 '15 at 21:22
  • @KenWhite You are right about the code, indeed if i tested with the component demo, a lot of unnecessary talking would be avoided. Anyway, i edited the post now and the problem is very clear. So please accept my apologies. Now i'm wondering, can you help me with any information about the problem or you came here just to complain ? :D – delphirules Dec 22 '15 at 22:02

1 Answers1

3

After days of struggle, i found out i was using the master branch and there is a newer branch (2454). After update the problem is fixed.

The link for download is https://github.com/hgourvest/dcef3/tree/2454

delphirules
  • 6,443
  • 17
  • 59
  • 108