The game froze for about 10 seconds while playing in editor. I retrieved the following errors from the log and I looked at the code mentioned but I’m unsured what’s wrong. Would you have any idea by any chance?
Thanks a lot!
Hey there @Nimillion! That’s an interesting one, it seems like either the total impulse that is applied to the object is so high that it becomes NaN or is considered infinite. How does this trigger? Only when applying extreme forces?
I have a rocketship which is moved by applying forces which are controlled by the player.
The player add forces to move forward and rotate
The ship has an ANTI GRAVITY force always applied (small force UP to counter gravity)
Note:
The recent change I made was to deactivate / re-activate the ANTI GRAVITY perk when fuel is low. This adds force with the node ADD FORCE → FORCE Z=400000.0
(during flight: if fuel low => do not ADD FORCE up.
after refuelling: ADD FORCE up)
I never had a problem before until I did this. (been working on this for 1 year)
I did another test but could not reproduce the issue. I don’t think that it happened when the ANTI GRAVITY was deactivated. Pretty sure it happened while flying as usual without doing anything special or hitting any other actor (was just applying the usual forces used when flying).
You mention extreme forces. Perhaps, I could clamp the maximum amount of forces that can be applied?
If not extreme forces, it could be that they were changing too fast between physics ticks. Are there cases where during normal ticks where it bounces back and forth between being applied and not? I’m currently unable to replicate this so far.
I will check that and will let you know if I can see this happening but I never felt it and I can’t reproduce the issue at the moment.
All that said, just in case it could be causing this issue:
My editor started freezing a few days ago when using the SIMULATE mode (I stopped using this mode for now)
Since this Chaos issue, I get more freezes. I just got 1 when PLAYING IN EDITOR on QUIT. It freezes with no crash. This time, my game no longer loads my title screen… Last time this happened, I compiled my game Instance without changing anything and it worked again… weird, I’m not an expert.
Unfortunately, I don’t usually see any error after a freeze.
It looks like my Freezes may have been caused by my game instance which is using SPAWN SOUND 2D with the Sound base object input set using a soft reference rather than the actual object. When I use the object reference, the title screen loads again.
I will continue to work and stay on the topic of the issue with Chaos for this thread. If I get another crash, I’ll log the GRAVITY ACTIVATION and see if there is any unwanted behaviour there.
Understandable, if it turns out the chaos side crashes keep occurring, definitely keep us updated. Physics crashes can be a bit esoteric sometimes, so it’s good to have all the data we can get.
Thanks for that! Doesn’t seem like any warnings or non-fatal errors or anything preceding the crash itself and it’s centered on the number being passed being either NaN or infinite. This adds up all forces that were applied between the physics ticks and then tests it’s validity, though I’m having trouble discerning how it could fail unless game tick and physics tick got so far from each other that your 400000 runs until the overflow point. (Which shouldn’t happen).
I know it would drop the object out of the sky (just for testing something not for a fix), but try dropping the force to something useless but infinitely harder to max out like 400. Does the error still occur? Does it take way longer in the field?
OK will try that. I’m now tracking this force at all time in logs.
Please note that this force is one of the lowest though.
The entire game is based on physics.
I have
cables
Rocket ship (Main force power: 2000000.0, rotation power: 1500000000.0 (add torque in degrees) gravity stabilizer:400000). The ship also has 1 physic constraint component for suspension
rigid bodies with simulation
skeletal meshes
Please note the force for rotation. Could that be too huge I need this much because I use a high angular damping value (feels better for turning). I was turning when both crash happened…
But this issue only started to appear today… Been testing almost every day for months in UE 5.3 with little to no change to these values.
Ahhh the constraints or cables might be getting odd numbers for sure as well. My next thought was to try to isolate the core of the vehicle from the cables, constraints, and physically simulated actors to see if it’s the base or the external components but forces that high it could be a bit hectic. Try also flying though without turning to see if it’s possibly just the torque that’s clipping.
Sorry, I wasn’t clear. The cables are not attached to the ship and they are only used for decoration. They are attached to static machines on one side (the parent actor) and the end is attached to a static object in the world.
I will try everything you mentioned while I’m working on the game. I will also remove a zero or 2 from the rotation but I’m not too hopeful because I never had this problem before using the same forces for months. The cables are fairly new though but they have very limited interaction and no collision with the ship or anything else except 1 specific type of invisible actor which is used to position the cable and avoid clipping through the world. I also never have more than 1 cable at a time on screen.
Thanks, I’ll report back when I get more information.