When program is started, its breaks in v2_BACKEND.mojo in somewhere in line 392. As far as i understand, i think that it is due to something wrong with "possible_connections" list, in 'calculate_random_connections_create' method, in 'Graph' structure.
I tried to copy that list, and do other stuff, but program always breaks when im trying to get elements from that list (note that, it is breaking after second use). When i ran program with random.seed(time.now()), the breaking point was also diffrent, but always connected to that list.
Here is an output when i run the main.mojo
Round: 1 Akts: 2 Conects: 1 Mean energy: 52.0 Time: 0.0
Round: 2 Akts: 4 Conects: 3 Mean energy: 48.022743225097656 Time: 0.0
y= 2
x= 3
w= 3
Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all > the relevant source codes.
Stack dump:
Run main.mojo which imports Graph Struct from v2_BACKEND.mojo
It will write some variable values and you will get error.
As i said, in my opinion it is mostly about 'possible_connections' list in 'calculate_random_connections_create' method.
System information
- What OS did you do install Mojo on ? - Debian 12 Bookworm
- Provide version information for Mojo by pasting the output of `mojo -v` - mojo 24.4.0 (2cb57382)
- Provide Modular CLI version by pasting the output of `modular -v` - modular 0.8.0 (39a426b5)
Bug description
When program is started, its breaks in v2_BACKEND.mojo in somewhere in line 392. As far as i understand, i think that it is due to something wrong with "possible_connections" list, in 'calculate_random_connections_create' method, in 'Graph' structure.
I tried to copy that list, and do other stuff, but program always breaks when im trying to get elements from that list (note that, it is breaking after second use). When i ran program with random.seed(time.now()), the breaking point was also diffrent, but always connected to that list.
Here is an output when i run the main.mojo
where "Naruszenie ochrony pamięci" means "Memory protection violation".
below i attached .txt versions of main.mojo and v2_BACKEND.mojo. main.txt v2_BACKEND.txt
Steps to reproduce
Run main.mojo which imports Graph Struct from v2_BACKEND.mojo It will write some variable values and you will get error.
As i said, in my opinion it is mostly about 'possible_connections' list in 'calculate_random_connections_create' method.
System information