mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

TMap of F structs does not work in packaged builds, resizing crashes the game

04 Dec 2023, 04:05

I'm having two different issues after packaging the game with NoesisGUI:
1. The project is working correctly in the editor but crashes in the packaged build for Unreal when resizing the window.
LogWindows: Error: appError called: Assertion failed: BackBuffer->GetRefCount() == 1 [File:UnrealEngine\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11Viewport.cpp] [Line: 251]
2. I heavily rely on TMap of FString and a TMap of FText objects to transfer data to UI, however this doesn't work entirely in a packaged game. On every object I have the following:

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="Default")
TMap<FString,FString> strings;

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="Default", meta=(MultiLine="true"))
TMap<FString,double> numbers;

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="Default", meta=(MultiLine="true"))
TMap<FString,FText> texts;

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="Default")
TMap<FString,UTexture2D*> images;

UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category="Default")
TMap<FString,bool> bools;


texts and strings don't bind in a packaged build, the rest of the dictionaries work just fine. This is a complete showstopper right now, I would appreciate any tips.
 
mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

Re: TMap of F structs does not work in packaged builds, resizing crashes the game

04 Dec 2023, 21:06

This was the most obscure bug. For some reason, on packaged builds, properties starting with lowercase letters return their capitalized versions. But not always...
So in the editor Noesis was getting "strings" from Property->GetName() while in the packaged build it is gettings "Strings". A workaround in my case was just to Capitalize all of the properties.
 
User avatar
hcpizzi
Site Admin
Posts: 339
Joined: 09 Feb 2012, 12:40

Re: TMap of F structs does not work in packaged builds, resizing crashes the game

05 Dec 2023, 03:13

Hi,

I've created a ticket and attached a patch that fixes the resizing issue. Here's a link: https://www.noesisengine.com/bugs/view.php?id=2918

Regarding the other issue, could you try changing the definition of WITH_CASE_PRESERVING_NAME to be always 1? Right now it's defined to be WITH_EDITORONLY_DATA in NameTypes.h.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests