Crash and weird behavior when using Buoyancy with a child actor

Hello! First of all, thank you very much for taking your time for my problem!
I am new to Unreal Engine, I have some notions, enough to make a clean game, but not yet in everything that is multiplayer etc …
So I want to make a game that would mix World of Warships and Sea of ​​Thieves, so basically, reproduce naval battles from the Second World War in the first person with several people on each boat.
So, I thought of using the Unreal Water plugin, which despite some strange behaviors depending on the mesh, works well enough for what I want to do. And regarding the boats, I wanted to make a main hull, with cannons and other equipment/armament in the form of child actors attached to the hull. I don’t know if this is the most optimized, I don’t know if it’s possible to do it in another way, but in any case, for my cs, it causes me some problems.
So I create a stable hull, without collision problems, and when I add a child actor to it, the engine crashes when I run the game (the compilation works). Here is the error message (he will probably not help ^^ ) :

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000

UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

and here my Blueprint hierarchy :

So I restart the engine, and there I can launch the game, except that my boat adopts a strange behavior: Turn super fast and go at Mach 3 in hyperspace (behavior that I found with certain hull meshes for reasons that I can not explain)

So far, here’s what I’ve noticed:

  • Whether or not the child actor touches/overlaps the main blueprint mesh doesn’t change anything.
  • An empty blueprint as a child actor crashes, but doesn’t create the flying boat issue on restart
  • A blueprint containing a mesh will cause the bug to occur, regardless of the mesh (I tried with my turret, or the base cube)

So I do not know how to do it, I do not know if I can get around this bug, by solving it or by finding another way to make a system with equipment that players can take possession of all this on the same vehicle that floats with a Buoyancy component.

Thanks in advance for your help!

Here is my config :
Unreal 5.4.4
Laptop RTX 4050
I7 12700H
32GB RAM

a 0 exception is a null pointer exception. One of your pointers is uninitialized and empty.
This could be a matter of trying to access the child actors actor if it’s for instance still empty in c++ (just guessing atm)

It’s probably best to run your ide in debug mode and once the crash occurs check the callstack to see what last line of your code was executed before the fatal error.

If you are getting weird movement behavior then I would suggest checking if you are overriding any functions without calling the super version of the function (it invokes the parent’s function) it is usually called as the first thing in an override (though sometimes at a later stage in the function depending on circumstances)

Your ship may be having collision problems with the turret. If the ship is physics based it might get wonky. Try temporarily disabling collision on the turret actor to see if the ship stops misbehaving.

You may need to add the turrets to a custom collision channel so that they don’t interact with the parent ship.

Thanks ! Just figured out the collision thing ! I solved the null pointer problem by creating the turret first then attaching it to the boat, so i guess you’re right !
I may have an other question, did the hull’s collision shap can modify the behavior of the way the ship float with the byoancy componenent ? Because when i activated the option in the console the debug to see the different points and “interface” of the componenent and the water, i didnt see any link between the hull shape and the way the ship float. But when i tried the same blueprint with 2 different mesh, the behavior was completly different (one was stable and the other was trying to hit le light speed).
Thanks for your first answer ! I know the second question may be a little bit off-topic but would be grateful if you can haelp me on the second one !
Thanks !

Sorry I haven’t personally used the Buoyancy system for any of my projects yet so I was going off intuition on this question based on how physics objects react with collider interactions.

Maybe someone else with experience with the component can help you out better.

You can always try to auto generate the collision hull from within the static meshes details panel if the collision volume is vastly different from the mesh.

Maybe setting the center of mass might elevate that problem

From the documentation of the buoyancy component:

Ok thx for the advice ! Have a great day !