-
Notifications
You must be signed in to change notification settings - Fork 280
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
[BUG] Panic in unsafe fill_rect_fast
#461
Comments
That code does seem very broken:
|
I'm hitting this as well, but only when plotting a line series with a certain number of data points... i.e. purely adding more points to the same exact line "fixes" the issue. |
I'm getting this as well, most of the examples I tried in the docs fail when using bitmap backend. I tried this example in a sample project and always got a panic, no issues when switching to SVG backend. Only fails on nightly (I'm using use plotters::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut backend = BitMapBackend::new("1.png", (300, 200));
backend.draw_rect((50, 50), (200, 150), &RED, true)?;
backend.present()?;
Ok(())
} |
I also trigger this issue when trying to use plotters with slint with nightly toolchain. Anyway this code is broken, because you should use write_unaligned. |
This now occurs on stable v1.70 |
We need a new release. |
I'm having error at |
Describe the bug
When using Rust nightly compiler, attempting to draw a line is likely to cause a panic (depending on color / line coordinates):
The offending line is:
plotters/plotters-bitmap/src/bitmap_pixel/rgb.rs
Line 215 in acf5158
I believe the relevant Nightly change is rust-lang/rust#98112, but this seems to be a plotters bug and not a rustc regression (from my limited understanding).
To Reproduce
Sample project: https://github.com/agersant/plotter-panic
Version Information
Plotters
0.3.4
The text was updated successfully, but these errors were encountered: