So, i’ve run into a little problem after packaging my game. The mainmenu loads correctly, but as soon as I hit the start button it crashes with following report:
[details=Summary]LoginId:****************
EpicAccountId:************************
Access violation - code c0000005 (first/second chance not available)
BattleTank!UObjectBaseUtility::GetInterfaceAddress()
BattleTank!CastChecked<IFontFaceInterface const ,UObject>()
BattleTank!FFontData::HasFont()
BattleTank!FCompositeFontCache::GetFontFace()
BattleTank!FSlateFontRenderer::GetFontFaceForCharacter()
BattleTank!FSlateTextShaper::PerformKerningOnlyTextShaping()
BattleTank!FSlateTextShaper::PerformTextShaping()
BattleTank!FSlateTextShaper::ShapeBidirectionalText()
BattleTank!FSlateFontCache::ShapeBidirectionalText()
BattleTank!FShapedTextCache::AddShapedText()
BattleTank!FShapedTextCache::FindOrAddShapedText()
BattleTank!ShapedTextCacheUtil::MeasureShapedText()
BattleTank!FSlateTextRun::Measure()
BattleTank!FTextLayout::FRunModel::CreateBlock()
BattleTank!FTextLayout::CreateLineViewBlocks()
BattleTank!FTextLayout::FlowLineLayout()
BattleTank!FTextLayout::FlowLayout()
BattleTank!FTextLayout::UpdateLayout()
BattleTank!FTextLayout::UpdateIfNeeded()
BattleTank!FSlateEditableTextLayout::ForceRefreshTextLayout()
BattleTank!FSlateEditableTextLayout::RefreshImpl()
BattleTank!SEditableText::SynchronizeTextStyle()
BattleTank!SEditableText::CacheDesiredSize()
BattleTank!SWidget::SlatePrepass()
BattleTank!SWidget::SlatePrepass()
BattleTank!SWidget::SlatePrepass()
BattleTank!SScaleBox::OnArrangeChildren()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::SearchForWidgetRecursively()
BattleTank!FWidgetPath::ExtendPathTo()
BattleTank!FSlateWindowHelper::FindPathToWidget()
BattleTank!FSlateApplication::SetUserFocus()
BattleTank!FSlateApplication::ProcessReply()
BattleTank!FEngineLoop::ProcessLocalPlayerSlateOperations()
BattleTank!FEngineLoop::Tick()
BattleTank!GuardedMain()
BattleTank!GuardedMainWrapper()
BattleTank!WinMain()
BattleTank!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll[/details]
However, it runs completely fine inside the engine environment or if i set the default level to “BattleGround” before packaging it.
Since the two levels (the menu and the battleground) are able to load fine on their own my guess is that it has something to do with the start button or the act of loading the level BattleGround. I checked everything inside the blueprint but I am unable to find the exact cause of the error. Any ideas?
Solution
Ok, so I found the logfile of the packaged game and I think that these are the crucial lines:
[details=Summary]
[2017.06.11-14.36.37:602][ 80]LogPackageName: SearchForPackageOnDisk took 0.073s, but failed to resolve BattleGround.umap.
[2017.06.11-14.36.37:674][ 80]LogPackageName: SearchForPackageOnDisk took 0.072s, but failed to resolve BattleGround.umap.
[2017.06.11-14.36.37:674][ 80]LogNet: Browse: /Game/Levels/MainMenu
[2017.06.11-14.36.37:674][ 80]LogNet:Warning: Travel Failure: [InvalidURL]: Invalid URL: /Game/Levels/MainMenu
[2017.06.11-14.36.37:674][ 80]LogNet: TravelFailure: InvalidURL, Reason for Failure: ‘Invalid URL: /Game/Levels/MainMenu’
[2017.06.11-14.36.37:674][ 80]LogNet:Warning: Travel Failure: [ClientTravelFailure]: Invalid URL: /Game/Levels/MainMenu
[2017.06.11-14.36.37:674][ 80]LogNet: TravelFailure: ClientTravelFailure, Reason for Failure: ‘Invalid URL: /Game/Levels/MainMenu’
[2017.06.11-14.36.37:675][ 81]LogNet: Browse: /Game/Levels/MainMenu?closed
[2017.06.11-14.36.37:675][ 81]LogNet: Failed; returning to Entry[/details]
I then tried to make sure that every map of the project was included in the build. I went to the following option:
“Settings->Project settings…->Packaging->Cook everything in the project content directory”
Seems this was it.