cnwizards icon indicating copy to clipboard operation
cnwizards copied to clipboard

AV after exit RAD Studio 10.2.3 - 12.1

Open LingamYoni opened this issue 6 years ago • 46 comments

New Delphi Pro 10.2.3 installation + CnWizards_1.1.4.936_Unstable. I get the following error message on exit RAD Studio:

Application Error Exception EAccessViolation in module rtl250.bpl at 00017898. Access violation at address 50067898 in module 'rtl250.bpl'. Read of address 04A33390.

RAD Studio XE with the same CnWizards closes without problems. Tried CnWizards stable 1.1.4.924 - the same trouble. Completely disabled all CnWizards settings - I still get an exception. Any ideas?

LingamYoni avatar Jun 22 '18 07:06 LingamYoni

This problem is very hard to investigate. Could you help us to do some checking? I built a Minimum CnWizards Framework DLL in attachment. Download and unzip it to replace the original DLL, and run Delphi 10.2.3 and exit, Then check the AV dialog shows or not.

If still shows, it means the bug lies in our framework.

CnWizards_D102T.zip

shanzhashu avatar Jun 30 '18 16:06 shanzhashu

I replaced the original DLL with a Minimum CnWizards Framework DLL. After run Delphi 10.2.3 and exit:

Application Error Exception EAccessViolation in module rtl250.bpl at 00017898. Access violation at address 50067898 in module 'rtl250.bpl'. Read of address 04943390.

Unfortunately, the same AV... What else can I do to help find the bug?

LingamYoni avatar Jul 02 '18 06:07 LingamYoni

Oh, seems the deep bug is truly in our framework. Now I remove more "Notification" Service and built a new DLL, please try it for us again? CnWizards_D102T_no.zip

shanzhashu avatar Jul 02 '18 14:07 shanzhashu

I tried CnWizards_D102T_no.zip, but alas:

Application Error Exception EAccessViolation in module rtl250.bpl at 00017898. Access violation at address 50067898 in module 'rtl250.bpl'. Read of address 04AA3390.

The origin of the problem lies somewhere deeper...

LingamYoni avatar Jul 03 '18 05:07 LingamYoni

I still have that burning desire to help find a bug. Please can you remove more code from the dll? I would have tested it for you. Without CnWizards, I like without hands :)

LingamYoni avatar Jul 13 '18 05:07 LingamYoni

Thanks for your support. I'm still looking for clues in our framework. so difficult. ;-(

shanzhashu avatar Jul 16 '18 22:07 shanzhashu

For information. I tried the first version with support for RAD Studio 10.2 - CnWizards_1.1.2.891_Unstable - and got the same error. Maybe this will help to localize the bug? BTW, the latest nightly build 1.1.4.940 also causes AV.

LingamYoni avatar Aug 01 '18 06:08 LingamYoni

1023_2DLL.zip I built 2 DLLs without shortcut or menu/editors, could you help to change the DLL name to CnWizards_D102T.dll and try to test them again? Hope at least one can make the AV disappear.

shanzhashu avatar Aug 03 '18 14:08 shanzhashu

I tested both dll. It's crazy, I know, but... AV still present. There's something else that's not right.

LingamYoni avatar Aug 06 '18 05:08 LingamYoni

New Dlls come again! We'll continue to remove the possible buggy parts and test them. Thanks.

The password is 123 CW_D1023T_DLL.zip

shanzhashu avatar Aug 11 '18 14:08 shanzhashu

Tested, but alas... AV still present. I'm waiting for even more minimalistic Dlls.

LingamYoni avatar Aug 13 '18 05:08 LingamYoni

New dlls come again. 3 and 4 are removing settings feature, if AV still exists, 5 includes debug output. Please use 5 and save outputs in CnDebugViewer after AV popup and send to me?

password is 345 cwdll.zip

shanzhashu avatar Aug 13 '18 14:08 shanzhashu

All 3 dlls raise the same AV. Debug output is attached. Is there anything else you can turn off? afterAV.zip

LingamYoni avatar Aug 14 '18 05:08 LingamYoni

Here comes a new dll for a totally new entry in our Wizard dll. Hope the AV disappear, or maybe Delphi Bug. Password is 789 CnWizards_Minimum_newentry.zip

shanzhashu avatar Aug 25 '18 12:08 shanzhashu

Tested. Unfortunately, the result is the same. Debug output is CnWizards_Minimum_newentry_log.zip

LingamYoni avatar Aug 27 '18 05:08 LingamYoni

Oh, I took almost all the time to investigate CnWizards Code but maybe I should turn to ToolsAPI interfaces.

I write a new Dll still named CnWizards_xxx but It contains no CnWizards code, only a Demo with minor file size to register an IOTAWizard Instance in IDE.

Could you help to check it again?

Password is 789 CnWizards_Minimum.zip

shanzhashu avatar Aug 28 '18 02:08 shanzhashu

So I have good news and bad news. Now I get an AV when starting the Delphi: av After clicking on OK button the IDE is loaded without other errors. The good news is that now there is no any AV when closing Delphi IDE. I realize we're onto something :-)

LingamYoni avatar Aug 28 '18 05:08 LingamYoni

CnWizards_Minimum.zip Oh, Actually I made a mistake and loading causes error, then Dll NOT loaded, so no AV when Exiting.

Now I fixed this error, could you help to try it again? It SHOULD load OK but AV when exiting. CnDebugViewer should show 3 Lines. Password is still 789

shanzhashu avatar Aug 28 '18 06:08 shanzhashu

Something else is wrong. When I open Delphi IDE I get a:

bds.exe - System Error The program can't start because rtl220.bpl is missing from your computer. Try reinstalling the program to fix this problem. OK

And then

Error Could not find Wizard, 'C:\Program Files (x86)\CnPack\CnWizards\CnWizards_D102T.dll'. OK

although such a file exists.

LingamYoni avatar Aug 28 '18 06:08 LingamYoni

CnWizards_Minimum.zip 789 Again!

I re-compiled it now, only with CnDebug output.

shanzhashu avatar Aug 28 '18 06:08 shanzhashu

Yes! No any AV! Well, what's our next step?

LingamYoni avatar Aug 28 '18 06:08 LingamYoni

I'm finding a new way to build a CnWizards DLL with FULL functions to try it. Hope it works. CnWizards_D102T.zip

shanzhashu avatar Aug 28 '18 07:08 shanzhashu

Tested, but:

Application Error Exception EAccessViolation in module rtl250.bpl at 00017898. Access violation at address 50067898 in module 'rtl250.bpl'. Read of address 04A13390.

LingamYoni avatar Aug 28 '18 07:08 LingamYoni

Oh no, still AV when Exiting? Please try a new one again?

CnWizards_D102T.zip

shanzhashu avatar Aug 28 '18 07:08 shanzhashu

Tested, but... damned AV still present (when Exiting).

LingamYoni avatar Aug 28 '18 07:08 LingamYoni

I'm confused now. Let me think for some time more. Anyway thanks for your warm-heart help. I'll make the clues more clear and try again.

shanzhashu avatar Aug 28 '18 07:08 shanzhashu

This annoying AV is also present in Delphi XE 10.1.2 :-(

Exception EAccessViolation in module rtl240.bpl at 0001762C. Access violation at address 5006762C in module 'rtl240.bpl'. Read of address 0AB93338.

I tried the latest two nightly builds and the last stable release, all three show this error. When I uninstall CnWizards the AV is gone.

I tried to debug CnWizards_D101B.dll, but only managed to capture this very short callstack. But maybe it helps?

:5006762c @IntfClear + $10 :500ccce0 TListHelper.InternalSetCountMRef + $58 :50061765 @Halt0 + $AD

kintrupf avatar Oct 02 '18 10:10 kintrupf

shanzhashu Any new ideas? This AV is very annoying...

LingamYoni avatar Nov 19 '18 06:11 LingamYoni

Oh, still no clue. ;-(

shanzhashu avatar Nov 29 '18 10:11 shanzhashu

I had the same problem, but I've found portuguese page that resolves the problem.

Solução para o Access Violation no RAD Studio causado pelo CnPack

Basically, the problem it was resolved removing the key “CnPack.BufferList" in registry key "HKEY_CURRENT_USER\Software\Embarcadero\BDS\XX.X\Editor\Options\Known Editor Enhancements", and changing the Priority value of the others keys under Known Editor Enhancements to have sequential values begining from 0.

In the next execution of IDE, the key “CnPack.BufferList" is created again, but the expert runs without error.

Hope this help.

SantiPR avatar Jun 21 '19 21:06 SantiPR