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"

FArchive& operator<<(struct FWeakObjectPtr&) crash

Hi. i just found a crash when i tried my packaged game with multiplayer. This is never reproduce when we play with less than 4 PC. And even with more than 4 PC connected, it still rarely happens. And i really don't know how to reproduce the bug or even fix it.

All we did is keep shooting raycast to another player, (our weapon will spawn a bullet projectile (AActor) to make it look nice). And while we fight each other, we jumping, running and go here and there (like normal fps game).

Suddenly, the game crashes and this is the call stack

 [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\Core\Private\Serialization\Archive.cpp] [Line: 258] 
     FArchive does not support FWeakObjectPtr serialization. Use FArchiveUObject instead.
     
     
   FDebug::AssertFailed()
   FArchive::operator<<()
   FHitResult::NetSerialize()
   StructProperty::NetSerializeItem()
   FRepLayout::UpdateUnmappedObjects_r()
   FRepLayout::UpdateUnmappedObjects_r()
   FRepLayout::UpdateUnmappedObjects()
   FObjectReplicator::UpdateUnmappedObjects()
   UNetDriver::TickFlush()
   ?ExecuteIfSafe@?$TBaseUObjectMethodDelegateInstance@$0A@VUNetDriver@@$$A6AXM@Z$$V@@UEBA_NM@Z()
   TBaseMulticastDelegate<void,float>::Broadcast()
   UWorld::Tick()
   UGameEngine::Tick()
   FEngineLoop::Tick()
   GuardedMain()
   GuardedMainWrapper()
   WinMain()
   __scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:255]
   kernel32
   ntdll
 

Also, i just realized that FBitReader class is developed after 4.13. i think maybe it has something to do with that, but im not entirely sure. Did anyone have explanation about this?

Note: i cant find any .dmp file created on my folder

Any help is appreciated. Thank you very much

Product Version: UE 4.14
Tags:
more ▼

asked Mar 09 '17 at 09:33 AM in Bug Reports

avatar image

Sandiodm
18 5 9 12

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

1 answer: sort voted first

This happens when you trying to replicate an Actor property inside HitResult structure. There is an engine problem that I met when writting my own bake subsystem. (Explained here) Any archives except Linker (uasset file packager) can not handle UObjects and references. This error wont pop permanently because serializers don't serialize values that equals to the defaults. It seems your structure usually have an Actor set to null and replication not crashing. To fix this crashes you can:

  • Prevent actor properties from being not null

  • Do not replicate HitResult at all

  • Create custom replication and handle UObject replication better than engine does.

more ▼

answered Mar 09 '17 at 10:12 AM

avatar image

c4tnt
1k 13 8 31

avatar image Sandiodm Mar 09 '17 at 10:36 AM

Thank you for fast reply. I actually did replicate a TArray of HitResult for clients. I will test it now, and i will let you know if the crash still happens.

avatar image Sandiodm Mar 13 '17 at 01:46 AM

Sorry for the late reply. need to find another solution for my feature first. But yeah. 10 players, no problem right now. :) i'll keep that in mind. ;)

avatar image c4tnt Mar 13 '17 at 06:05 PM

If you need to replicate UObjects through the network you can use RPC Calls. For functions defined like UFUNCTION(Reliable, Client) void Network_AddComponentReceiver(UInteractionRecieverComponent* receiver_component, FVector CasterLocation, FName MapName);

it works fine

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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