-
Notifications
You must be signed in to change notification settings - Fork 23
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
Iced
sample code keeps crashing at every lib
reload
#25
Comments
Hi, thanks or the report. I tested it on macos initially and can confirm that it still works there. I'll give it a try with Linux. |
Yeah on Ubuntu I get a crash, too. Seems that the issue is in |
Sorry, didn't get enough time to fix this. Happy to accept contributions. Not quite sure why this works in macos but not under Windows/Linux. The issue manifests as a segmentation fault when dealing with the root and overlay For now I'll add a note to the example and maybe someone with deeper knowledge of iced than me can look at this?! |
Hi, I investigated this a bit. Here is what happens:
Potential solutions:
// e.g. add this in the view method in the dynamic lib
thread_local! {
static KEEP_LOADED: Box<u8> = Box::new(0);
}
KEEP_LOADED.with(|_| {}); // initialize
(note: this is all on the iced version used above ( (edit: I would guess that there might already be something preventing the lib from being unloaded on macos, but I can't test that myself) |
Thanks! Gonna take a look at this soon. |
I've been experimenting with the following
Iced
sample code, but it keeps crashing at everylib
reload. I can't figure out if I'm mistaking something or if it's due to ahot-lib-reloader-rs
' issue, can you please help me out?I tested the attached code both on Windows 10 and Arch Linux, with
rustc
version1.65.0
and1.67.0-nightly
, and I attempted also usingcargo run --features iced/glow
with no luck.bin
lib
The text was updated successfully, but these errors were encountered: