zine icon indicating copy to clipboard operation
zine copied to clipboard

setting and resetting `.draft` in front matter crashes zine development server

Open Calder-Ty opened this issue 7 months ago • 0 comments

Zine Version

v0.11.1-dev.6+b96e930

Steps to Reproduce

  1. Create new zine site zine init
  2. run zine
  3. open content/blog/index.smd
  4. change the .draft attribute of the frontmatter from false to true.
  5. change the .draft attribute of the frontmatter from true to false.

You will see zine server crash with this error:

General protection exception (no address available)
/home/tyler/.local/bin/zig-x86_64-linux-0.15.1/lib/std/heap/arena_allocator.zig:59:73: 0x66bbb30 in serve (zine)
            const alloc_buf = @as([*]u8, @ptrCast(buf_node))[0..buf_node.data];
                                                                        ^
/home/tyler/src/zine/src/main.zig:117:39: 0x66b8da3 in main (zine)
        @import("cli/serve.zig").serve(gpa, args[1..]);
                                      ^
/home/tyler/.local/bin/zig-x86_64-linux-0.15.1/lib/std/start.zig:622:29: 0x66b46dd in main (zine)
            return root.main();
                            ^
???:?:?: 0x7f8be4227674 in ??? (libc.so.6)
Unwind information for `libc.so.6:0x7f8be4227674` was not available, trace may be incomplete

???:?:?: 0x7f8be4227728 in ??? (libc.so.6)
???:?:?: 0x66b43a4 in ??? (???)
Aborted                    (core dumped) zine

Describe the issue

I was playing around with zine. I know it doesn't make sense to set the blog index.smd to be a draft, but thought i'd report this as it looks to be a memory error. I build this version of zine in ReleaseSafe mode.

Calder-Ty avatar Sep 01 '25 00:09 Calder-Ty