Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Debug info for panic in FFI #304

Closed
antoyo opened this issue Apr 2, 2018 · 9 comments
Closed

Debug info for panic in FFI #304

antoyo opened this issue Apr 2, 2018 · 9 comments

Comments

@antoyo
Copy link
Member

antoyo commented Apr 2, 2018

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.

@EPashkin
Copy link
Member

EPashkin commented Apr 2, 2018

This not under gir control, see https://github.com/gtk-rs/glib/blob/master/src/source.rs#L75-L85

@antoyo
Copy link
Member Author

antoyo commented Apr 2, 2018

I know this message comes from this code, but perhaps gir could generate code using catch_unwind() or something.
Or perhaps in the code you mentioned we should get the stack trace in the condition using libbacktrace.

@EPashkin
Copy link
Member

EPashkin commented 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
Copy link
Member

EPashkin commented 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
Copy link
Member

EPashkin commented 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
Copy link
Member Author

antoyo commented Apr 2, 2018

Yeah, I see the backtrace on Rust nightly.

@EPashkin
Copy link
Member

EPashkin commented Apr 2, 2018

Thanks for confirming, so we just wait for stable 1.26.0 and remove CallbackGuard again

@sdroege
Copy link
Member

sdroege commented Apr 2, 2018

I mean that unwinding already landed in last stable (second time)

It was not ready for 1.25 unfortunately

@EPashkin
Copy link
Member

EPashkin commented Apr 2, 2018

Then we better wait for stable 1.27.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants