Crash bug when replacing materials (4.8 promoted branch)

We’re running into an issue with a certain material. We can put it in material slot 0 or 1 on a mesh, but it ends up occupying BOTH slots. Then, when we try to replace the material, we get the following crash – see attached.

This is happening with the current 4.8 promoted branch.

More info on this:

“So… the problem with the materials is actually the import process. Importing is currently broken when importing multiple meshes.
They DID push a new bunch of changes into the promoted branch last night [which are apparently causing this].”

From the artist:

"ok so based on the tests so far, it’s looking like the import process is borked

as i attempted to use all the new materials on the habitat, and all was well

when i imported a NEW habitat (same as the old one), each material assignment auto-filled all available slots

so when there is 1 material, the bug doesn’t reveal itself, when there is 2 or more and i attempt to change one, unreal dies"

A bit more info: we just got the latest promoted branch on GitHub today to see if it would fix it. It did not.

We have also tested applying these materials to older static meshes (imported in 4.6), and it was fine. Upon reimporting the same asset in the latest build, changing any material from the default propagates the change to all material IDs. Attempting to change any material ID to another material at this point results in a crash.

FYI, Neil Griffiths has posted a more complete description of the bug here: