This code caused Segmentation fault
error. Can anyone help me fix it?
struct State:
var number: UInt256
var map1: Dict[Int, UInt256]
var map2: Dict[Int, UInt256]
var map3: Dict[Int, UInt256]
fn __init__(out self, owned number: UInt256, map1: Dict[Int, UInt256], map2: Dict[Int, UInt256], map3: Dict[Int, UInt256]):
self.number = number
self.map1 = map1
self.map2 = map2
self.map3 = map3
fn __copyinit__(out self, existing: Self):
self.number = existing.number
self.map1 = existing.map1
self.map2 = existing.map2
self.map3 = existing.map3
fn __moveinit__(out self, owned existing: Self):
self.number = existing.number
self.map1 = existing.map1
self.map2 = existing.map2
self.map3 = existing.map3
fn main() raises:
var pool_states = Dict[String, State]()
for i in range(100):
print(i)
pool_states[String(i)] = State(0, Dict[Int, UInt256](), Dict[Int, UInt256](), Dict[Int, UInt256]())
0
1
Please submit a bug report to https://github.com/modular/modular/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0. Program arguments: mojo life.mojo
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 mojo 0x00005615af94c65b
1 mojo 0x00005615af94a3f9
2 mojo 0x00005615af94cd0a
3 libc.so.6 0x00007faaaee67070
4 libc.so.6 0x00007faaaeec0334
5 libc.so.6 0x00007faaaee66fbe gsignal + 30
6 libAsyncRTMojoBindings.so 0x00007faab0fb1542
7 libc.so.6 0x00007faaaee67070
8 (error) 0x00007fa9b8003c6d
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)