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"

Magical Garbage Collection gets invalid Array from ArrayPool and crashes

Hi,

Unreal is hitting a break point at FastReferenceCollector.h:290 but there is no error message and I dont know where to fix stuff. This is the snippet where it happens:

 else if (ReferenceInfo.Type == GCRT_ArrayObject)
 {
     // We're dealing with an array of object references.
     TArray<UObject*>& ObjectArray = *((TArray<UObject*>*)(StackEntryData + ReferenceInfo.Offset));
     TokenReturnCount = ReferenceInfo.ReturnCount;
     for (int32 ObjectIndex = 0, ObjectNum = ObjectArray.Num(); ObjectIndex < ObjectNum; ++ObjectIndex)
     {
         ReferenceProcessor.HandleTokenStreamObjectReference(NewObjectsToSerialize, CurrentObject, ObjectArray[ObjectIndex], ReferenceTokenStreamIndex, true);
     }
 }

At ReferenceProcessor.HandleTokenStreamObjectReference(...) the break point is hit with NewObjectsToSerialize being Invalid . Sometimes the Name of CurrentObject is also Invalid, but not always. The NewObjectsToSerialize are coming from *ArrayPool.GetArrayFromPool() and ArrayPool is a template Type.

What I also noticed is that in the else if the ReferenceInfo.Type says it's 8 while the GCRT_ArrayObject is 3.

To me it looks like the GC is trying to clean something that isn't there and then crashes. What is actually happening in this part of the GC?

Product Version: UE 4.12
Tags:
more ▼

asked Dec 15 '16 at 02:47 PM in C++ Programming

avatar image

OgoxHammerschild
1 1 2 2

avatar image Santor May 11 '17 at 09:00 AM

I have the same problem, OgoxHammerschild, did you find any solution?

avatar image OgoxHammerschild May 14 '17 at 05:33 PM

Hi Santor,

I didn't find a solution for that, but in my case this error disappeared somehow over night with no concrete reason.

When I had the error I was thinking that it may have something to do with en-/disabling of actors, like you do in an object pool. Maybe Unreal GC thought "oh, you disabled this actor? you sure don't need it anymore, right? let me take care of it". but then enable the actor regardless, but it's already gone...

It may also be that there is a single pointer to an actor and another pointer to the same actor inside an array and one of them was deleted but the other pointer still points to the deleted actor/object and just returns invalid rubbish.

But I can just guess... In the end, I don't have a clue what is causing this error. Sorry :(

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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