x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[4.4 Crash & Suggestion] Cannot make a UPROPERTY Dynamic Array of TSubobjectPtr

Dear Epic,

Hi there!

I wanted to make a dynamic array of TSubobjectPtr for my actor, to store a variety of different collision shapes, only one of which would be active at a time.

So I wrote this:

 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Abatron Wall")
 TArray < TSubobjectPtr < UStaticMeshComponent > > MorphCollisions222; 

This compiles perfectly!

Crash On Editor Load

After compiling, when I load editor, I get this crash:

 !Id:2f33e7f1183c0ad9152e06fe66b1204d
 
 Unknown exception - code 00000001 (first/second chance not available)
 
 Cast of ArrayProperty //Script//Abatron.WallNeutral:MorphCollisions222 to UObjectProperty failed
 
 KERNELBASE + 40541 bytes
 UE4Editor_Core + 3095292 bytes
 UE4Editor_Core + 1661738 bytes
 UE4Editor_CoreUObject + 357979 bytes
 UE4Editor_CoreUObject + 1256721 bytes
 UE4Editor_CoreUObject + 380685 bytes
 UE4Editor_CoreUObject + 1514444 bytes
 UE4Editor_CoreUObject + 1417170 bytes
 UE4Editor_CoreUObject + 409866 bytes
 UE4Editor_Core + 494127 bytes
 UE4Editor_Core + 2174794 bytes
 UE4Editor_Projects + 77027 bytes
 UE4Editor_Projects + 77565 bytes
 UE4Editor!FEngineLoop::LoadStartupModules() + 71 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launchengineloop.cpp:1772]
 UE4Editor!FEngineLoop::PreInit() + 10981 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launchengineloop.cpp:1329]
 UE4Editor!GuardedMain() + 236 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launch.cpp:112]
 UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:125]
 UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:201]
 UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

The Work Around

The work around I developed was to use a static array instead

 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Abatron Wall")
 TSubobjectPtr<UStaticMeshComponent> MorphCollisions[MORPH_MAX];

Editor Drag-Duplicate Bug

But when I try to drag - duplicate this actor with static component array in the level,

It can't duplicate the static array components and then they are invalid on the partially created drag-created actors.

I dont know if it is even possible for the current drag-duplicate implementation to handle my static array of TSubobjectPtr

and I have had problems with custom C++ actor components and the drag duplicate current implementation

Suggestion

Why dont you fix the drag-duplicate (using translate widget) to use the same method as when you drag from content browser?

Reason

When I drag from the content browser, the actor with static array of TSubobjectPtr works perfectly!

Rama

Product Version: Not Selected
Tags:
more ▼

asked Oct 09 '14 at 06:21 AM in Bug Reports

avatar image

Rama
10.6k 445 343 1083

avatar image Devero Oct 09 '14 at 06:28 AM

Thanks for posting Rama! This bug was a little hard to figure that "Drag-duplicate" would crash the map on load instead of dragging out of the content browser for placing these wall actors.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi Rama,

Thank you for bringing this to our attention. I have submitted a report about this issue for further investigation (TTP# 349346).

Tim

more ▼

answered Oct 10 '14 at 10:39 PM

avatar image

Tim C ♦♦ STAFF
18.2k 423 69 286

avatar image Rama Oct 18 '14 at 01:43 AM

Thanks Tim!

Rama

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question