#Callstack for fatal errors is just ???

1 messages · Page 1 of 1 (latest)

wise cave
#

My callstacks for any errors look like

thread 19812 panic: integer overflow
???:?:?: 0x7ff6cef213dc in ??? (???)
???:?:?: 0x7ff6cef2269c in ??? (???)
???:?:?: 0x7ff6cef992b5 in ??? (???)
???:?:?: 0x7ff6cef9931b in ??? (???)
???:?:?: 0x7ffcd906257c in ??? (KERNEL32.DLL)
???:?:?: 0x7ffcda90aa77 in ??? (ntdll.dll)

despite having debug as a target. Is that expected?

#

(And yes, the fatal is within my code and reproducible)

wise cave
#

Any ideas?

split thorn
#

thats what you get when debug symbols are borked

#

is the .pdb file there

#

and the pdb file needs to be in the same location as the executable.

wise cave
#

theres a pdb next to the exe

split thorn
#

idk works fine for me.
Make an empty project with zig init-exe in an empty folder and use this as your zig main.

const std = @import("std");

pub fn stacktracer(n: usize) void {
    if (n == 0) @panic("WTF!");
    stacktracer(n - 1);
}

pub fn main() !void {
    stacktracer(20);
}

then run zig build run

wise cave
#

yup getting a stacktrace

#

Hmm, in that specific project, I'm using some external c libs

#

maybe thats the reason?

#

its the only difference I could think of, besides having a custom build.zig

split thorn
#

idk maybe something is borked and debug symbols arent being emitted. I'd double check your work

#

particularly your build stuff

wise cave
#

is there any command to clean all cache files recursively?

#

I've copied over most of my stuff into the test project, yet the stack trace still works

#

oh i found the culprit

#

but this looks like a zig bug