mach icon indicating copy to clipboard operation
mach copied to clipboard

macOS: 'zig build run-core-custom-entrypoint' crashes on clicking exit window button

Open emidoots opened this issue 1 year ago • 1 comments

error: the following command terminated unexpectedly:
/Volumes/data/hexops/mach/zig-out/bin/core-custom-entrypoint
Build Summary: 20/22 steps succeeded; 1 failed
run-core-custom-entrypoint transitive failure
└─ run core-custom-entrypoint failure
error: the following build command failed with exit code 1:
/Volumes/data/hexops/mach/.zig-cache/o/24a080bf075057fe9f843378660962bc/build /Users/slimsag/zig/0.14.0-dev.1911+3bf89f55c/files/zig /Users/slimsag/zig/0.14.0-dev.1911+3bf89f55c/files/lib /Volumes/data/hexops/mach /Volumes/data/hexops/mach/.zig-cache /Users/slimsag/.cache/zig --seed 0x4a5fc474 -Ze756a513fa48163f run-core-custom-entrypoint
(base) slimsag@dev mach % zig build run-core-custom-entrypoint
info(mach): found Metal backend on Discrete GPU adapter: Apple M3 Max,

error(mach): mach: device lost: Device was destroyed.
thread 4406187 panic: mach: device lost
/Volumes/data/hexops/mach/src/Core.zig:427:5: 0x10462e15f in deviceLostCallback (core-custom-entrypoint)
    @panic("mach: device lost");
    ^
/Volumes/data/hexops/mach/src/sysgpu/metal.zig:185:20: 0x1047058a3 in deinit (core-custom-entrypoint)
            lost_cb(.destroyed, "Device was destroyed.", device.lost_cb_userdata);
                   ^
/Volumes/data/hexops/mach/src/sysgpu/utils.zig:18:30: 0x1046ae1c7 in release (core-custom-entrypoint)
                parent.deinit();
                             ^
/Volumes/data/hexops/mach/src/sysgpu/main.zig:694:31: 0x1046ade8b in deinit (core-custom-entrypoint)
        device.manager.release();
                              ^
