Crash in editor duplicating a simple level

4.8.1

Crashed when duplicating (ctrl W) a level containing a slightly modified demo butterfly, camera and actor containing just a spline actor.

[2015.06.25-18.16.36:348][296]Cmd: OBJ SAVEPACKAGE PACKAGE="/Game/Levels/IntroLevel" FILE="../../../../../../Users//Documents/Unreal Projects/MM_04/Content/Levels/IntroLevel.umap" SILENT=true AUTOSAVING=false KEEPDIRTY=false
[2015.06.25-18.16.36:406][296]LogParticles:Warning: InitializeSystem called on an unregistered component. Template=/Game/Assets/Effects/P_Butterfly_Trail.P_Butterfly_Trail Component=/Game/Levels/IntroLevel.IntroLevel:PersistentLevel.BP_Butterfly.Trail
[2015.06.25-18.16.36:413][296]LogParticles:Warning: InitializeSystem called on an unregistered component. Template=/Game/Assets/Effects/P_Butterfly_Trail.P_Butterfly_Trail Component=/Game/Levels/IntroLevel.IntroLevel:PersistentLevel.BP_Butterfly.Trail
[2015.06.25-18.16.36:419][296]LogParticles:Warning: InitializeSystem called on an unregistered component. Template=/Game/Assets/Effects/P_Butterfly_Trail.P_Butterfly_Trail Component=/Game/Levels/IntroLevel.IntroLevel:PersistentLevel.BP_Butterfly.Trail
[2015.06.25-18.16.36:476][296]LogSavePackage: Save=72.637703ms
[2015.06.25-18.16.36:480][296]LogSavePackage: Moving '../../../../../../Users//Documents/Unreal Projects/MM_04/Saved/IntroLevelC73BD4494C60D74D4A230EB439F70782.tmp' to '../../../../../../Users//Documents/Unreal Projects/MM_04/Content/Levels/IntroLevel.umap'
[2015.06.25-18.16.36:812][296]LogFileHelpers: Saving map 'IntroLevel' took 0.696
First-chance exception at 0x000007FED2127524 (UE4Editor-GitSourceControl.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
Unhandled exception at 0x000007FED2127524 (UE4Editor-GitSourceControl.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

Code is here:

bool BranchPackage( UPackage* DestPackage, UPackage* SourcePackage )
{
	if(ISourceControlModule::Get().IsEnabled())
	{
		ISourceControlProvider& SourceControlProvider = ISourceControlModule::Get().GetProvider();

		const FString SourceFilename = PackageFilename(SourcePackage);
		const FString DestFilename = PackageFilename(DestPackage);
		FSourceControlStatePtr SourceControlState = SourceControlProvider.GetState(SourceFilename, EStateCacheUsage::ForceUpdate);

DestFileName and SourceFileName are valid strings and SourceControlProvider appears to contain a vtable of valid virtual functions for git source control.

This is the second crash I’ve had that seems source control related in the last two days, though I didn’t report the last one.

Hey -

When you duplicated the level, was this done through the content browser by selecting the original and using Ctrl+W? Also, where did the code snippet you posted come from? Assuming this definition is in a source file it is missing the scope which could be causing issues. Could you post your log files from the crash? Does the crash also occur in a new project when duplicating a blank level?

Cheers

Hello again !

I clicked on the original level and pressed ctrl-w then renamed it IntroLevel.

When I reloaded the new level had been created, destroying it and trying again did not repro the crash (perhaps I should try a new name though so source control gets tickled again…).

The code was where I was left in the debugger (I run from VS). The function is in SourceControlHelpers.cpp. Not sure what you mean by scope ( though I should have posted the callstack - think I lost it :frowning: )

I couldn’t repro the crash in my project so I’d doubt it happens in a new project.

There are no logs here: C:\Program Files\Unreal Engine\4.8\Engine\Saved

Where else should I look?

Well - a new name did indeed trigger the crash again:

UE4Editor-SourceControl.dll!SourceControlHelpers::BranchPackage(UPackage * DestPackage, UPackage * SourcePackage) Line 373 C++
UE4Editor-AssetTools.dll!FAssetTools::DuplicateAsset(const FString & AssetName, const FString & PackagePath, UObject * OriginalObject) Line 451 C++
UE4Editor-ContentBrowser.dll!SAssetView::CreateAssetFromTemporary(FString InName, const TSharedPtr<FAssetViewAsset,0> & InItem, FText & OutErrorText) Line 2915 C++
UE4Editor-ContentBrowser.dll!SAssetView::AssetRenameCommit(const TSharedPtr<FAssetViewItem,0> & Item, const FString & NewName, const FSlateRect & MessageAnchor, const ETextCommit::Type CommitType) Line 3341 C++
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper __cdecl(TSharedPtr<FAssetViewItem,0> const & __ptr64,FString const & __ptr64,FSlateRect const & __ptr64,enum ETextCommit::Type)>::Execute(const TSharedPtr<FAssetViewItem,0> & <Params_0>, const FString & <Params_1>, const FSlateRect & <Params_2>, ETextCommit::Type <Params_3>) Line 282 C++
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0> const & __ptr64,FString const & __ptr64,FSlateRect const & __ptr64,enum ETextCommit::Type)>::ExecuteIfSafe(const TSharedPtr<FAssetViewItem,0> & <Params_0>, const FString & <Params_1>, const FSlateRect & <Params_2>, ETextCommit::Type <Params_3>) Line 388 C++
UE4Editor-ContentBrowser.dll!SAssetViewItem::HandleNameCommitted(const FText & NewText, ETextCommit::Type CommitInfo) Line 285 C++

The log files would be in the Saved folder of the project rather than the engine (UnrealProjects//Saved/Logs). Also, did the crash happen as soon as you pressed Ctrl+W or after renaming the copy? Does the crash occur if you are not connected to source control when you duplicate the level?

  1. Don’t seem to have logged files from crashed builds. I’ve attached the output from Visual Studio

  2. Got the same crash duplicating the RobotoDistanceFont from EngineFonts

  3. Crash happens as soon as you accept the new name (so you get a chance to rename, and the new name will be in place when you reopen the editor)

  4. Crash does NOT occur if you disable source control
    link text
    Hope this helps!

Looking at the log files it seems it’s trying to access the font from outside the repository that your source control is working in. Let me know if adding the directory where the font is to your local repo helps.

Doesn’t crash when I copy a font in my project’s content directory.

Hey -

Am I understanding correctly that adding the font to the project solved the crash for you? If this is not the case let me know what is happening instead. Additionally, to help us investigate the crash can you explain how the font was setup in your project originally that was causing the crash?

Cheers

?

Moving the font into my project (where it is within my github depot) doesn’t exhibit the same problem, and I should add that this does not stop me developing now I know that copying the font into my depot allows further development.

The original font was the engine font, as provided in 4.8.1, and I was duplicating it in place (to the engine directory, not covered by my githib depot).

The original report though, was for a level object in a directory contained entirely within my github directory. If I see it again I’ll try and get more information.