GIT tracked AS project "completes" rebuild prematurely without transfer file

Hi everyone,

We’re currently working on a large project in AS ( SP - GCC Version V4.1.2) and we’re tracking changes with GIT ( through the Sourcetree GUI in Windows. Often, when doing a rebuild, it stops after a couple of messages saying it is done, but there will be no transfer file generated. Usually we have around 1750 messages, but when this happens it is no more than 30.

Running AS as administrator does not help.
Choosing GCC Version V6.3.0 does not help.
What helped before was relocating the project in a folder directly on the C drive, thus shortening the path. However as the project grew, this does not help anymore.

When copying the content of the project into another folder that is not GIT tracked, the rebuild completes every time as it should with a usable transfer file.

Any insights or suggestions would be greatly appreciated!

Thanks in advance.

Often, as in not always?! This is definitely an interestig one :slight_smile:

The fact that just removing the .git folder from the scene solves the problem would imply, that it’s existance or content has an influence on the AS build. It might be, that AS has a problem scanning through the contents of the .git folder and prematurely exits the build process?! From your description the only logical path that I currently see, but then again the “often” part doesn’t really fit into that…

I don’t think that “git” itself has anything to do with it… Is there any chance that you can reproduce it with a small scale project, so someone could have a look at it trying to figure out the root cause?

Hi @c557801

Did you use something in pre-build / post-build steps?

You can check in AS: Project–>Change runtime version go in Tab “Build events”.

Here is an example :

Hi Florent,

No, the pre-build / post-build steps are empty.

I’ve already seen it, can you share the git status and AS build outputs when this appears ?

Indeed, not always. At least for me for a while.
My colleague cannot get a successful rebuild for quite some time already and works from a copy of the project, then copies the content into the git repo to track the changes and collaborate with me.

I think the size of the project is a factor as well. At first it was ok, but as it grew, the rebuild started to exit prematurely and then more and more often. Sometimes I’ve got days where it never rebuilds successfully.

Shortening the project path worked for a while, but now we are directly working on the C drive.
Cleaning the configuration from the Project menu in AS sometimes works.
I’ve also tried with renaming the .git folder, this disables git, but it does not help.
Removing the .git folder entirely also didn’t help. Neither did cleaning all the untracked blobs and commits. I did not restart my pc after doing all of this, it might help?
Only copying the project to a different location seems to do the trick right away.

We’re also tracking other similar, but smaller, projects in different GIT repo’s and never had issues with them. So I don’t think you will be able to reproduce this issue with a small scale project…

  • Do you use a git Ignore File?



Just asking because i am interested if the temp Folder might be shared in GIT, which is normaly not.

  • For me it would be also interresting what the output window looks like and if its always a similar state. And consider to check Both Outputs.

  • Sometimes the AntiVirus makes some issues, can we be sure that it handles both locations with the same rights.

Just some Ideas

Sure, git status gives this: nothing to commit, working tree clean
The AS build outputs are here:

And then when I click on Transfer it gives error 444: No valid transferlist file


If you say neither renaming nor moving / removing the .git folder helps, the situation seems not connected to git at all…

You can try to build the project at the same location on a computer not infested with company IT stuff (:stuck_out_tongue:) and see if that makes a difference… If not the problem somehow is connected to the AS and the project structure. Your output window looks fine, best really to double check antivirus stuff like @michael.bertsch suggested.

  • We do indeed have a .gitignore file:
  • The Output tab is similar to the Output Results tab
  • If we copy the whole parent folder (including the .git, but then deleting the .git) in the same location, we can just rebuild without any issue. So it would be C:/Project and C:/Project_Copy

It shouldn’t be connected to your .gitignore file since you just tell what you want to have in your repository and what not. It’s not making any difference for the Automation Studio Build.

When using git for AS projects, it’s adivsable to have a .gitattributes file containing

* -text

This disables the eol feature of git which can cause trouble with the DTM, safety or firmware files, which shouldn’t be modified by you or git. Best case it leads to your project being broken (errors during build), worst case: Who knows what happens? :smiley:

Did you check AV logs?

1 Like

I see that you had 2 libraries that generate warning, I didn’t see them before so I don’t know if there is a link.

One case I already seen this that AS didn’t build anything without output an error is that a merge was in progress with some conflict or merge conflict was not resolve and added to a pevious commit.

Maybe you can search in all files in the project for string like:

  • <<<<<<<<<
  • =========

This are some string that git generate during conflict.

1 Like

At this point I’m willing to tryout everything :sweat_smile:

Our .gitattributes file already contained the following:

*.ext binary
hardware.hw filter=ignoreSimulation

I now added

* -text

Didn’t help for the rebuild, but will definitely keep it.

FYI, the ignoreSimulation filter is defined as follows in my .gitconfig:

[filter "ignoreSimulation"]
	clean = sed '/Simulation/d'

This will just prevent the staging of the line in the hardware file that determines if the controller is simulated or not.

What do you mean with AV logs?

The warnings are there because the libraries are not used in the online configuration. We already had this issue with rebuilding before we had these library warnings, so I don’t think there’s a link.

I searched for the two strings in all the files, but didn’t find any that weren’t in comments.
Usually we get error messages while opening the project or during rebuild (when it doesn’t exit prematurely) if we didn’t merge properly .

1 Like

Anti Virus. I don’t really assume that any protection is doing anyhting here, because normally they are blocking the executable which is the AS compiler, which again stays at the same location regardless where you put your AS project. The project doesn’t really contain any “blockable” stuff when it comes to endpoint protection (appart from the AR000 which isn’t the issue…), but on the other hand you never know with company IT and AI and Cloud Protection… So checking the logs was just an idea to make sure there is nothing falsely trying to keep you safe :stuck_out_tongue:

Nice usage of the filter with the ignoreSimulation! Doesn’t that sed also match lines like:

<Parameter ID="SimulationModeOnPLC" Location="DriveConfiguration/Channel[1]/RealAxis/Simulation" Value="SetValueGeneration" />
<Parameter ID="SimulationModeOnACOPOS" Location="DriveConfiguration/Channel[1]/RealAxis/Simulation" Value="NotUsed" />

which you might want to keep @c557801

As for your problem: Really hard to tell from the distance… I’d try to get to the bottom of it via try / error until you know what’s causing the issue… If you had used the german AS I’d tell you to try the english one. Wouldn’t be the first time that makes a difference.

It currently does not seem to be an easy user fault.

So it might be a good idea from this point up, to also contact your local first level Support in Belgium to run this in parallel to not lose time, they have more possibilities with the workflow of 2ten Level, 3ten Level Support.

Because its definitly looking like an issue. The Compile should at least hint a Error, and not only abort.

The Community can only give guides … but in this forum we can’t dig deep into issues. Its more for disccusing ideas.

Lets see if there are more Ideas.


Indeed, but the Anti Virus logs don’t seem to indicate anything :upside_down_face:
The search continues…

And you are right! We’re currently not using those, but I guess I can adapt my filter to search for the " as well.

[filter "ignoreSimulation"]
	clean = sed '/"Simulation"/d'

We’re using the English version already, but yeah, we’ll check if we can send support our project.

Indeed, we’re checking if we can send them the project so they can dig deeper.

Thanks for your messages already!

1 Like

You probably have to escape the quotes

clean = sed '/ID=\"Simulation\"/d'

Do you have any referenced files/packages/libraries? Sometimes broken references will cause builds to finish prematurely without errors. I also see that it can’t fine the .a files for some libraries, I could see this being related to missing files. It’s typical for people to ignore .a files and I see this issue a lot. Ensure the .a and .br files are tracked in git for AS.

Another quick note, but unrelated, you have /*.set in. your git ignore, but this can cause problems for safety projects. It may be fine because it might only apply to the top folder, but if you do have a safe designer project, ensure this doesn’t ignore .set files in there.