intvsteve / VINTage

Various Intellivision-related projects, including the LTO Flash! User Interface application.
GNU General Public License v2.0
3 stars 1 forks source link

It is possible to have firmware update prompt appear multiple times on connect #299

Open intvsteve opened 5 years ago

intvsteve commented 5 years ago

Operating system version

All

Program version (from About box)

1.0.0.4499

Expected behavior

Prompt to update firmware only happens once each time cart is connected to UI.

Actual behavior

Prompt to update firmware appears more than once when cart is connected.

Steps to reproduce

  1. Have cart with old firmware (prior to 4416)
  2. Connect to computer while latest UI is running

Crash log if available (paste or attach)

N/A

intvsteve commented 5 years ago

Only saw this once, and was running a horribly slow VM on a heavily taxed system. The theory of this is follows:

The 'heartbeat' timer ticks and sees that the pending 'check for update'. task needs running. The way this is implemented is via a BeginInvoke over to the UI thread.

HOWEVER because it's done this way, if the UI thread is blocked, then wakes up, shows a dialog, and starts processing these 'being invoked' tasks under the dialog, they can nest.

Need to prevent this from happening.