You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using mismatching versions of the image and the glium_graphics crate (i.e. glium_graphics depends on an older version of image than we do), the following code causes an ICE. The ICE goes away when using a matching version of image.
While reducing the example, the len and index changed, but the difference of two stayed the same.
extern crate image;
extern crate glium_graphics;
use glium_graphics::{Glium2d, GliumGraphics, GliumWindow, GlyphCache, Texture, TextureSettings};
use image::{RgbImage, ConvertBuffer};
fn run() {
let mut imgbuf = RgbImage::new(100, 100);
let texture = Texture::from_image(&mut glium_window,
&imgbuf.convert(),
&TextureSettings::new());
}
This causes an ICE:
Compiling somethinggoingwrong v0.1.0 (file:///home/vagrant/rust-ice)
src/main.rs:10:44: 10:56 error: unresolved name `glium_window` [E0425]
src/main.rs:10 let texture = Texture::from_image(&mut glium_window,
^~~~~~~~~~~~
src/main.rs:10:44: 10:56 help: run `rustc --explain E0425` to see a detailed explanation
error: main function not found
src/main.rs:11:39: 11:56 error: mismatched types:
expected `&image::buffer::ImageBuffer<image::color::Rgba<u8>, collections::vec::Vec<u8>>`,
found `&image::buffer::ImageBuffer<_, collections::vec::Vec<_>>`
(expected struct `image::buffer::ImageBuffer`,
found a different struct `image::buffer::ImageBuffer`) [E0308]
src/main.rs:11 &imgbuf.convert(),
^~~~~~~~~~~~~~~~~
src/main.rs:11:39: 11:56 help: run `rustc --explain E0308` to see a detailed explanation
src/main.rs:11:39: 11:56 note: Perhaps two different versions of crate `image` are being used?
src/main.rs:11 &imgbuf.convert(),
^~~~~~~~~~~~~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'index out of bounds: the len is 38 but the index is 40', ../src/libcollections/vec.rs:1178
When using mismatching versions of the image and the glium_graphics crate (i.e. glium_graphics depends on an older version of image than we do), the following code causes an ICE. The ICE goes away when using a matching version of image.
While reducing the example, the len and index changed, but the difference of two stayed the same.
An example project can be found here: https://github.com/Moredread/rust-ice
I tried this code:
This causes an ICE:
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: