We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Problem
The following example leads to a panic during runtime:
fn App(cx: Scope) -> Element { let song = Song { artist: "Artist".to_string(), title: "Title".to_string(), }; debug!("{song:?}"); render! { div { Child { song: &song } } } } #[derive(Debug)] struct Song { artist: String, title: String, } #[inline_props] fn Child<'a>(cx: Scope, song: &'a Song) -> Element { let Song { title, .. } = song; render! {"{title}"} }
The error when running dx serve:
dx serve
Dioxus @ v0.1.5 [18:41:54] > Profile : Debug > Hot Reload : Normal > Index Template : Default > URL Rewrite [index_on_404] : False > Build Time Use : 0 millis [WARN] There were 1 warning messages during the build. [DEBUG] dioxus_play - Song { artist: "Artist", title: "Title" } thread 'main' panicked at 'encountered allocation error: Layout { size: 140728548278936, align: 1 (1 << 0) }', /home/rafael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bumpalo-3.13.0/src/alloc.rs:30:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace [ERROR] dioxus_core::any_props - Error while rendering component `Child`: Any { .. }
Steps To Reproduce
I've created a minimal reproduction repo that runs into the error on my machine:
git clone git@github.com:raffomania/dioxus-allocation-error-repro.git cd dioxus-allocation-error-repro dx serve
Expected behavior
I'm expecting the code not to crash, or not to compile if it does something wrong.
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered:
Moving to an explicit prop struct with #[derive(Props)] doesn't fix the error.
#[derive(Props)]
Sorry, something went wrong.
This is the same issue as #1341. #1345 will fix this. Closing as duplicate
No branches or pull requests
Problem
The following example leads to a panic during runtime:
The error when running
dx serve
:Steps To Reproduce
I've created a minimal reproduction repo that runs into the error on my machine:
git clone git@github.com:raffomania/dioxus-allocation-error-repro.git cd dioxus-allocation-error-repro dx serve
Expected behavior
I'm expecting the code not to crash, or not to compile if it does something wrong.
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered: