Access Violation C0000005 when running a basically empty app

Hi All,
I’m having some trouble with C10. Just started the process of upgrading the apps from 6.3 (I know, it’s about time). I created an empty frame and a data dll and I’m getting the error below. The dll is linked into the exe and the dll exports all file declarations and ABCs. There are no extensions added the frame or the dll.

Any ideas where I can start looking for the problem?
I’m running 10.0.0.12799

Exception occurred at address 45545045
Exception code C0000005: Access Violation
Process PID=2172  Image: C:\apps\proper\fish\run\fish.exe
Thread 1  Handle=0000020C  TID=7088

Exception parameters:
00000000
45545045

EAX=00403974    EBX=08003EA0    ECX=00406290    EDX=0019FE88
ESI=010CF211    EDI=0019FFCC    EBP=0019FE94    ESP=0019FE78
EIP=45545045    FLG=00010246

Call Stack:
45545045
00A74933  ABERROR.CLW:279 - ERRORCLASS.INIT(ERRORSTATUSCLASS)
0040146B  fish.clw:50 - _main
010CF727  ClaRUN.dll:000CF727
010CF211  ClaRUN.dll:000CF211
771175F4
771175C4

Clarion modules:
01000000  10.00:12799 C:\apps\proper\fish\run\ClaRUN.dll
005D0000  10.00:12799 C:\apps\proper\fish\run\ClaASC.dll
005F0000  10.00:12799 C:\apps\proper\fish\run\ClaDOS.dll
00610000  10.00:12799 C:\apps\proper\fish\run\ClaTPS.dll
00A50000  10.00:12799 C:\apps\proper\fish\run\FISHDATA.dll
00400000  10.00:12799 C:\apps\proper\fish\run\fish.exe

Thread stack:
0019FE70: 74 39 40 00  94 FE 19 00  64 4A A7 00  A8 FE 19 00 
0019FE80: 00 00 00 00  74 39 40 00  18 CF B2 00  E0 17 00 08 
0019FE90: 74 39 40 00  B8 FE 19 00  33 49 A7 00  F4 14 40 00 
0019FEA0: 34 FF 19 00  D0 84 69 00  18 CF B2 00  E0 17 00 08 
0019FEB0: D0 84 69 00  74 39 40 00  CC FE 19 00  6B 14 40 00 
0019FEC0: 34 FF 19 00  34 FF 19 00  D0 84 69 00  E8 FE 19 00 
0019FED0: 27 F7 0C 01  98 8B 14 01  FA 98 12 01  34 FF 19 00 
0019FEE0: C8 F9 19 00  18 FA 19 00  80 FF 19 00  11 F2 0C 01 
0019FEF0: CC FF 19 00  CC FF 19 00  10 99 12 01  34 FF 19 00 
0019FF00: 34 FF 19 00  F4 14 40 00  C0 DC 68 00  11 F2 0C 01 
0019FF10: 34 FF 19 00  F4 14 40 00  F4 14 40 00  80 FF 19 00 
0019FF20: 34 FF 19 00  34 14 40 00  F4 14 40 00  00 00 00 00 
0019FF30: C0 DC 68 00  98 8B 14 01  E0 FE 19 00  04 00 00 00 
0019FF40: 18 8C 14 01  C0 DC 68 00  58 D1 13 01  6C D1 13 01 
0019FF50: 88 D1 13 01  7C D1 13 01  A4 D1 13 01  98 D1 13 01 
0019FF60: 00 00 00 00  3C 3E 0C 01  35 3B 0C 01  C0 22 40 00 
0019FF70: 12 15 40 00  29 FA 15 75  00 60 29 00  10 FA 15 75 
0019FF80: DC FF 19 00  F4 75 11 77  00 60 29 00  BC 5E 43 F0 
0019FF90: 00 00 00 00  00 00 00 00  00 60 29 00  00 00 00 00 
0019FFA0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
0019FFB0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
0019FFC0: 00 00 00 00  8C FF 19 00  00 00 00 00  E4 FF 19 00 
0019FFD0: 90 99 12 77  28 66 41 87  00 00 00 00  EC FF 19 00 
0019FFE0: C4 75 11 77  FF FF FF FF  69 73 13 77  00 00 00 00 
0019FFF0: 00 00 00 00  F4 14 40 00  00 60 29 00  00 00 00 00

Samrae welcome to our community!

You are crashing at line 279 in AbError.clw which is 12799 is ErrorClass.Init PROCEDURE()

The C0000005 would indicate that is null.

Do the Project Defines have _ABCLinkMode_ and _ABCDllMode_ ?

FishData.DLL would have =>1 and =>0
Fish.EXE would have =>0 and =>1

@jslarve - I found backslash underscore is required escape to get just underscore in Markdown without italics

1 Like

Clarionhub thinks your underscores mean Italics or something.

That error is often caused by incompatible Dll’s.
Check the solution explorer for references to C6 dll’s, perhaps from an old template.

Ok, I think I’ve got this sorted now.
I was being a bit cavalier with compile settings.
I set the setting as suggested by @CarlBarnes

I also set the “ABCs as External” options below.
image

It feels like C6 was super forgiving about the settings, or C10 is making me do things properly at least.
I’ve been a Clarion dev for years now, but I’ve always been working on established applications rather than putting together large apps from scratch.

Thanks for your help everyone,
Sam

1 Like

Hi Samrae,

to be clear, you should not set the ABCDllMode and ABCLinkMode defines. They are set by the template based on what you tell the template.

In your screen-shot above, “Generate template globals and ABC’s as External” should be ON in all but one of the DLL’s. In one DLL, let’s call this the “root dll” this option should be OFF. And then this “root DLL” is added as an External DLL Module to “all the other apps”.

In other words, ABC is compiled into root DLL, and Exported from there.
Then all the other apps (DLL’s and EXE’s) are linked to that root DLL, and can therefore use the code exported by that DLL.

C10 is certainly stricter than C6 in some places, but this is not one of those places. I’m guessing that your colleague who set this up in Clarion 6 just “did it right”.

2 Likes

It is more strict on some things, but it has a much enhanced project and build system taken from Sharp Develop that is based on Visual Studio.

In the OBJ folder you will find a new file Project.FileList.XML that lists every file feeding your build and files being created. It is handy. This somewhat replaces the .LNK file, which is still made but deleted as a temp file.

One change that may cause you problems is the LIB file used to link DLLs is placed in the OBJ Debug or Release folder. That would allow a Debug build to export different functions. Most people prefer to modify the RED file to place that in the same folder as the DLL. This is a favorite change of Bruce. I think this is the link to that thread.

1 Like

I recall having to fix up the defines on some apps after converting from C6 to C10.

1 Like