Skip to content

Prevent the mapping of objects with a data length of 0 bytes#220

Open
trojanobelix wants to merge 2 commits into
CANopenNode:mainfrom
trojanobelix:not_map_0_bytes_objects__
Open

Prevent the mapping of objects with a data length of 0 bytes#220
trojanobelix wants to merge 2 commits into
CANopenNode:mainfrom
trojanobelix:not_map_0_bytes_objects__

Conversation

@trojanobelix
Copy link
Copy Markdown
Collaborator

@trojanobelix trojanobelix commented May 31, 2026

project.zip
Prevent the mapping of objects with a data length of 0 bytes.

The importer should prevent string objects with a data length of 0 from being imported.
In my opinion, string types without a defined length are formally allowed according to DS301, but:

  • they cannot be mapped to PDO
  • they cannot be used effectively
  • the editor should ignore them

ToDo:
Object 0x2000 in the OD is formally correct IMHO, but is created in the CANopen Editor with a data length of 0; for strings, the data length should be initialized to 1.

@henri62
Copy link
Copy Markdown

henri62 commented May 31, 2026

Do you have a pre-built version with this fix in it? (Or with other fixes from the development branch latest commit).
I do not have an environment to build it myself.

On the top github page here the latest and only release is old. Maybe time to update it?

@trojanobelix
Copy link
Copy Markdown
Collaborator Author

trojanobelix commented Jun 1, 2026

CANopenEditor v4.2.3-70-g9b2cf86.zip

Do you have a pre-built version with this fix in it? (Or with other fixes from the development branch latest commit). I do not have an environment to build it myself.

On the top github page here the latest and only release is old. Maybe time to update it?

Here is the binary file for Windows. Unfortunately, I can't test it on Linux.

@henri62
Copy link
Copy Markdown

henri62 commented Jun 1, 2026

The windows build is ok for me, but the version does not run, it asks for the .NET runtime. I tried different versions of the runtime but it always refuses to run.
The previous version I have on my system (the only official release) still runs.
To which runtime is this version compiled?

@trojanobelix
Copy link
Copy Markdown
Collaborator Author

To which runtime is this version compiled?
.net 8.0

@henri62
Copy link
Copy Markdown

henri62 commented Jun 1, 2026

That is strange, it will not run at all (I have also the .NET 8.0.22 runtime). I also tried to copy over all files in the existing (running) tool to a new directory, copy over the files in the zip and rename it to the original name. Still not running.
It looks like visual studio 2017 is used for the project, maybe I can try to build it myself?

-edit- VS2017 does not seem to be available any more, what is recommended to use, if I want to build it myself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when trying to map a custom SDO into a TPDO.

2 participants