Explosions modifying Terrain crash the server

The average playtime of BIRD dropped significantly around Dec 8. I don’t think we made any material changes to the game around this time.

In the past couple weeks, I and other players started occasionally disconnecting from the game with the message “Please check your internet connection and try again.” We confirmed in a few VIP servers that everyone in the server would disconnect with this message simultaneously.

RobloxScreenShot20211231_173424907 (2)

We noticed this message appeared a few times the moment before a stick of Dynamite was about to explode. The Explosion from a stick of Dynamite uses ExplosionType = Enum.ExplosionType.CratersAndDebris to create a crater in Terrain. Over the lifetime of a server, more and more craters accumulate around the map. Dynamite has functioned like this in the game for years without issue.



At 3pm Pacific Time on Dec 29, I published a modification to the Dynamite script that makes the Explosions use ExplosionType = Enum.ExplosionType.NoCraters (except in a few rare cases where the Dynamite explodes near a couple hidden tunnels). This significantly reduced the number of craters created on the map. This is the only significant change we made to the game in the 48 hours during which the average playtime returned to its level prior to Dec 8. This suggests the crater creation was somehow causing the crashes.

Expected Behavior
The server should not crash when an Explosion creates a Terrain crater.

Actual Behavior
The server sometimes crashes when an Explosion creates a Terrain crater. Maybe 1 out of every 20 explosions? I’m not sure if other factors influence this, like number of players connected.

Workaround
We disabled craters in most locations of the map, which is less fun, but we still need to use them to explode open a few hidden tunnels that are critical for gameplay. The crashes still happen (I just saw one today), but at a much lower rate.

Issue Area: Engine
Issue Type: Crashing
Impact: High
Frequency: Often
Date First Experienced: 2021-12-08 00:12:00 (-08:00)

8 Likes

I’m not sure if you’re using any tweening events, or some sort of events when craters are created, but I had the exact same error come up in my story game, when I wasn’t properly disconnecting the event and then setting the handle to nil, upon the Tween event completing. I used Tweening to smoothly rotate some mesh fireballs.

I spent a week trying to figure out what was going wrong, and tried fixing the issue by doing less instances of the tweens, but this didn’t always solve the problem. The solid solution was what I mentioned above.

I also did some disconnect/ set to nil on the my animation handlers, which was a hassle as I had several animations already setup by that time, but fortunately everything was organized enough to find them. Now that I think about it, I had to do both of these event cleanups, to 100% eliminate that annoying problem (that didn’t occur until I started adding more events, more tweens, more animations,etc.) As the game got bigger, a lot of things had to change…

As for why this happens, its probably due to memory leaks that occur when an event isn’t properly disconnected.

1 Like

@kleptonaut has put out a fix. Is this still happening?

1 Like

I reenabled craters everywhere and have not seen any playtime drop in the past 24 hours. I haven’t seen this disconnect message either. I think we’re good

Closing as this issue no longer occurs. Of this issue starts recurring, please file a new bug report

1 Like