inda19plusplus / logik

Logisim clone
MIT License
2 stars 5 forks source link

Issue where the backend crashes when removing a component that was contained in a removed subnet #50

Closed NogginBops closed 4 years ago

NogginBops commented 4 years ago

I'm not 100% sure when this issue happens but here are the calls to the back-end that cause this issue:

[Logic] AddComponent(Type: Constant) -> 2
[Logic] Link(Component: 2, Port: 0, Subnet: 2) -> True
[Logic] AddComponent(Type: Not) -> 3
[Logic] Link(Component: 3, Port: 0, Subnet: 2) -> True
[Logic] AddSubnet(Subnet: 4) -> True
[Logic] Link(Component: 3, Port: 1, Subnet: 4) -> True
[Logic] RemoveSubnet(Subnet: 4) -> True
[Logic] AddSubnet(Subnet: 5) -> True
[Logic] Link(Component: 3, Port: 1, Subnet: 5) -> True
[Logic] RemoveSubnet(Subnet: 5) -> True
[Logic] RemoveComponent(Component: 3) -> panic()

This is the error message that is printed:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', native\logik_simulation\src\data\mod.rs:283:23
default-username-852 commented 4 years ago

How does the call to AddComponent look like? Or are those 4 calls the only calls made to the backend?

NogginBops commented 4 years ago

Added more of the log to the issue. @default-username-852