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

assertion left == right failed #125656

Open
vladenysiuk opened this issue May 28, 2024 · 2 comments
Open

assertion left == right failed #125656

vladenysiuk opened this issue May 28, 2024 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@vladenysiuk
Copy link

vladenysiuk commented May 28, 2024

Code

use std::fs::{self, DirEntry};
use image::{DynamicImage, GenericImageView};
use imageproc::drawing::draw_line_segment_mut;
use serde::{de, Deserialize, Serialize};
use std::fs::File;
use std::io::BufReader;
use std::io::Write;
use colors_transform::{AlphaColor, Color, Hsl, Rgb};

#[derive(Serialize, Deserialize)]
struct Flags{}
#[derive(Serialize, Deserialize)]
#[allow(non_snake_case)]
struct PolygonWrapper{
    label: String,
    points: Vec<(f64,f64)>,
    group_id: u32,
    shape_type: String,
    flags: Flags,
}
struct Polygon{
    points: Vec<(f64,f64)>,
    height: u32,
}
fn area(points:&Vec<(f64,f64)>) -> f64{
    let mut area:f64 = 0.0;
    let len = points.len();
    for i in 0..len{
        area += (points[(i+1)%len].0-points[i].0)*(points[(i+1)%len].1+points[i].1);
    }
    area /= 2.0;
    return area;
}
impl Polygon{
    fn in_polygon(&self,x:(f64,f64)) -> bool{
        let eps = 0.0001;
        let mut seg_area:f64 = 0.0;
        let len = self.points.len();
        for i in 0..len{
            seg_area += area(&Vec::from([
                x,
                self.points[i],
                self.points[(i+1)%len]
            ])).abs();
        }
        let polygon_area = area(&self.points);
        return (polygon_area-seg_area).abs()<eps;
    }
}
#[derive(Serialize, Deserialize)]
#[allow(non_snake_case)]
struct ShapeWrapper{
    version: String,
    flags: Flags,
    shapes: Vec<PolygonWrapper>,
    imagePath: String,
    imageData: Option<String>,
    imageHeight: u32,
    imageWidth: u32,
}
fn write_json(shape:&ShapeWrapper,file_name:&str){
    let json_data = serde_json::to_string(shape).unwrap();
    // ./image_classification/
    // ./mlc_training_data/images/
    let file_path = "./image_classification/".to_owned()+&file_name+&".json".to_owned();
    let mut f = File::create(file_path).unwrap();
    f.write_all(json_data.as_bytes()).unwrap();
}
fn write_image(image:&image::ImageBuffer<image::Rgba<u8>, Vec<u8>>,file_name:&str){
    image.save("./processed_images/".to_owned()+&file_name+&".png".to_owned()).expect("Failed to save image");
}
fn annotate_image(image:&mut image::ImageBuffer<image::Rgba<u8>, Vec<u8>>, annotation:ShapeWrapper){
    for shape in &annotation.shapes{
        if shape.group_id<10{
            continue;
        }
        let len = shape.points.len();
        for i in 0..len{
            let p1 = &shape.points[i];
            let p2 = &shape.points[(i+1)%len];
            draw_line_segment_mut(
                image,
                (p1.0 as f32, p1.1 as f32),
                (p2.0 as f32, p2.1 as f32),
                image::Rgba([69u8, 203u8, 133u8,100])
            )
        }
    }
}
fn wrap_shape(shapes:Vec<PolygonWrapper>,image_path:String, height: u32, width: u32) -> ShapeWrapper{
    return ShapeWrapper{
        version: "5.0.1".to_string(),
        flags: Flags{},
        shapes: shapes,
        imagePath: image_path,
        imageData: None,
        imageHeight: height,
        imageWidth: width
    };
}
fn wrap_polygon(polygon:Polygon) -> PolygonWrapper{
    return PolygonWrapper{
        label: "building".to_string(),
        points: polygon.points,
        group_id: polygon.height,
        shape_type: "polygon".to_string(),
        flags: Flags{}
    };
}
fn check_turn(p1:(i32,i32),p2:(i32,i32),p3:(i32,i32)) -> bool{
    let area= (p2.0-p1.0)*(p2.1+p1.1)+ (p3.0-p2.0)*(p3.1+p2.1) + (p1.0-p3.0)*(p1.1+p3.1);
    return area>0;
}

