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

Loading glb model crash #728

Open
zhuYouFu opened this issue Nov 5, 2024 · 2 comments
Open

Loading glb model crash #728

zhuYouFu opened this issue Nov 5, 2024 · 2 comments
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@zhuYouFu
Copy link

zhuYouFu commented Nov 5, 2024

Describe the bug
Loading glb model would crash at some time.

Files

Attach or link to .gltf/.glb files that trigger the bug.

data_model_2_1153814614.zip

To Reproduce
Steps to reproduce the behavior:
1.Loading model many time at runtime
2.Crash would happend probably

Expected behavior
crash message:

kTextureUploadUninitialized is only allowed for newly created textures
Assertion failed on expression: 'validData'

========== OUTPUTTING STACK TRACE ==================

0x00007FF7BB944008 (Unity) memcpy
0x00007FF7B8D11FEE (Unity) prcore::BlitImage
0x00007FF7B95F581E (Unity) TexturesD3D11Base::CopyToMappedStagingTexture
0x00007FF7B95FCAED (Unity) TexturesD3D11Base::UploadAll2DData
0x00007FF7B95FD686 (Unity) TexturesD3D11Base::UploadTexture2D
0x00007FF7B95F2F72 (Unity) GfxDeviceD3D11Base::UploadTexture2D
0x00007FF7BACA98E5 (Unity) GfxDeviceWorker::RunCommand
0x00007FF7BACB300B (Unity) GfxDeviceWorker::RunExt
0x00007FF7BACB3128 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x00007FF7B92D665B (Unity) Thread::RunThreadWrapper
0x00007FFE0542257D (KERNEL32) BaseThreadInitThunk
0x00007FFE06D4AF08 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

Desktop (please complete the following information):

  • glTFast version:2.0.0-dev.3.10
  • Unity Editor version:2022.3.45f1c1
  • Render Pipeline and version:Universal Render Pipeline 14.0.11
  • Platform: Editor, Windows Player
@zhuYouFu zhuYouFu added the bug Something isn't working label Nov 5, 2024
@atteneder atteneder moved this from To do to Planned in glTFast development Dec 11, 2024
@atteneder atteneder added this to the 6.x milestone Dec 11, 2024
@atteneder
Copy link
Owner

Hi,

Thanks for reporting.

Does that mean the crash happens every time?
In the Editor, or in a build or both?

A temporary workaround is to replace this line in GltfImport.CreateEmptyTexture:

// // Replace this:
// var textureCreationFlags = TextureCreationFlags.DontUploadUponCreate | TextureCreationFlags.DontInitializePixels;

// With this:
var textureCreationFlags = TextureCreationFlags.None;

@atteneder
Copy link
Owner

I wasn't able to reproduce it. Could you provide a test project that is able to reproduce it?

@atteneder atteneder moved this from Planned to To do in glTFast development Dec 17, 2024
@atteneder atteneder added the question Further information is requested label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
Status: To do
Development

No branches or pull requests

2 participants