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

Panic on tilling window manager #105

Closed
FloVanGH opened this issue Nov 25, 2019 · 15 comments
Closed

Panic on tilling window manager #105

FloVanGH opened this issue Nov 25, 2019 · 15 comments
Assignees
Labels

Comments

@FloVanGH
Copy link
Contributor

Some users of OrbTk reported a crash of the examples on tilling window mangers: https://gitlab.redox-os.org/redox-os/orbtk/issues/195#note_18953

@emoon
Copy link
Owner

emoon commented Nov 28, 2019

Thanks for the report. I will take a look next week

@emoon emoon self-assigned this Nov 28, 2019
@emoon emoon added the bug label Nov 28, 2019
@emoon
Copy link
Owner

emoon commented Dec 2, 2019

I tried this on Linux and i3 window manager (noise example) and I'm not able to reproduce the crash panic. Is there some more info on this what is required for this to fail?

@edge90
Copy link

edge90 commented Dec 3, 2019

The crash occurred on a normal gnome desktop as well. Looked like it was the resize event that caused it. My tiling wm (sway) created a small window then resized it to be larger than some buffer.

@emoon
Copy link
Owner

emoon commented Dec 3, 2019

And does this happen on a specific example in minifb as well? (like the noise one)

@stevensonmt
Copy link

stevensonmt commented Dec 4, 2019

>> cargo run --example multi --release
warning: unused manifest key: package.maintenance
    Finished release [optimized] target(s) in 0.09s
     Running `target/release/examples/multi`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UpdateFailed("Update failed because input buffer is too small. Required size for 661 x 348 window (1x scale) is 920112 bytes but the size of the input buffer has the size 819200 bytes")', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

WM: leftwm 0.1.10
minifb: 0.13

Of note, the noise and mouse examples work fine. The menu and title_cursor examples do not give the same panic but I also suspect they do not render correctly:
menu:
Screenshot_2019-12-03
title_cursor:
Screenshot_2019-12-03_21-12-35

@emoon
Copy link
Owner

emoon commented Dec 4, 2019

Cool. Thanks for the report. I'm going to work on this today

@emoon
Copy link
Owner

emoon commented Dec 4, 2019

So update on this and how I will fix it is in #113

@FloVanGH
Copy link
Contributor Author

FloVanGH commented Dec 5, 2019

Thank you, it works now if I ignore the the result error of update_with_buffer_size. It's the same error message as before. And during the resize you could see sometimes the same visual effect, almost by downsize.

@emoon
Copy link
Owner

emoon commented Dec 6, 2019

Cool. Yeah I'm currently working on fixing all of the resizing issues. I will add some extra options to WindowOpts that allow you to set how the resizing should work (as it's different depending on your application)

@emoon
Copy link
Owner

emoon commented Dec 7, 2019

@stevensonmt hey, if you have the possibility of grabbing the latest minifb, switch over to dev branch and try this again that would be awesome. I hope it should all be fixed now.

@stevensonmt
Copy link

@emoon,
Can confirm fixed on dev branch. Thanks for your work on this!

@emoon
Copy link
Owner

emoon commented Dec 7, 2019

Awesome! Thanks for checking :)

@FloVanGH
Copy link
Contributor Author

FloVanGH commented Dec 7, 2019

@emoon I can confirm that to. Thank you :-)

@emoon
Copy link
Owner

emoon commented Dec 7, 2019

Thanks! Moving over to doing mac fixes now

@emoon
Copy link
Owner

emoon commented Dec 16, 2019

Closing this now as 0.15 has been released with the fixes for this

@emoon emoon closed this as completed Dec 16, 2019
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

4 participants