on-internet
← Community

A panic inside a Win32 callback killed my Rust app with no message. How I found it (exit code 0xc0000409)

Stack Overflow ·

I'm building Ruststudio, a free, closed-source IDE for Rust that's written in Rust. This week a bug taught me something about panics, so I'm sharing it. Symptom: clicking "New Project" closed the whole app instantly. There was no error dialog, no console output and no panic message. The process exit code was 0xc0000409. Why it was silent: the UI is a native Win32 + Direct2D shell, and my code runs inside window-procedure callbacks. A panic can't unwind across that extern "system" boundary, so Rust aborts the process. Windows reports that abort as 0xc0000409, and the panic message never reaches

Comments

Sign in or sign up to comment and upvote.

No comments yet.