Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rapier runtime errors when instantiating prefabs with colliders attached #185

Closed
6 tasks done
snorulf opened this issue Nov 23, 2023 · 2 comments
Closed
6 tasks done
Labels
bug Something isn't working

Comments

@snorulf
Copy link

snorulf commented Nov 23, 2023

Describe the bug 💬

Getting runtime errors lately using NE 3.25.3, not sure at which version this actually broke but I started noticing it today when running a scene which loads prefabs/glbs with collider components.

Scene loads several (15-20) npc different prefabs with animator animations using:

async awake() {
  await this.prefabObject?.instantiate(this.gameObject);
}

I sort of verified that it was the NE version causing this by reverting to a commit I did 14 days ago when I know things were working fine and doing a complete reinstall + export which gave me the same issue.

Console output:

debug_overlay.ts:23 Error creating collider "HansA"
Error: Error: recursive use of an object detected which would lead to unsafe aliasing in rust
    at I3.wbg.__wbindgen_throw (rapier_wasm3d.js:4504:15)
    at 00527bbe:0x139b1b
    at 00527bbe:0x139b37
    at 00527bbe:0xe2e4f
    at H.createCollider (rapier_wasm3d.js:932:18)
    at MI.createCollider (collider_set.ts:79:31)
    at sI.createCollider (world.ts:342:31)
    at _RapierPhysics.createCollider (engine_physics_rapier.ts:760:36)
    at _RapierPhysics.addBoxCollider (engine_physics_rapier.ts:534:14)
    at BoxCollider.onEnable (Collider.ts:101:38)

Could it have been caused by the recent performance improvement in 3.25.3? I'm not really a web developer so I don't know how to revert to previous NE runtime versions and verify.

Operating System 👩‍💻

Windows, Android (mobile)

What browsers are you seeing the problem on? 🏄‍♂️

Chrome

Editor Version 🎲

2022.x

Needle Exporter version

3.25.3 and 3.21.2

Project Info (Unity only) 📜

No response

Steps to reproduce 🔢

1. instantiate prefab object with collider attached using 
async awake() {
  await this.prefabObject?.instantiate(this.gameObject);
}
2. Sometimes I had to load several objects this way to repro the issue.

Hope this helps.

Reproduction ♻

No response

Discord or Discussion link

No response

Validations 🩹

@snorulf snorulf added the untriaged Newly reported issue label Nov 23, 2023
@marwie
Copy link
Member

marwie commented Nov 23, 2023

Hi, thanks for the report. Can you try if it still happens with version 3.25.4 ?

@marwie marwie added bug Something isn't working and removed untriaged Newly reported issue labels Nov 23, 2023
@snorulf
Copy link
Author

snorulf commented Nov 23, 2023

Yup, 3.25.4 seems fix to it. Thanks

@marwie marwie closed this as completed Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants