PreloadAsync callbackFunction causes Crashes and Errors

PreloadAsync accepts two Parameters;

  1. contentIdList, an array of Instance s to be preloaded.

  2. callbackFunction, a Lua function to be called on completion of each asset request, default is nil.

I haven’t tested this on XBox only PC, iPhone 11 Pro, iPhoneXR, and iPad Pro 3

From my observation adding a callbackFunction to PreloadAsync will cause it to Output Error Messages seen below;


(this only happens in Roblox Client, won’t happen in Studio)

This also Closes Roblox Client, Crashes Roblox Client, (sometimes in Studio) 8/10 times of joining a Game.

image

Please fix this as urgently as possible, many of us rely on the callbackFunction


Resources

Demo

Please use this poll to help Engineers confirm that you are experiencing issues mentioned above, Thank you!

  • Did Roblox Client Crash or Close?
  • Did You Get Error Messages In DevConsole?

0 voters

Repro.rbxl (18.9 KB)
(LocalScript is located in ReplicatedFirst)

Code
local ContextProvider = game:GetService("ContentProvider")

local function Preloaded() 

end

print("Preloading")

pcall(ContextProvider.PreloadAsync,ContextProvider,{workspace:WaitForChild("Assets")},Preloaded)

print("Preloaded")

Additional Information

My Laptop Specs

Alienware 17 R5

OS: Windows 10 Pro


GPUs:

  • NVIDIA GeForce GTX 1080
  • Intel(R) UHD Graphics 630


8 Likes

We’ve been experiencing this for a while in our game but didn’t have any solid repro. Definitely been happening for quite some time, at least a month.

I’m on mobile and can’t open the demo to check right now, but are you by chance attempting to preload sounds at all?

I was having the same issue - it turned out to be the sounds that were causing the crashes. After disabling the sounds preload and preloading only meshes and textures, the crashing stopped. I was still using the callback function. This is still a big issue either way, but I’m just curious if it’s the same scenario that I had.

No, I’m only Preloading the default Animations in a Baseplate provided as the Demo.

It’s definitely the callbackFunction because there weren’t any issues without it.

1 Like

The callback has issues with sounds as well then. I had to disable preloading sounds with the callback in order for the game to even be playable since it crashed about 90% of the time. I’m glad you brought this up because I’ve been trying to find other people having the same issue.

Generally the callbackFunction has issues with any kind of Instance.

Yeah me too, I’m glad that I am being helpful to fellow Devs.

You should put the [ROBLOXCRITICAL] tag (which is currently at the end of your title) at the beginning.

Furthermore, it doesn’t appear that this works 100% of the time (by your own information) – I would recommend reviewing the guidelines for ROBLOXCRITICAL posts!

Don’t worry about where the tag is, I put it at the end because the Title is more important.

Yes, I didn’t put it as Roblox Critical at first but I’ve asked around to make sure.

It is true that it doesn’t happen 100% of the time but more importantly it effects Roblox negatively, Crashing games and Silently closing games upon joining is terrible User Experience, causing Developers player and money, and henceforth Roblox.

I’ve read the guidelines several times and the OP does win multiple points to be categorized as Critical.
(A few staffs has also been through the OP so don’t worry about it.)

1 Like

I have just shipped a fix for this crash.

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.