Skip to content

Simulation halted by internal error when generating timing diagram #2005

Closed
@krisjdev

Description

@krisjdev

I'm trying to create a timing diagram of a CPU whilst its executing a program, however it fails with the following error:

java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
        at com.cburch.logisim.gui.log.Signal.extend(Signal.java:95)
        at com.cburch.logisim.gui.log.Model.extendWithNewValues(Model.java:570)
        at com.cburch.logisim.gui.log.Model.updateSignalsClockMode(Model.java:671)
        at com.cburch.logisim.gui.log.Model.propagationCompleted(Model.java:598)
        at com.cburch.logisim.gui.log.LogFrame$MyListener.propagationCompleted(LogFrame.java:86)
        at com.cburch.logisim.circuit.Simulator.firePropagationCompleted(Simulator.java:482)
        at com.cburch.logisim.circuit.Simulator$SimThread.loop(Simulator.java:373)
        at com.cburch.logisim.circuit.Simulator$SimThread.run(Simulator.java:383)

And it also produces a pop-up window that tells me to save my work and reload Logisim. I'm not able to restart the simulation using CTRL+E
image

I am using v3.8.0 installed using the .deb package.

To reproduce:

  1. Download BABY.circ and TuringLongDivision.logisimRAMImage from https://gitlab.com/charles.fox/comparch/-/tree/main/chapter07
  2. Open BABY.circ and load the TuringLongDivision.logisimRAMImage into the RAM block
  3. Change the frequency: Simulate -> Auto-Tick Frequency -> 16.0 Hz
  4. Open the timing diagram utility: Simulate -> Timing diagram
    1. Enable Store unlimited history
    2. Set timescale to 5.0us
    3. Do not add/remove any signals
  5. Click into the Timing diagram tab in the utility
  6. Start the simulation: Simulate -> Auto-Tick Enabled
  7. Wait for it to crash, happens when the chronogram hits 2ms

image

I suspect that turning on Store unlimited history might be the cause of the issue, as the simulation runs as intended with it disabled, but I was hoping to export the waveforms generated during the entire duration of the program execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugYep, that's an insect.help wantedinvestigatingLet's check, maybe there's something about it...pri stdStandard importance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions