This repository was archived by the owner on Jun 8, 2021. It is now read-only.
This repository was archived by the owner on Jun 8, 2021. It is now read-only.
Debug info for panic in FFI #304
Closed
Description
Hi.
I had a lot of trouble to debug this issue, so instead of just having "Uncaught panic, exiting", it would be nice to have more info maybe the stack trace, to be able to debug.
Thanks.
Activity
EPashkin commentedon Apr 2, 2018
This not under gir control, see https://github.com/gtk-rs/glib/blob/master/src/source.rs#L75-L85
antoyo commentedon Apr 2, 2018
I know this message comes from this code, but perhaps
gir
could generate code usingcatch_unwind()
or something.Or perhaps in the code you mentioned we should get the stack trace in the condition using libbacktrace.
EPashkin commentedon Apr 2, 2018
Need of
CallbackGuard
will be removed in 1-2 rust stable release,as rust will be do it yourself, then I hope
RUST_BACKTRACE
will works as usual.See end of #250.
EPashkin commentedon Apr 2, 2018
@antoyo As you have panic test case, can you check that panic will be caught without this line https://github.com/gtk-rs/gio/blob/master/src/auto/socket_listener.rs#L99 and that
RUST_BACKTRACE=1
works as usual ?EPashkin commentedon Apr 2, 2018
I mean that unwinding already landed in last stable (second time), we just waiting to be sure that it will be not reverted again.
antoyo commentedon Apr 2, 2018
Yeah, I see the backtrace on Rust nightly.
EPashkin commentedon Apr 2, 2018
Thanks for confirming, so we just wait for stable 1.26.0 and remove
CallbackGuard
againsdroege commentedon Apr 2, 2018
It was not ready for 1.25 unfortunately
EPashkin commentedon Apr 2, 2018
Then we better wait for stable 1.27.0