undercover  
                
                  
                    November 30, 2018,  3:23pm
                   
                  1 
               
             
            
              Hi!
After upgrading to 4.21 from 4.19 I have a problem with TWeakObjectPtr being stale directly after assigned a valid actor?
bool bIsValidLowLevel = actor_placed_in_editor->IsValidLowLevel();
	TWeakObjectPtr<AActor> test_pointer; 
	test_pointer = actor_placed_in_editor;
	bool bIsState = test_pointer.IsStale();
	bool bIsValid = test_pointer.IsValid();
After the above code is run, the status is
bIsValidLowLevel = true
bIsState = false
bIsValid = true
However, if I hover over test_pointer it says “STALE”. If the pointer is used, e.g. Cast<ISomeInterface>(test_pointer.Get()), the game crashes.
Any help would be appreciated!
             
            
              
            
           
          
            
              
                Jeff_A  
              
                  
                    November 30, 2018,  4:05pm
                   
                  2 
               
             
            
              Hello,
We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.
https://epicsupport.force.com/unrealengine/s/ 
Thanks
             
            
              
            
           
          
            
              
                jeevcat  
              
                  
                    January 30, 2019,  3:51pm
                   
                  3 
               
             
            
              I’m also having this issue! I think it might only be related to the UE4.natvis file, which is incorrectly showing STALE or the wrong object.
             
            
              
            
           
          
            
              
                Jambax  
              
                  
                    February 5, 2019, 11:10am
                   
                  4 
               
             
            
              This is still  a problem - the visualizers have been broken for ages now.
             
            
              
            
           
          
            
            
              Would it crash the game i its just visualizers?
             
            
              
            
           
          
            
            
              Yeah, the UE4.natvis file is broken for FWeakObjectPtr and TWeakObjectPtr types. Open UE4.natvis, and replace the visualizer sections for the above mentioned  types with the following:
<DisplayString Condition="ObjectSerialNumber < 1">nullptr</DisplayString>
<DisplayString Condition="GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].SerialNumber != ObjectSerialNumber">STALE</DisplayString>
<DisplayString>{GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].Object}</DisplayString>
<Expand>
  <ExpandedItem>GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].Object</ExpandedItem>
</Expand>
<DisplayString Condition="ObjectSerialNumber < 1">nullptr</DisplayString>
<DisplayString Condition="GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].SerialNumber != ObjectSerialNumber">STALE</DisplayString>
<DisplayString>{($T1*)GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].Object}</DisplayString>
<Expand>
  <ExpandedItem>($T1*)GObjectArrayForDebugVisualizers->Objects[ObjectIndex / 65536][ObjectIndex % 65536].Object</ExpandedItem>
</Expand>
(Basically  the number 66560 has to be replaced with 65536, Epic apparently has changed the number of elements per chunk in FChunkedFixedUObjectArray from 65 * 1024 to 64 * 1024 .)
             
            
              
            
           
          
            
              
                Brian2524  
              
                  
                    April 3, 2022,  5:56am
                   
                  7 
               
             
            
              Seams like this is fixed in 4.27. Not sure the earliest version it was fixed in though.