Skip to content
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

SynEdit component in a DLL project - access violation during finalization of unit SynDWrite.pas #249

Open
shmorsecode opened this issue Jan 16, 2024 · 1 comment

Comments

@shmorsecode
Copy link

shmorsecode commented Jan 16, 2024

I'm using SynEdit checked out at commit a0e61b7. Compiler is Delphi 10.2 Tokyo.
Access violation happens during System.FinalizeUnits.
Here is call stack extract from madExcept 5.1.4:

main thread ($11c0):
7671e4f2 +62 KERNELBASE.dll                                    RaiseException
03fce914 +10 lib_synedit_issue.dll System            37239 +10 @IntfClear
0420eebc +4c lib_synedit_issue.dll SynDWrite           391  +0 TSynDWrite.Destroy@
03fca10a +3e lib_synedit_issue.dll System            22705 +24 FinalizeUnits
04066cf4 +54 lib_synedit_issue.dll madExcept                   InterceptFinalizeUnits
04066d04 +00 lib_synedit_issue.dll madExcept                   InterceptHalt0FinalizeUnits
03fca594 +a8 lib_synedit_issue.dll System            24183 +94 @Halt0
03fd1a16 +46 lib_synedit_issue.dll SysInit            1295 +21 @InitLib
042e7bd7 +0b lib_synedit_issue.dll lib_synedit_issue    41  +0 initialization
77e3cf5e +fe ntdll.dll                                         LdrUnloadDll
76701f40 +10 KERNELBASE.dll                                    FreeLibrary
75e200f7 +17 KERNEL32.DLL                                      BaseThreadInitThunk

I prepared a minimal reproducible example for you, please find it attached below:
synedit_issue.zip

Perhaps this is a similar story to what's described on this DevExpress documentation page: DevExpress Components in DLL Projects

pyscripter added a commit to pyscripter/SynEdit that referenced this issue Jan 16, 2024
@pyscripter
Copy link
Contributor

Call TSynDWrite.Finalize before unloading the DLL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants