DatalogiForAlle / AgentsPy

Agent-based simulation for education in Python
GNU General Public License v3.0
5 stars 0 forks source link

Graph segfaults #38

Closed JensKanstrupLarsen closed 4 years ago

JensKanstrupLarsen commented 4 years ago

It seems like adding a line graph without adding a slider afterwards results in a segfault.

This code should display the issue:

from agents import *

miner_model = Model("Graph issue", 100, 100)

miner_model.line_chart("foo", (42, 42, 42))

# Uncomment this line to remove the error
#miner_model.add_slider("bar", 1, 1, 1)

run(miner_model)
JensKanstrupLarsen commented 4 years ago

Changing the size from miner_model = Model("Graph issue", 100, 100) to miner_model = Model("Graph issue", 50, 50) also fixes it (without needing to add the slider).

I'm not sure what to make of this.