Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent panic in rust builder scope tests #811

Open
bilelmoussaoui opened this issue Jan 13, 2022 · 3 comments
Open

Silent panic in rust builder scope tests #811

bilelmoussaoui opened this issue Jan 13, 2022 · 3 comments
Labels

Comments

@bilelmoussaoui
Copy link
Member

test builder_rust_scope::tests::test_rust_builder_scope_closure ... okthread '<unnamed>' panicked at 'Closure returned a value of type guint64 but caller expected gchararray', C:\Users\runneradmin\.cargo\git\checkouts\gtk-rs-core-7be42ca38bd6361c\2ab14f6\glib\src\closure.rs:239:25

check the CI.

cc @jf2048

@bilelmoussaoui bilelmoussaoui added this to the 0.4 milestone Jan 13, 2022
@jf2048
Copy link
Member

jf2048 commented Feb 18, 2022

This is an expected failure:

expected = "Closure returned a value of type guint64 but caller expected gchararray"

The problem here is that output is not being captured because this is a glib thread, it would probably be hidden if test_synced used a rust thread. Actually we can't capture output because rust's output capturing only works with threads spawned inside the test

@jf2048
Copy link
Member

jf2048 commented Feb 18, 2022

Relevant crate? https://crates.io/crates/gag

@jf2048
Copy link
Member

jf2048 commented Feb 25, 2022

This also could be an option if custom test frameworks are stabilized: rust-lang/rust#50297 (comment)

That would also save us any issues where things like g_warning and other C libraries produce output. But we probably should be using glib::log_set_handler in any case.

@bilelmoussaoui bilelmoussaoui removed this from the 0.4 milestone Oct 8, 2022
bilelmoussaoui added a commit that referenced this issue Jul 10, 2024
Until is #811 resolved
as it fails for nightly now
bilelmoussaoui added a commit that referenced this issue Jul 10, 2024
Until is #811 resolved
as it fails for nightly now
bilelmoussaoui added a commit that referenced this issue Jul 10, 2024
Until is #811 resolved
as it fails for nightly now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants