delphisegmentation-faultaccess-violationdelphi-11-alexandriaoffice-web-components

OWC11 in Delphi 11.2 Alexandria - Access Violation on TPivotTable.Create


We now receive an access violation when creating an instance of the TPivotTable class. This has always worked in previous Delphi versions without issue.

Steps to reproduce:

Import the type library for OWC11 (Office Web Components).

Create an instance of TPivotTable.

An access violation will occur.

Breaking on that exception in the debugger, we're at Line 837 in Vcl.OleCtrls, seems to have to do with license checking perhaps.

LicKeyStr does look suspiciously bogus to me. "My run-time license key" However, this is the same when building in previous Delphi versions (particularly Berlin where we're migrating from) and nothing breaks. It works there, but not with the new compiler in Alexandria.

This doesn't seem to be caused by anything special in our application code. I can reproduce it in a standalone program that does nothing but try to create the pivot table object.

I am spinning my wheels a bit on this and time is of the essence. Any suggestions for a possible cause or fix here would be greatly appreciated.

To summarize, I expected to be able to import the type library for OWC11 fresh in the new Delphi 11 IDE and have everything work as usual. But instead, we immediately segfault when creating an instance of TPivotTable.


Solution

  • I found the immediate cause (although I am unsure why it breaks things).

    Delphi 11 has enabled the NXCompat (DEP) linker flag by default, which is actually not presented in the linker options at all in previous Delphi versions (where it is disabled by default).

    It's listed under "Prevent Data Execution compatible" in the linker options. Disabling it prevents OWC from blowing up the application.

    We'll simply have to live without this for the short term.