Changes in untouched files

Hi there,

I’m new here in this forum and also new to Kicad. I don’t wanna bother you, just hope for some help to smoothen my “learning curve”…

Let’s move on to my challenge… :wink:

I clone an internal Kicad-Project from our Git server. Open the top schematic of the project (multiple subsheets) and do not change anything. Save the project without any manual changes and Kicad is changing the files of two subsheets. I guess I would not notice anything by myself but git is showing the changes… I also guess that this is not a bug and is related to the way how data is stored and written to the disk in Kicad. But I would like to avoid this behavior as this may lead to merge conflicts.

Now here is the question: Do you know why this will happen in Kicad?

Best regards,
Andreas

PS: I’m using Kicad 6.0.7

Which operating system are you using ? (better yet, could you do Help->About KiCad->Copy information) and paste it in here ?

Did you do a diff to see what the changes were? Git decides that a new revision has been created by a checksum over the content. So it’s possible that a slight change in whitespace due to a change in the prettyprinting of the files, or reordering of the JSON attributes, which do not affect the meaning could cause a new revision to be declared.

If you really didn’t want to change anything you could revert the revision.

I think that is actually the point, that KiCad should not be changing anything, however, what normally changes (although I don’t know why) is the page number of the sub sheets, I believe they are automatically generated when the project is open and dynamically assigned.

I’m usinf Linux Application: KiCad

Version: (6.0.7), release build

Libraries:
wxWidgets 3.2
libcurl/7.85.0 OpenSSL/1.1.1q zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.3 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.49.0

Platform: Linux 5.15.65-1-MANJARO x86_64, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
Date: Jul 26 2022 07:44:25
wxWidgets: 3.2.0 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.79.0
OCC: 7.5.3
Curl: 7.84.0
ngspice: 37
Compiler: GCC 12.1.0 with C++ ABI 1017

Build settings:
KICAD_USE_OCC=ON
KICAD_USE_EGL=ON
KICAD_SPICE=ON

The changes are content-related… One change is a different uuid and the other change seems like two lines are exchanged but with out changing the lines itself

Some colleagues using a windows installing on the same project. Could this be an issue?

I think the more important issue is whether a merge of such a change with concurrent changes by other authors could result in an invalid file. It’s inevitable some day that you will modify the revision you checked out by intent. I don’t know enough about the structure of the file to say. I only use git as a versioning tool for myself. At least the situation is improved from v5, there is now a canonical serialisation of the schematic or PCB data structure so that deltas are small.

Thank you for your replies!
We took a closer look to a another project were only colleagues with Linux are involved and we saw the same behavior. The UUID of four Pins were altered without even opening this specific subsheet. From my point of view the UUID is a central part of the data structure were unique path variables for each element were derived. So I guess KiCad will not alter them without intent. Maybe there is a option I’m not aware of, which is checking or optimizing the design. Any ideas?

Maybe not a solution, but the newest version of KiCad is the v6.0.8, would it be possible to test if the bug is still present there?

I have noticed that the subsheet gets rewritten along with the main sheet even if I didn’t navigate to it during a session. I have not looked to see what, if anything, got changed. I also don’t know what function the UUID serves and if the change you observed is benign.

Thanks for your support!

Yes, that’s the point, as you already mentioned in your second post, we don’t know if these changes could lead to merge conflicts. What I know is, that we observed this behavior while resolving a merge conflict. Unfortunately I could not reproduce this conflict in order to find the root cause. So it is also possible that the critical error is sitting in front of the keyboard… Anyway. Without knowing that this behavior is deterministic or avoidable it will be an issue for our workflow with git.

Of course I should test the newest version, that’s a good point.

Will it be helpful to re-categorize this topic to software as this seems to be an uncommon schematic topic?

1 Like

Still the same with version 6.0.8

Please report this as a bug on GitLab

IMHO if you are not changing anything and don’t want any changes you should not be saving a recently opened file.
When I’ve finalized a design and ordered boards (besides creating an archive) I mark the files as not changeable. In windows this is the read-only attribute.

Yes, you’re right. But the described scenario was only a testcase. The issue arises in projects with multiple contributors working on different subsheets in a common top schematic. If contributor A works on subsheet A he will save the whole project by clicking on “save”. If this issue is causing a change in subsheet B (not opened, not changed by intent) and contributor B is working on subsheet B at the same time, this may(!) lead to merge conflicts in git. I hope this will make things a bit clearer.

A possible workaround from a git-point-of-view: One could only stage the files with intended changes and commit only those, but I don’t know if this is causing problems in the KiCad database…?

@craftyjon : May this issue be related to this one:

That issue is about symbol field IDs but you posted an issue about no-connect UUIDs which are different.

Ok, thanks. I will report this on gitlab

Just in case some else is facing this issue:

1 Like