/Volumes/data/hexops/mach/src/module.zig:651:29: 0x104692a5b in run__anon_21942 (core-custom-entrypoint)
                    switch (@typeInfo(Ret)) {
                            ^
/Volumes/data/hexops/mach/src/module.zig:674:57: 0x1046567df in callDynamic (core-custom-entrypoint)
                        inline else => |fn_name| mod.run(fn_name),
                                                        ^
/Volumes/data/hexops/mach/src/module.zig:637:61: 0x10462ac87 in run (core-custom-entrypoint)
                                        modules2.callDynamic(fn_id);
                                                            ^
/Volumes/data/hexops/mach/src/module.zig:437:19: 0x104631fd7 in run (core-custom-entrypoint)
            r._run(r._ctx, fn_id);
                  ^
/Volumes/data/hexops/mach/src/module.zig:442:18: 0x1046adc47 in call__anon_27534 (core-custom-entrypoint)
            r.run(fn_id);
                 ^
/Volumes/data/hexops/mach/src/Core.zig:265:26: 0x1046adaeb in presentFrame (core-custom-entrypoint)
            core_mod.call(.deinit);
                         ^
/Volumes/data/hexops/mach/src/module.zig:651:29: 0x1046929bb in run__anon_21941 (core-custom-entrypoint)
                    switch (@typeInfo(Ret)) {
                            ^
/Volumes/data/hexops/mach/src/module.zig:674:57: 0x1046567c7 in callDynamic (core-custom-entrypoint)
                        inline else => |fn_name| mod.run(fn_name),
                                                        ^
/Volumes/data/hexops/mach/src/module.zig:637:61: 0x10462ac87 in run (core-custom-entrypoint)
                                        modules2.callDynamic(fn_id);
                                                            ^
/Volumes/data/hexops/mach/src/module.zig:437:19: 0x104631fd7 in run (core-custom-entrypoint)
            r._run(r._ctx, fn_id);
                  ^
/Volumes/data/hexops/mach/src/module.zig:442:18: 0x10463203f in call__anon_14782 (core-custom-entrypoint)
            r.run(fn_id);
                 ^
/Volumes/data/hexops/mach/src/Core.zig:321:18: 0x1046f8ebb in platform_update_callback (core-custom-entrypoint)
    core_mod.call(.presentFrame);
                 ^
/Volumes/data/hexops/mach/src/core/Darwin.zig:43:17: 0x104697a9f in cCallback (core-custom-entrypoint)
            if (@call(.auto, on_each_update_fn, args.*) catch false) {
                ^
???:?:?: 0x1820bdcb7 in ??? (libdispatch.dylib)
???:?:?: 0x2a450001820bf90f in ??? (???)
???:?:?: 0x95060001820cdfa7 in ??? (???)
???:?:?: 0x3a7a0001820cdbbf in ??? (???)
???:?:?: 0xd34e80018238b15b in ??? (???)
???:?:?: 0x9a2a000182348a7f in ??? (???)
???:?:?: 0xd05c000182347c5b in ??? (???)
???:?:?: 0x4f4b00018c8c6447 in ??? (???)
???:?:?: 0x770e00018c8c6283 in ??? (???)
???:?:?: 0xb76b80018c8c5fdb in ??? (???)
???:?:?: 0xa843000185b22bdf in ??? (???)
???:?:?: 0x6f370001862f8e8b in ??? (???)
???:?:?: 0xd01800185b1608b in ??? (???)
???:?:?: 0xb127800104697cfb in ??? (???)
/Users/slimsag/.cache/zig/p/12205e56037f3c3112c073bc833eea5f95b6ec3fb03a53cc7264595d2266304a5f7f/src/app_kit.zig:165:28: 0x1046630ef in run (core-custom-entrypoint)
        return objc.msgSend(self_, "run", void, .{});
                           ^
/Volumes/data/hexops/mach/src/core/Darwin.zig:60:15: 0x10463219b in run__anon_14811 (core-custom-entrypoint)
    ns_app.run();
              ^
/Volumes/data/hexops/mach/src/Core.zig:304:21: 0x104631f93 in main (core-custom-entrypoint)
        Platform.run(platform_update_callback, .{ core, core_mod });
                    ^
/Volumes/data/hexops/mach/src/module.zig:651:29: 0x104613bc3 in run__anon_6206 (core-custom-entrypoint)
                    switch (@typeInfo(Ret)) {
                            ^
/Volumes/data/hexops/mach/src/module.zig:612:40: 0x10460e22b in run__anon_4755 (core-custom-entrypoint)
                            callMod.run(callFn);
                                       ^
/Volumes/data/hexops/mach/examples/core-custom-entrypoint/main.zig:36:16: 0x10460dc07 in main (core-custom-entrypoint)
        app.run(.main);
               ^
/Users/slimsag/zig/0.14.0-dev.1911+3bf89f55c/files/lib/std/start.zig:621:37: 0x10460e4c7 in main (core-custom-entrypoint)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x181ef10df in ??? (???)
???:?:?: 0x950c7fffffffffff in ??? (???)
run-core-custom-entrypoint
└─ run core-custom-entrypoint failure
error: the following command terminated unexpectedly:
/Volumes/data/hexops/mach/zig-out/bin/core-custom-entrypoint
Build Summary: 20/22 steps succeeded; 1 failed
run-core-custom-entrypoint transitive failure
└─ run core-custom-entrypoint failure
error: the following build command failed with exit code 1:
/Volumes/data/hexops/mach/.zig-cache/o/24a080bf075057fe9f843378660962bc/build /Users/slimsag/zig/0.14.0-dev.1911+3bf89f55c/files/zig /Users/slimsag/zig/0.14.0-dev.1911+3bf89f55c/files/lib /Volumes/data/hexops/mach /Volumes/data/hexops/mach/.zig-cache /Users/slimsag/.cache/zig --seed 0x863780fd -Z85b8b322739413f7 run-core-custom-entrypoint

emidoots avatar Dec 24 '24 23:12 emidoots

is there a workaround for this?

z-jxy avatar Jun 22 '25 02:06 z-jxy