Page 1 of 1

Codeplug Editor problems with CDR-300

Posted: Sun Oct 23, 2022 11:15 pm
by Tyrbiter
Hi David

I'm a new user of the software, but sadly between the Retevis/Ailunce CPS and this editor I am having some troubles.

I am finding that trying to add a new zone/channel frequently causes an error dialogue from one of the MS runtime libraries, continue works but it's difficult to tell if the state of the radio is correct as once the new codeplug is written the editor then refuses to read the same data and display it, there is not always an error message but often the program sits with the start screen and will not do anything except respond to the close button.

If I attempt to move a zone up or down I also get an error, usually says something like Array out of Bounds.

I have been able to write a user database into the radio using the editor but I cannot get any of my Anytone .csv files to be recognised when I try to import them using the Tools menu. Again they appear to cause an array bounds error.

The CDR-300 has been updated with the 230921 firmware version, I have not yet been able to fully test the programming I have got into it, I modified the scot2.json shared codeplug by means of csv export/modify/import cycles however now that the editor refuses to read the radio correctly I am using the CPS software.

It all feels a bit precarious, some of the csv exporting from the CPS is incorrect (CTCSS doesn't work properly) and essentially the same failure occurs when reading CTCSS settings.

All a bit tricky with neither your editor nor the official CPS behaving as expected.

Any advice would be welcome.

Re: Codeplug Editor problems with CDR-300

Posted: Mon Oct 24, 2022 10:35 am
by MM7DBT
Not something that anyone has reported happening before, although by the sounds of it my guess would be that either your Windows security settings or possibly if you are running a third-party antivirus/antimalware software that it is blocking the Newtonsoft JSON library, the library that handles all of the JSON functions.

The actual .dll file is embedded into the CPEditor.exe and extracted at runtime rather than being included as a separate dll file as it saves a lot of headaches if the exe and dll are not in the same folder etc.

The Python script that handles the reading and writing to the radio is also embedded and extracted as and when it is required.
So that is something else that would fail if it were to be blocked by some security software, it could be seen as malicious activity if a program is creating another executable and running it.

Have you tried running CPEditor.exe 'As Administrator' ?
or if you do have some third-party security software, adding it to the allow list / whitelist.

Re: Codeplug Editor problems with CDR-300

Posted: Mon Oct 24, 2022 10:39 am
by MM7DBT
The Anytone import feature is still in a beta phase since there may be cases where something can cause it to fail.
I have tested it with my own 878 codeplug, which works ok. Also tested with the Moonraker codeplugs that are available.

But of course every codeplug is different, although the main layout is the same there can still be things that I haven't accounted for, which will get fixed as they appear :)

Re: Codeplug Editor problems with CDR-300

Posted: Mon Oct 24, 2022 10:26 pm
by Tyrbiter
I have tried again, and still see similar problems, I have tried running as administrator and I still get the same errors with

"Index was outside the bounds of the array".

when I open a modified json file based on your scot2.json I downloaded.

When I try to import .csv files that were extracted from an Anytone 878 codeplug I get the same error but in the Windows error dialog.

I am running Windows 10 and using this version

Edition Windows 10 Home
Version 22H2
Installed on ‎27/‎05/‎2020
OS build 19045.2130
Experience Windows Feature Experience Pack 120.2212.4180.0


Hope this info is useful, I can probably help further if you can give me any advice, I can send you relevant files if it would help.

Re: Codeplug Editor problems with CDR-300

Posted: Mon Oct 24, 2022 10:34 pm
by Tyrbiter
I use Windows Defender and have no other antivirus or antimalware software other than Spywareblaster which is really only browser-related.