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

shaderc segfaults when using more than one include path #1

Closed
samloeschen opened this issue Jul 6, 2024 · 2 comments
Closed

shaderc segfaults when using more than one include path #1

samloeschen opened this issue Jul 6, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@samloeschen
Copy link
Contributor

samloeschen commented Jul 6, 2024

Currently, shaderc segfaults during shader compilation when ShadercOptions.includeDirs has a length greater than 1. I've made a simple repro project demonstrating the error. Strangely, I cannot get it to happen if I add more paths to the 02-runtime-shaderc example, but the bgfx state should be the same in the repro as far as I can tell.

To reproduce:
-> clone the repro project: https://github.com/samloeschen/shaderc-repro
-> cd into project folder and zig build run
-> shaderc should segfault during shader compilation

shaderc will succeed if you simply delete the second array element at L85 of main.zig.

Apologies if this error is on my end! I'm definitely still learning zig and bgfx, so could have overlooked something.

Environment:
M2 Air, MacOS 14.3.1

@samloeschen samloeschen changed the title shaderc segfault when using more than one include path shaderc segfaults when using more than one include path Jul 6, 2024
@samloeschen
Copy link
Contributor Author

should be fixed by #2 (comment)

@OndraVoves
Copy link
Member

Nice catch 😄

@OndraVoves OndraVoves added the bug Something isn't working label Jul 7, 2024
@OndraVoves OndraVoves self-assigned this Jul 7, 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
Projects
None yet
Development

No branches or pull requests

2 participants