Question

I'm using DCEF3 (https://code.google.com/p/dcef3/) with Delphi 7.

The CEF version, embedded with the DCEF, is 3.1547.1412.

The Problem

On machines with Windows 2008 R2, some times when my application loads, it crashes with an event of type BEX.

I only was able to solve the crash deactivating the DEP on windows, for this I used the prompt command:

bdcedit /set nx AlwaysOff

But this cannot be the solution.

I cannot force my users to disable DEP on their servers.

Here is the APPCRASH report (in Portuguese):

    Assinatura do problema:
      Nome do Evento de Problema:         BEX
      Nome do Aplicativo:                          MyExecutable.exe
      Versão do Aplicativo:                         1.1.0.1
      Carimbo de Data/Hora do Aplicativo:            2a425e19
      Nome do Módulo de Falhas:            dhcpcsvc6.DLL
      Versão do Módulo de Falhas:           6.1.7601.17970
      Carimbo de Data/Hora do Módulo de Falhas:              50745f7c
      Deslocamento de Exceção:               00001730
      Código de Exceção:                            c0000005
      Dados de Exceção:                             00000008
      Versão do sistema operacional:        6.1.7601.2.1.0.18.10
      Identificação da Localidade:             1046
      Informações Adicionais 1:                 a7aa
      Informações Adicionais 2:                 a7aa91f17ea749d42a4de3b390fa5b3d
      Informações Adicionais 3:                 a7aa
      Informações Adicionais 4:                 a7aa91f17ea749d42a4de3b390fa5b3d

Can somebody help me to find the root of the problem or some information about why this is happening?

Was it helpful?

Solution 2

According to this articles:

I added the following directive to add to the header the TSAWARE info:

{$SETPEOPTFLAGS $8000}

After some exhaustive tests, the problem stopped.

OTHER TIPS

In the comments, you link to a forum that explains that Chromium intentionally enables data execution prevention by calling SetProcessDEPPolicy. DEP is known to interfere with Delphi 7. In that light, I see three solutions (listed in descending preference order):

  1. Upgrade to a version of Delphi that's less than a decade old. You'll get an RTL that's DEP-aware.
  2. As mentioned in the forum, compile Chromium yourself and exclude the DEP-related code. You could do that, for example, by editing ApplyProcessMitigationsToCurrentProcess in process_mitigations.cc to make it ignore the MITIGATION_DEP and MITIGATION_DEP_NO_ATL_THUNK flags.
  3. Run bcdedit, as you've already found. When you do that, you disable DEP at the OS level, and that forces Chromium's calls to SetProcessDEPPolicy to fail.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top