Skip to content

A multithreading issue with GltfLoader #1809

Closed
@foxcc2021

Description

@foxcc2021

I use multithreading to load gltf models, when loaded, all model materials are messed up.

After I debug GltfLoader, I found out that there may be threading issue in the GltfLoader. The variable "defaultMaterialAdapters" cannot be "static". This variable will be shared when all threads load materials from the model.

A simple way to resolve this issue is to remove the "static".
Hope this helps.
I use jme version: 3.5.2-stable
20220505173134

resolve
I use this way to resolve my problem.

err0
err1
The wrong materials before

correct
The correct materials after

Metadata

Metadata

Assignees

Labels

defectSomething that is supposed to work, but doesn't. Less severe than a "bug"

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions