NCControls throw exceptions under Delphi 12
I just recompiled my testapp under D12 without any changes compared to D11, now the app throws a gazillion access violation exceptions on start. Using madExcept to catch them, this is what seems to be the root issue:
main thread ($486c): 000005db +000 ??? 00eba971 +139 VCLStylesTest.exe Vcl.Themes TStyleHook.WndProc 00ebab52 +00a VCLStylesTest.exe Vcl.Themes TMouseTrackControlStyleHook.WndProc 00f0bb04 +110 VCLStylesTest.exe Vcl.Forms TFormStyleHook.WndProc 00eba196 +066 VCLStylesTest.exe Vcl.Themes TStyleHook.HandleMessage
main thread ($486c), inner exception level 1:
EAccessViolation, Zugriffsverletzung bei Adresse 00C174AF in Modul 'VCLStylesTest.exe'. Schreiben von Adresse 00F65701 00c174af +007 VCLStylesTest.exe System.Types Rect 010f03b5 +069 VCLStylesTest.exe Vcl.Styles.NC 2022 +8 Detour_TFormStyleHook_GetBorderSize 00dac8ae +016 VCLStylesTest.exe Vcl.Graphics TCanvas.SetPenPos 00daca24 +04c VCLStylesTest.exe Vcl.Graphics TCanvas.SetHandle 00eba682 +056 VCLStylesTest.exe Vcl.Themes TStyleHook.WMNCPaint 00eba971 +139 VCLStylesTest.exe Vcl.Themes TStyleHook.WndProc
main thread ($486c), inner exception level 2:
EAccessViolation, Zugriffsverletzung bei Adresse 00000500 in Modul 'VCLStylesTest.exe'. Ausführung von Adresse 00000500 00000500 +000 ??? 00eba971 +139 VCLStylesTest.exe Vcl.Themes TStyleHook.WndProc 00ebab52 +00a VCLStylesTest.exe Vcl.Themes TMouseTrackControlStyleHook.WndProc 00f0bb04 +110 VCLStylesTest.exe Vcl.Forms TFormStyleHook.WndProc 00eba196 +066 VCLStylesTest.exe Vcl.Themes TStyleHook.HandleMessage
main thread ($486c), inner exception level 3:
EAccessViolation, Zugriffsverletzung bei Adresse 00C174AF in Modul 'VCLStylesTest.exe'. Schreiben von Adresse 00F65701 00c174af +007 VCLStylesTest.exe System.Types Rect 010f03b5 +069 VCLStylesTest.exe Vcl.Styles.NC 2022 +8 Detour_TFormStyleHook_GetBorderSize 00dac8ae +016 VCLStylesTest.exe Vcl.Graphics TCanvas.SetPenPos 00daca24 +04c VCLStylesTest.exe Vcl.Graphics TCanvas.SetHandle
And so on...
After just removing/outcommenting the NCControls, the app is working without any more problems.
Happens with the demo project "Vcl Styles Utils NC (Demo App)" from your repository as well.
I am experiencing this also. Is there any solution besides excluding the VCL.Styles.NC unit from my project?
I also have the same problem
Has anyone found any solution ?
I just excluded that unit from my project. Turned out that I wasn't using it anyway.
From: luapfr @.> Sent: Thursday, February 22, 2024 3:48 PM To: RRUZ/vcl-styles-utils @.> Cc: John Dorlon (jdorlon) @.>; Comment @.> Subject: Re: [RRUZ/vcl-styles-utils] NCControls throw exceptions under Delphi 12 (Issue #311)
CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.
I also have the same problem
Has anyone found any solution ?
— Reply to this email directly, view it on GitHubhttps://github.com/RRUZ/vcl-styles-utils/issues/311#issuecomment-1960373946, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANC3X63PHNB4LWA6JTWNG2DYU64LXAVCNFSM6AAAAAA7OBRXAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGM3TGOJUGY. You are receiving this because you commented.Message ID: @.***>
I use these buttons a lot in form captions, it would be a great correction