"Copy Procedure" causes C11 crash, alternate way to copy?

Tags: #<Tag:0x00007fc0daa75290>

I am busy finishing off chapter “12 - Working With Reports” and I have got to the last report:

A Single Invoice Report

Next, we will print a single invoice from the Browse list of orders.

Creating the Report

1.In the Application Tree, highlight the CustInvoiceReport procedure.

2.Choose Application -> Copy Procedure.

I type in the name of the new procedure and C11 crashes. I tried the recommended name and a few other names. No go:

Exception occurred at address 11C53189
Exception code C0000005: Access Violation
Process PID=716  Image: C:\Clarion11\bin\Clarion.exe
Thread 2  Handle=00000CA4  TID=7080

Exception parameters:

EAX=00000000    EBX=1113EB28    ECX=1113EB28    EDX=00000000
ESI=1113EB28    EDI=1113EB30    EBP=199CF020    ESP=199CE900
EIP=11C53189    FLG=00010212

Call Stack:

Clarion modules:
08EE0000  11.00:13372 C:\Clarion11\bin\ClaRUN.dll
08EB0000  11.00:13372 C:\Clarion11\bin\ClaIde.dll
11B30000  11.00:13372 C:\Clarion11\bin\ClaASC.dll
11B50000  11.00:13372 C:\Clarion11\bin\ClaDOS.dll
11AC0000  11.00:13372 C:\Clarion11\bin\ClaDEF.dll
11980000  11.00:13372 C:\Clarion11\bin\ClaTPS.dll
118E0000  11.00:13372 C:\Clarion11\bin\ClaCBC.dll
11920000  11.00:13372 C:\Clarion11\bin\Claasl.dll
11E10000  11.00:13372 C:\Clarion11\bin\ClaAPP.dll
11C50000  11.00:13372 C:\Clarion11\bin\Clagen.dll
1CEA0000  11.00:13372 C:\Clarion11\bin\ClaDSI.DLL
1CDA0000  11.00:13372 C:\Clarion11\bin\Cladct.dll
1CFB0000  11.00:13372 C:\Clarion11\bin\ClaPRJ.DLL

I have tried restarting the PC, recovering the application, etc. It compiles without any issues, so I have run out of ideas.

Any suggestions on how to copy a procedure without using the Application menu?

On the Application menu…
Selective Export to TXA and pick that one Procedure
Open TXA in the Editor
IIRC the first line will be [PROCEDURE] and the next line will have its Name … Or find the Name
Change the Name to the new name
Save TXA
Import the TXA

If you don’t edit the name I think the import warns you and offers a Rename button.

I copy procedures all the time in 11.13505. You could try export your entire APP to TXA, create a new APP from that TXA

1 Like

The export crashed too. I will try exporting the whole application but I’m not going to hold my breath.

Does the procedure have embed code?

Look at it and see if any start with [ brackets]?

OMIT sections, delete them.

Anything unusual?

Yes. A small amount. I will remove the embed code. I think the lesson requires me to do it anyway.

It’s amazing how much I have learnt from your suggestions already. Much obliged.

I will also remember to make regular backups. I didn’t think I would need to for the “Learning Clarion” application, but there you have it

I have noticed that COPY procedure fails for me too. I am in the habit of copying a procedure before butchering it; i mean adding/restructuring etc…

The copy process ALWAYS fails on procedures that have formulas that were done through the FORMULA tab of the procedure. Deleting them, after adding them manually to the closest embed point works.

Formulas are very fragile when exporting to txa.

I have never understood the draw that would make someone choose a formula vs just coding it.

For someone unfamiliar to Clarion, it seems to take just as much effort to learn how to add a formula as it would to code it in the first place.

Are there any advantages to using formulas over coding?

No advantage whatsoever!