fn process_image(path:&DirEntry){
    let DEFAULT_HEIGHT = 9;
    let image_path = path.file_name().into_string().unwrap();
    let image_name = &image_path[0..(image_path.len()-4)];

    let mut image: image::ImageBuffer<image::Rgba<u8>, Vec<u8>> = image::open(path.path()).unwrap().to_rgba8();
    let (width,height) = image.dimensions(); 
    for (x,y,pixel) in image.enumerate_pixels_mut(){
        let alpha = pixel[3];
        let mut rgb_pixel = Rgb::from(pixel[0] as f32,pixel[1] as f32,pixel[2] as f32);
        let hsl_pixel = rgb_pixel.to_hsl();
        hsl_pixel.set_saturation(100.0);
        hsl_pixel.set_lightness(50.0);
        let hue = hsl_pixel.get_hue();
        let pure_rgb = hsl_pixel.to_rgb();
        *pixel = image::Rgba([pure_rgb.get_red() as u8, pure_rgb.get_blue() as u8, pure_rgb.get_green() as u8, alpha]);
    }
    let file_path = "./mlc_training_data/ground_truth_files/".to_owned()+&image_name+&".json".to_owned();
    // Open the file
    let file = File::open(file_path).expect("Failed to open file");
    let reader = BufReader::new(file);

    // annotate image
    let annotation: ShapeWrapper = serde_json::from_reader(reader).expect("Failed to parse JSON");
    annotate_image(&mut image, annotation);

    // show image
    write_image(&image, image_name);

}
fn main() {
    let paths = fs::read_dir("./mlc_training_data/images").unwrap();
    let mut limit = 10;
    for path in paths{
        process_image(&path.unwrap());
        limit -= 1;
        if limit==0{
            break;
        }
    }
}

Meta

rustc --version --verbose:

rustc 1.78.0 (9b00956e5 2024-04-29) running on aarch64-apple-darwin

Error output

error: could not compile `grrs` (bin "grrs"); 3 warnings emitted
Backtrace

