Open
Description
From #2597 (comment)
I think this happens due to Table::allocate
increasing the column length before the data is actually written.
I also have a test for this, based on #2848
#[test]
fn panic_in_despawn_followed_by_insert() {
let helper = DropTestHelper::new();
let res = panic::catch_unwind(|| {
let mut world = World::new();
let e1 = world.spawn(helper.make_component(true, 0)).id();
let _ = panic::catch_unwind(panic::AssertUnwindSafe(|| {
world.despawn(e1);
}));
world.spawn(helper.make_component(true, 1));
println!("Done inserting! Dropping world...");
});
let drop_log = helper.finish(res);
assert_eq!(
&*drop_log,
[
DropLogItem::Create(0),
DropLogItem::Drop(0),
DropLogItem::Create(1),
DropLogItem::Drop(1)
]
);
}
Activity