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

core: mach triangle example project segfaults (PopOS) #1232

Open
wsdevv opened this issue Jul 22, 2024 · 2 comments
Open

core: mach triangle example project segfaults (PopOS) #1232

wsdevv opened this issue Jul 22, 2024 · 2 comments
Labels
bug Something isn't working needs-triage Issues that need triaging

Comments

@wsdevv
Copy link

wsdevv commented Jul 22, 2024

(can expand on anything if you'd like. However the error is very obscure, so I'm not sure how helpful this report will be :/ )
Hardware:

  • 11th Gen core i7
  • Intel Iris Xe Graphics (using Mesa Xe drivers that came installed with the OS)

Software:

  • PopOS LTS 22.04
  • X11 windowing system
    (Vulkan driver version 24.0.3)

The problem:
After a few seconds of running the triangle-shader example project with zig version 0.13.0-dev.351+64ef45eb0 (latest mach version), the program segfaults with the following message

Segmentation fault at address 0x0
???:?:?: 0x7e91acda7db1 in ??? (libvulkan_intel.so)
Unwind information for "libvulkan_intel.so:0x7e91acda7db1" was not available, trace may be incomplete

run
└─ run {project-name} failure
error: the following command terminated unexpectedly:
/home/{user}/Documents/{project-name}/zig-out/bin/{project-name}
Build Summary: 34/36 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run {project-name} failure
error: the following build command failed with exit code 1:
/home/{user}/Documents/{project-name}/.zig-cache/o/df0ae361e441204d340ce80a2e5a7aff/build /home/{user}/zig/0.13.0-dev.351+64ef45eb0/files/zig /home/{user}/Documents/{project-name} /home/{user}/Documents/{project-name}/.zig-cache /home/{user}/.cache/zig --seed 0x9c5994d9 -Z8982752a60a55545 run
@wsdevv wsdevv added bug Something isn't working needs-triage Issues that need triaging labels Jul 22, 2024
@wsdevv wsdevv changed the title Mach triangle example project segfaults (PopOS) core: mach triangle example project segfaults (PopOS) Jul 23, 2024
@RonaldZielaznicki
Copy link
Contributor

@wsdevv
Would you be able to verify that this issue is fixed after #1289?

@EvilCultist
Copy link

@RonaldZielaznicki I am on popos and am experiencing the same issues. I can confirm #1289 hasn't fixed this issue.

on running zig build run-core-triangle I get-

Segmentation fault at address 0x0
~/mach/src/sysgpu/vulkan.zig:1099:29: 0x11b387b in getCurrentTextureView (core-triangle)  
        const vk_device = sc.device.vk_device;
                            ^
~/mach/src/sysgpu/main.zig:1260:62: 0x114713b in tick (core-triangle)
        const texture_view = swap_chain.getCurrentTextureView() catch @panic("api error");
                                                             ^
~/mach/src/module.zig:649:29: 0x1121adc in run__anon_23646 (core-triangle)
                    switch (@typeInfo(Ret)) {
                            ^
~/mach/src/module.zig:672:57: 0x10f6b7c in callDynamic (core-triangle)
                        inline else => |fn_name| mod.run(fn_name),
                                                        ^
~/mach/src/module.zig:635:61: 0x10d6b25 in run (core-triangle)
                                        modules2.callDynamic(fn_id);
                                                            ^
~/mach/src/module.zig:435:19: 0x10d6e19 in run (core-triangle)
            r._run(r._ctx, fn_id);
                  ^
~/mach/src/Core.zig:244:17: 0x10d6cb0 in main (core-triangle)
    core_mod.run(core.on_tick.?);
                ^
~/mach/src/module.zig:649:29: 0x10b14a6 in run__anon_7358 (core-triangle)
                    switch (@typeInfo(Ret)) {
                            ^
~/mach/src/module.zig:610:40: 0x10aa7c3 in run__anon_4768 (core-triangle)
                            callMod.run(callFn);
                                       ^
~/mach/examples/core-triangle/main.zig:21:12: 0x10a9ffa in main (core-triangle)
    app.run(.main);
           ^
~/zig/lib/std/start.zig:621:37: 0x10aab8e in main (core-triangle)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x79f036c29d8f in ??? (libc.so.6)
Unwind information for `libc.so.6:0x79f036c29d8f` was not available, trace may be incomplete

zig build test doesn't show any errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issues that need triaging
Projects
None yet
Development

No branches or pull requests

3 participants