rust_minifb: crash when resizing window
crate version: 0.13.0
Sometimes when I resize, the application crashes, reporting that the buffer size does not match the window size. I tried to test various starting sizes and also various magnitudes, directions, and speeds of resizing and perhaps the speed of resizing matters but I can’t be sure.
This is reproducible in Linux, macOS and Windows using the menu example:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UpdateFailed("Update failed because input buffer is too small. Required size for 1088 x 998 window (2x scale) is 1085824 bytes but the size of the input buffer has the size 921600 bytes")', src\libcore\result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: process didn't exit successfully: `target\release\examples\menu.exe` (exit code: 101)
Interestingly, I also tried this on Linux in a VM and while I can reproduce the crash with a VM having a display size of 1280x1024, I cannot reproduce this when resizing the window within the confines of a display of 1024x768.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
Yes I’ll try to do that in the next few days
Absolutely no worries at all. I appreciate the library. I just wanted a simple bitmap to screen library and behold there it was.
From: Daniel Collin notifications@github.com Sent: Friday, October 18, 2019 2:01:21 PM To: emoon/rust_minifb rust_minifb@noreply.github.com Cc: Alexander Nye alexnye@outlook.com; Author author@noreply.github.com Subject: Re: [emoon/rust_minifb] crash on macOS on window resizing (#94)
Hi. Yeah so I will start looking at these issues soon. I just been busy at doing other things so I haven’t come around to do it. The reason why I haven’t started yet is that I’m going to do some upfront work to prepare the windows backend for GPU support also. This comes in line with #93https://github.com/emoon/rust_minifb/issues/93 as this has been requested in various places and requires work on all backends.
So right now I just haven’t figured out exactly how I want to do all of that work yet.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/emoon/rust_minifb/issues/94?email_source=notifications&email_token=AKAQSR3XJWE4OZAPY6LVD7LQPIP2DA5CNFSM4JCMAW7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBV634Q#issuecomment-543944178, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKAQSR6ZN7XH75OGXXDW7IDQPIP2DANCNFSM4JCMAW7A.