Blueprint Merge Tool crashes editor

When trying to use the new blueprint merge tool, the editor crashes. I am attaching the sample project that causes the crash as well as the crash report.

I have a Git repo initialized with two branches (Master and Test). I committed changes to the same test blueprint on both branches and when I use git to merge the test branch into master I end up with a merge conflict as expected.

The conflict shows a ‘!’ over the problem item in the editor as it should. When I right click on the blueprint and select source control → merge it looks as if it is opening the merge tool, but then the editor crashes.

Update for 4.7.3

Crash Still occurring. Steps to reproduce:

  1. Download attached project and extract
  2. Inside project folder use GIT to merge the test branch into master to create the merge conflict
  3. Inside UE4 either right click on BP_Test then Source Control → Merge or open BP_Test and goto File → Merge

Editor will crash after step 3.

Crash Log

Unreal Project

Update #2

Attaching logs as requested.

DxDiag.txt

GitMergeText.log

Same here, it crashes when trying to merge with the editor open, or when launching the project.

Hey nbazzeghin-

Are you referring to using File->Merge through the blueprint window or are you using source control merging options? Also, could you check if you get the same crash in 4.7.2?

Cheers

Both ways cause a crash. Originally I was using the source control merge options, but just tested with the File → Merge method and it crashes.

I’ll update to 4.7.2 and try again

Thanks,

Just tried in 4.7.2 and it still crashes.

Hey nbazzeghin-

Using the project you provided, when I right click on BP_Test and select Source Control I have the choices for “Refresh” “History” and “Diff Against Depot”. I do not have the option for Merge. Alternatively, do you also crash if you open the blueprint and go to File->Merge?

If you merge the test branch into the master branch, it will leave you with a merge conflict and you’ll see the merge item under source control.

I tried with the File->Merge option and it still crashes on version 4.7.2

If you need, I can upload another test project with the files already in a conflicted state.

Thanks,

Launching the diff tool in version 4.7.2 crashes on exit, regardless of the presence of conflicts. By the way, before crashing, the tool does indeed produce a new version of the blueprint (I checked and the MD5 hashes differ). However opening the blueprint in the editor reveals that the contents are the same as the “local” file. In other words, no merge had been performed at all. It’s apparent that the feature is not ready for prime time. Please, do not rush it… take your time but make it work. We really need it!

Completely agree with the need for this. Not having this feature has made working on a project with just one other person rather complicated. I can only imagine the difficulties involved with a much larger team. The workflow we have adapted currently is both work on the same branch and make sure any work that might conflict is always done by one person then the next. I’d be interested in seeing how other teams work around this issue.

Hey nbazzeghin,

Although we cannot repro here, I’d like to enter this bug in our database anyways. An engineer could look at that callstack and know exactly what’s going on. To do that though, I’ll need a couple more pieces of info from you.

Can I get your logs(different from crash logs) for an editor session where the crash occurs. Located in [ProjectName]\Saved\Logs. I’d also like to get your dxdiag info.

PS - There are logs in your project that you sent, but I’m unsure which one correlates with a session that encountered this crash in particular.

Hi there!

The root of the problem is my Git Plugin is not handling merge operation since this was added later (I mean, after I did code the plugin that was integrated into UE4.7)
I had not a chance to test it, and then I run out of time after the release :frowning:

=> so the crash is caused by my Git plugin returning nullptr when ask for the git commit to use as merge base.

UE4-master\Engine\Plugins\Developer\GitSourceControl\Source\GitSourceControl\Private\GitSourceControlState.cpp line 45:


FGitSourceControlState::GetBaseRevForMerge() const
{
	// @todo get revision of the merge-base (https://www.kernel.org/pub/software/scm/git/docs/git-merge-base.html)
	return nullptr;
}

I will try to provide this feature as soon as possible.

Cheers!

Thanks for the update :slight_smile: look forward to it.

Hi ,

Please see my answer bellow that explain this crash: my Git plugin does return “nullptr” when asked for a Merge Revision

The problem is that the Editor code does not cope well with such a null pointer. Crash is triggered by an assertion checking for Revision being not null:
UE4-master\Engine\Source\Developer\Merge\Private\Merge.cpp line 43/44;


	TSaredPtr...  Revision = SourceControlState.GetBaseRevForMerge();
	check(Revision.IsValid());

I will try to provide this feature, or at least a quick fix as soon as possible.

Really looking fordward to it myself too, it’s gonna be very handy to have blueprint merging with git !

Thanks! I’ve attached the logs to the main question.

That would be awesome!

Trying to make sure my team doesn’t step on each other using HG is getting really annoying, having git in our pipeline would be so good for us.

Hey!

Thanks for the continued support on this! We look forward to an update. I’ve forwarded your response on to our engineer who is tending to the tool as well. Let us know if there’s anything we can do to help! :slight_smile:

Hey everybody,

I am marking this answer as accepted for tracking purposes.

I’ve been working on this recently and have made some progress…

Its still not finished, I’ll need to go deeper into UE Source Control Manager to understand what is missing.

Hoping for a breakthrough during the weekend!

edit: End of weekend: I made some good progress, but the topic is complex and I have still a few issues left…

I finally made a pull request to enable ‘Blueprint Merge’ with the Git plugin:
https://github.com/EpicGames/UnrealEngine/pull/1043

This is still not finished, as user still need to commit manually the result of the Merge afterward outside of the Engine, because of some odd things like order dependency on operations

This also improve some few bits on history window.