stack backtrace:
   0:        0x10576eedc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h01b2beffade888b2
   1:        0x1057b2e44 - core::fmt::write::hbadb443a71b75f23
   2:        0x105765530 - std::io::Write::write_fmt::hc09d7755e3ead5f0
   3:        0x10576ed34 - std::sys_common::backtrace::print::h28349e5c25acbac7
   4:        0x105771640 - std::panicking::default_hook::{{closure}}::hd24b6196784d991e
   5:        0x105771324 - std::panicking::default_hook::hfcec80a2720c8c73
   6:        0x10ea7130c - <alloc[ccf9bc335c0c6a37]::boxed::Box<rustc_driver_impl[e71547a46cb79a13]::install_ice_hook::{closure#0}> as core[f61c09f58d048be3]::ops::function::Fn<(&dyn for<'a, 'b> core[f61c09f58d048be3]::ops::function::Fn<(&'a core[f61c09f58d048be3]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[f61c09f58d048be3]::marker::Send + core[f61c09f58d048be3]::marker::Sync, &core[f61c09f58d048be3]::panic::panic_info::PanicInfo)>>::call
   7:        0x105772074 - std::panicking::rust_panic_with_hook::h84760468187ddc85
   8:        0x105771a38 - std::panicking::begin_panic_handler::{{closure}}::he666a5eb600a7203
   9:        0x10576f360 - std::sys_common::backtrace::__rust_end_short_backtrace::h592f44d2bf9f843f
  10:        0x1057717b0 - _rust_begin_unwind
  11:        0x1057cc07c - core::panicking::panic_fmt::h98bbf7bdf4994454
  12:        0x1057cc430 - core::panicking::assert_failed_inner::hf761943632c466c1
  13:        0x112b44ca4 - core[f61c09f58d048be3]::panicking::assert_failed::<u64, u64>
  14:        0x10fd42be8 - <rustc_middle[7d6fe3bd18d758b7]::query::on_disk_cache::OnDiskCache>::load_indexed::<&[(rustc_middle[7d6fe3bd18d758b7]::ty::predicate::Clause, rustc_span[8def9120bc3fdd6f]::span_encoding::Span)]>
  15:        0x10fc36ab0 - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::try_load_from_disk::<&[(rustc_middle[7d6fe3bd18d758b7]::ty::predicate::Clause, rustc_span[8def9120bc3fdd6f]::span_encoding::Span)]>
  16:        0x10fc7d094 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::inferred_outlives_of::dynamic_query::{closure#6} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, &rustc_span[8def9120bc3fdd6f]::def_id::DefId, rustc_query_system[4a271ab9f88cfcb9]::dep_graph::serialized::SerializedDepNodeIndex, rustc_query_system[4a271ab9f88cfcb9]::dep_graph::graph::DepNodeIndex)>>::call_once
  17:        0x10fb95bc0 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  18:        0x10fd11ee0 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::inferred_outlives_of::get_query_incr::__rust_end_short_backtrace
  19:        0x10ed2c938 - rustc_middle[7d6fe3bd18d758b7]::query::plumbing::query_get_at::<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 16usize]>>>
  20:        0x10ed4d01c - rustc_hir_analysis[6db5166d8a63cd5b]::collect::predicates_defined_on
  21:        0x10fc3a03c - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_defined_on::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>
  22:        0x10fc7d7b0 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_defined_on::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, rustc_span[8def9120bc3fdd6f]::def_id::DefId)>>::call_once
  23:        0x10fb980c4 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  24:        0x10fd11624 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_defined_on::get_query_incr::__rust_end_short_backtrace
  25:        0x10eca822c - rustc_middle[7d6fe3bd18d758b7]::query::plumbing::query_get_at::<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>>
  26:        0x10ecaf938 - rustc_hir_analysis[6db5166d8a63cd5b]::collect::predicates_of::predicates_of
  27:        0x10fc37838 - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>
  28:        0x10fc79a88 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_of::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, rustc_span[8def9120bc3fdd6f]::def_id::DefId)>>::call_once
  29:        0x10fb980c4 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  30:        0x10fd0c388 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::predicates_of::get_query_incr::__rust_end_short_backtrace
  31:        0x11036d31c - rustc_middle[7d6fe3bd18d758b7]::query::plumbing::query_get_at::<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 24usize]>>>
  32:        0x1103742d0 - rustc_ty_utils[f19cb48a3acb1426]::ty::param_env
  33:        0x10fc3c1fc - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::param_env::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 8usize]>>
  34:        0x10fc80ef0 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::param_env::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, rustc_span[8def9120bc3fdd6f]::def_id::DefId)>>::call_once
  35:        0x10fb9ea50 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefIdCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  36:        0x10fd22af0 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::param_env::get_query_incr::__rust_end_short_backtrace
  37:        0x10ed0e588 - rustc_hir_analysis[6db5166d8a63cd5b]::check::wfcheck::check_item_fn
  38:        0x10ed095e0 - rustc_hir_analysis[6db5166d8a63cd5b]::check::wfcheck::check_well_formed
  39:        0x10fc38d68 - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>
  40:        0x10fd5f8a0 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_well_formed::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, rustc_hir[6794cf9dde2b2a42]::hir_id::OwnerId)>>::call_once
  41:        0x10fbe305c - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::VecCache<rustc_hir[6794cf9dde2b2a42]::hir_id::OwnerId, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  42:        0x10fd277e4 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
  43:        0x10ed50b2c - std[73ec08d302f978e7]::panicking::try::<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, core[f61c09f58d048be3]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff694425d12ac56b]::sync::parallel::disabled::try_par_for_each_in<&[rustc_hir[6794cf9dde2b2a42]::hir::ImplItemId], rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed, <rustc_middle[7d6fe3bd18d758b7]::hir::ModuleItems>::par_impl_items<rustc_hir_analysis[6db5166d8a63cd5b]::check::wfcheck::check_mod_type_wf::{closure#1}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>>
  44:        0x10ed19444 - <rustc_data_structures[ff694425d12ac56b]::sync::parallel::ParallelGuard>::run::<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_data_structures[ff694425d12ac56b]::sync::parallel::disabled::try_par_for_each_in<&[rustc_hir[6794cf9dde2b2a42]::hir::ItemId], rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed, <rustc_middle[7d6fe3bd18d758b7]::hir::ModuleItems>::par_items<rustc_hir_analysis[6db5166d8a63cd5b]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>
  45:        0x10ed11530 - rustc_hir_analysis[6db5166d8a63cd5b]::check::wfcheck::check_mod_type_wf
  46:        0x10fc38d44 - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>
  47:        0x10fd05830 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, rustc_span[8def9120bc3fdd6f]::def_id::LocalModDefId)>>::call_once
  48:        0x10fbc54b4 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::DefaultCache<rustc_span[8def9120bc3fdd6f]::def_id::LocalModDefId, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  49:        0x10fd19570 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  50:        0x10ed50d04 - std[73ec08d302f978e7]::panicking::try::<(), core[f61c09f58d048be3]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[ff694425d12ac56b]::sync::parallel::disabled::par_for_each_in<&[rustc_hir[6794cf9dde2b2a42]::hir_id::OwnerId], <rustc_middle[7d6fe3bd18d758b7]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[6db5166d8a63cd5b]::check_crate::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>>
  51:        0x10ed19618 - <rustc_data_structures[ff694425d12ac56b]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[ff694425d12ac56b]::sync::parallel::disabled::par_for_each_in<&[rustc_hir[6794cf9dde2b2a42]::hir_id::OwnerId], <rustc_middle[7d6fe3bd18d758b7]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[6db5166d8a63cd5b]::check_crate::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>
  52:        0x10ed4df74 - <rustc_session[79a27a126569eded]::session::Session>::time::<(), rustc_hir_analysis[6db5166d8a63cd5b]::check_crate::{closure#1}>
  53:        0x10ecd68d8 - rustc_hir_analysis[6db5166d8a63cd5b]::check_crate
  54:        0x10f1814e0 - rustc_interface[2352a4bab4f6367d]::passes::analysis
  55:        0x10fc3bdac - rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>
  56:        0x10fcf47d0 - <rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::analysis::dynamic_query::{closure#2} as core[f61c09f58d048be3]::ops::function::FnOnce<(rustc_middle[7d6fe3bd18d758b7]::ty::context::TyCtxt, ())>>::call_once
  57:        0x10fba46f8 - rustc_query_system[4a271ab9f88cfcb9]::query::plumbing::try_execute_query::<rustc_query_impl[cc9fd01c5e6afd2e]::DynamicConfig<rustc_query_system[4a271ab9f88cfcb9]::query::caches::SingleCache<rustc_middle[7d6fe3bd18d758b7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[cc9fd01c5e6afd2e]::plumbing::QueryCtxt, true>
  58:        0x10fd0bbc4 - rustc_query_impl[cc9fd01c5e6afd2e]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  59:        0x10ea349f0 - <rustc_middle[7d6fe3bd18d758b7]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}::{closure#1}::{closure#3}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>
  60:        0x10ea33c18 - <rustc_interface[2352a4bab4f6367d]::interface::Compiler>::enter::<rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}::{closure#1}, core[f61c09f58d048be3]::result::Result<core[f61c09f58d048be3]::option::Option<rustc_interface[2352a4bab4f6367d]::queries::Linker>, rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>
  61:        0x10ea1fe80 - rustc_span[8def9120bc3fdd6f]::create_session_globals_then::<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}>
  62:        0x10ea3182c - std[73ec08d302f978e7]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[2352a4bab4f6367d]::util::run_in_thread_with_globals<rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>
  63:        0x10ea28230 - <<std[73ec08d302f978e7]::thread::Builder>::spawn_unchecked_<rustc_interface[2352a4bab4f6367d]::util::run_in_thread_with_globals<rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#1} as core[f61c09f58d048be3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:        0x10577a5a8 - std::sys::pal::unix::thread::Thread::new::thread_start::h9266fbbdd0c3d8be
  65:        0x18bb31034 - __pthread_joiner_wake

error: the compiler unexpectedly panicked. this is a bug.```

</p>
</details>
@vladenysiuk vladenysiuk added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 28, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 28, 2024
@jieyouxu jieyouxu added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 4, 2024
@pacak
Copy link
Contributor

pacak commented Jun 14, 2024

Compiles fine on linux with 1.79 and most recent versions of dependencies and because some dependencies already updated - fails to compile with 1.78

  14:        0x10fd42be8 - <rustc_middle[7d6fe3bd18d758b7]::query::on_disk_cache::OnDiskCache>::load_indexed::<&[(rustc_middle[7d6fe3bd18d758b7]::ty::predicate::Clause, rustc_span[8def9120bc3fdd6f]::span_encoding::Span)]>

This suggests that rustc tries to load something from the incremental compilation cache. Is the panic fixed by cargo clean? If so - do you remember what you did right before it panicked?

@vladenysiuk
Copy link
Author

From what I remember - I installed crate colors_transform, and then it stopped compiling and started producing an error of this kind. Pretty sure that I haven't done cargo clean back than.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants