citybound / citybound

A work-in-progress, open-source, multi-player city simulation game.
http://cityboundsim.com
GNU Affero General Public License v3.0
7.75k stars 331 forks source link

CDict/COption compact bug (originally Capacity overflow when I inspect a Mill) #355

Open platy opened 5 years ago

platy commented 5 years ago

My first game on OSX, I have 3 Mills, each time i try to inspect 2 of them the UI crashes, I can inspect other buildings just fine.

Citybound version: v0.1.2-790-g7c076e3
Error: Rust WASM error: panicked at 'capacity overflow', src/liballoc/raw_vec.rs:746:5
Module.STDWEB_PRIVATE.to_js($1);Module.STDWEB_PRIVATE.from_js($0, in ../target/wasm32-unknown-unknown/release/cb_browser_ui.js 649:105
Module.STDWEB_PRIVATE.to_js($1);Module.STDWEB_PRIVATE.from_js($0, in ../target/wasm32-unknown-unknown/release/cb_browser_ui.js 649:87
cb_browser_ui::start::{{closure}}::h08b80e816b36cebe in /cb_browser_ui.wasm:wasm-function[428]:0x2ad3c undefined:undefined
std::panicking::rust_panic_with_hook::h6fb67c21cd72d854 in /cb_browser_ui.wasm:wasm-function[5628]:0x2dd76f undefined:undefined
std::panicking::continue_panic_fmt::h42680f75ce493543 in /cb_browser_ui.wasm:wasm-function[5627]:0x2dd65f undefined:undefined
rust_begin_unwind in /cb_browser_ui.wasm:wasm-function[5626]:0x2dd5e3 undefined:undefined
core::panicking::panic_fmt::h7748294af4ef73b0 in /cb_browser_ui.wasm:wasm-function[5677]:0x2e3c63 undefined:undefined
core::panicking::panic::h0117aa8687036f96 in /cb_browser_ui.wasm:wasm-function[5671]:0x2e2155 undefined:undefined
alloc::raw_vec::capacity_overflow::h5060132ba3158cee in /cb_browser_ui.wasm:wasm-function[5658]:0x2df86d undefined:undefined
alloc::raw_vec::RawVec::allocate_in::{{closure}}::h09b9b185a5b31a08 in /cb_browser_ui.wasm:wasm-function[5422]:0x2d1dcb undefined:undefined
<&mut stdweb::ecosystem::serde::Serializer as serde::ser::Serializer>::serialize_seq::h17b8a9f9f70ffaaf in /cb_browser_ui.wasm:wasm-function[5407]:0x2d1674 undefined:undefined
as serde::ser::Serialize>::serialize::h669f4c573b5a6fff in /cb_browser_ui.wasm:wasm-function[620]:0x5b896 undefined:undefined
::serialize_field::h0246e919c2f68c60 in /cb_browser_ui.wasm:wasm-function[740]:0x7a1d4 undefined:undefined
cb_simulation::economy::resources::_IMPL_SERIALIZE_FOR_ResourceMap::>::serialize::h4c43c065846e9bd6 in /cb_browser_ui.wasm:wasm-function[387]:0x25f76 undefined:undefined
::serialize_field::hb674e60262d44c24 in /cb_browser_ui.wasm:wasm-function[777]:0x7f86a undefined:undefined
cb_simulation::economy::market::_IMPL_SERIALIZE_FOR_Deal::::serialize::h879a861ff266d6b7 in /cb_browser_ui.wasm:wasm-function[837]:0x978b7 undefined:undefined
::serialize_field::ha18aa80da6904ef7 in /cb_browser_ui.wasm:wasm-function[772]:0x7ed0e undefined:undefined
cb_simulation::economy::market::_IMPL_SERIALIZE_FOR_EvaluatedDeal::::serialize::h2db8846b48300714 in /cb_browser_ui.wasm:wasm-function[838]:0x97a76 undefined:undefined
::serialize_field::h1339058e2cf86be8 in /cb_browser_ui.wasm:wasm-function[745]:0x7ad73 undefined:undefined
cb_simulation::economy::households::_IMPL_SERIALIZE_FOR_DecisionResourceEntry::::serialize::hc90625c33b9ed08e in /cb_browser_ui.wasm:wasm-function[459]:0x36123 undefined:undefined
serde::ser::SerializeMap::serialize_entry::had13cc2f43713f69 in /cb_browser_ui.wasm:wasm-function[709]:0x73d61 undefined:undefined
as serde::ser::Serialize>::serialize::ha3a627f4e61e2b39 in /cb_browser_ui.wasm:wasm-function[504]:0x415b3 undefined:undefined
::serialize_field::ha7f130625f4d40b7 in /cb_browser_ui.wasm:wasm-function[695]:0x70312 undefined:undefined
cb_simulation::economy::households::_IMPL_SERIALIZE_FOR_DecisionState::::serialize::h3f39b0d40ff4f86f in /cb_browser_ui.wasm:wasm-function[457]:0x35b02 undefined:undefined
::serialize_field::h974fb8259e904fce in /cb_browser_ui.wasm:wasm-function[769]:0x7e63f undefined:undefined
cb_simulation::economy::households::_IMPL_SERIALIZE_FOR_HouseholdCore::::serialize::h106fa618db8bb4a8 in /cb_browser_ui.wasm:wasm-function[458]:0x35e0b undefined:undefined
::on_household_ui_info::h6393662f8ac428ea in /cb_browser_ui.wasm:wasm-function[416]:0x27ec7 undefined:undefined
kay::class::Class::add_handler::{{closure}}::h997c4e87bba8d2b4 in /cb_browser_ui.wasm:wasm-function[252]:0x1835c undefined:undefined
kay::class::instance_store::InstanceStore::receive_instance::h12c7e46f1c1fcc49 in /cb_browser_ui.wasm:wasm-function[5272]:0x2c7428 undefined:undefined
kay::class::Class::handle_messages::h4fbf888ff4db8968 in /cb_browser_ui.wasm:wasm-function[5266]:0x2c6e53 undefined:undefined
std::panicking::try::do_call::h47f0827636f9caa1 in /cb_browser_ui.wasm:wasm-function[5250]:0x2c5521 undefined:undefined
__rust_maybe_catch_panic in /cb_browser_ui.wasm:wasm-function[5637]:0x2ddae9 undefined:undefined
kay::actor_system::ActorSystem::process_all_messages::hf115c180b28f0a4a in /cb_browser_ui.wasm:wasm-function[5213]:0x2c009d undefined:undefined
cb_browser_ui::MainLoop::frame::h5832e8bf110dc1d2 in /cb_browser_ui.wasm:wasm-function[439]:0x2dbc8 undefined:undefined
> as stdweb::webcore::serialization::FuncallAdapter>::funcall_adapter::h1d8f7623273e2d71 in /cb_browser_ui.wasm:wasm-function[475]:0x3f181 undefined:undefined
dyncall in ../target/wasm32-unknown-unknown/release/cb_browser_ui.js 425:39
output in ../target/wasm32-unknown-unknown/release/cb_browser_ui.js 182:34
aeplay commented 5 years ago

Thanks for the detailed report! There will be a workaround in the next live build, but this bug lead me to a pretty scary low-level bug, which I would have really confused me at some point later 👍

aeplay commented 5 years ago

I'll keep this bug open and rename it as a reminder for the low level bug

platy commented 5 years ago

Thanks, I'll try it out again soon!