[WayBack] Ouch: “It’s due to some Castalia code, that’s merged in Delphi since XE8. It’s only possible to reduce this issue, so it will happen less often… – Thomas Mueller (dummzeuch) – Google+
“It’s due to some Castalia code, that’s merged in Delphi since XE8. It’s only possible to reduce this issue, so it will happen less often. Use: Tools – Options – Editor Options – Color – Structural Highlighting and switch everything off. Looking at how the code is integrated into the IDE, this results in less editor parsing and repainting. Irrespective of that, the handler that causes the Access violation is still attached to the editor. So basically, we will have to wait for this to be fixed in 10.3.”
The errors in 10.2 are related to “EditorStructuralHighlight.TStructuralHighlighter.EvQuery” – Google Search, but older versions can have a different path.
Lets hope that by a new Delphi version has been released that fixes this, but do not expect older versions to get fixes for it.
For XE8, it is enough to disable Castalia, which is on the list of packages to disable in …/Native/Delphi/Scripts/List-Delphi-Installed-Packages.ps1.
More recent versions have the old Castalia code base much more rightly integrated, so the only way is to disable Structural Syntax Highlighting in the Editor options.
More at:
- [WayBack] Creating a New Unit or New Form in Delphi 10.2.3 causes Access Violation – Forum – Embarcadero Community
- [WayBack] Adding an Unit or New Form in Delphi causes Access Violation – Stack Overflow
When I add a file or form to a Delphi project, often I get an access violation. Then I have to restart Delphi, open the project and try it again. Then it sometimes workes, sometimes I get the same Access violation. I am having this issue in all Delphi versions since XE8.
…
Looking at how the code is integrated into the IDE, this results in less editor parsing and repainting. Irrespective of that, the handler that causes the Access violation is still attached to the editor.
I have seen this happen too, but so intermittently that I could not point it back to this code (especially since I usually have Model Maker Code Explorer and GExerts loaded which makes it harder to trace back issues to actual Delphi things).
–jeroen