Menu

#2199 Status bar update failure when a snapshot is loaded after a CPU jam

v3.10
open
nobody
None
Windows
User Interface
2026-01-31
2026-01-28
rice123
No

Steps:

  1. Snapshot -> Quicksave snapshot
  2. Alt+H to open the monitor
  3. Execute:
>1000 02
g 1000
  1. Select "Continue" from the "D'OH!" prompt
  2. Snapshot -> Quickload snapshot

Result:
1. The cpu and fps indicators on the status bar are not updated anymore even though the emulator is running normally
2. When Alt+W or Alt+P is pressed, the warp and pause indicators are not updated
3. "Main CPU: JAM at $1000" is displayed continuously

Discussion

  • gpz

    gpz - 2026-01-28

    Does it also happen in SDL?

     
    • rice123

      rice123 - 2026-01-28

      Unless I'm missing some setting to toggle, there's no status bar in SDL.

       
      • gpz

        gpz - 2026-01-28

        It's in the Mainmenu :)

         
        • rice123

          rice123 - 2026-01-28

          it's also affected, "Main CPU: JAM at $1000" persists after quickloading snapshot and the status bar recovers only after resetting machine CPU/power cycling

           
          • gpz

            gpz - 2026-01-28

            Darn. Thanks for trying - the problem must be somewhere in the snapshot-loading code then (i hoped for a GUI glitch)

             
            • rice123

              rice123 - 2026-01-28

              gtk3 and sdl query machine_is_jammed() which is dependent on the state of the static is_jammed boolean which is set to false only in machine_trigger_reset_internal() and machine_reset().

              The problem probably comes from the snapshot-loading code not handling is_jammed in any way.

               
              • gpz

                gpz - 2026-01-28

                ...Which is kindof strange - the emulator (CPU) shouldn't run in that case either....

                will have a look

                 
                • rice123

                  rice123 - 2026-01-28

                  machine_is_jammed() is checked only in a handful of places - outside the ui code only in monitor_cpuhistory_store(), so chis won't work after loading a snapshot but the CPU can apparently still run when machine_is_jammed() is true.

                   
                  • gpz

                    gpz - 2026-01-31

                    Yeah, the CPU module has a seperate is_jammed flag - which is handled (which is why loading the snapshot works)

                     
                    • gpz

                      gpz - 2026-01-31

                      Darn. Saving the state of is_jammed into the snapshot makes it work - except now the entire UI crashes =)
                      Edit: same when resetting before loading the snapshot, or using the main CPUs jam state (which already is/was in the snapshot)

                       

                      Last edit: gpz 2026-01-31
                      • gpz

                        gpz - 2026-01-31

                        Bleh. I am giving up on this.

                        The problem is (yet again) this "lets do random stuff in vsync sometime later"

                         
                        • rice123

                          rice123 - 2026-01-31

                          can you please post your wip patch so that anyone interested can follow up on it without starting from scratch?

                           
                          • gpz

                            gpz - 2026-01-31

                            Already reverted the local changes, sorry

                             

Log in to post a comment.

MongoDB Logo MongoDB