dashfaction icon indicating copy to clipboard operation
dashfaction copied to clipboard

RED Crash on viewing properties of nonexistent objects

Open GooberRF opened this issue 2 years ago • 4 comments

To replicate:

  1. Create Delay event
  2. Go to properties on new Delay event, click "Links"
  3. Click "Properties"
  4. Crash

Normally this brings up the properties of the link selected in the window, but when no links exist (and thus none are available to be selected), hitting this button triggers a crash.

GooberRF avatar Jul 07 '22 03:07 GooberRF

Hm, I am unable to reproduce on Linux. Nothing happens when I click "Properties". Does it always crash for you?

rafalh avatar Jul 10 '22 11:07 rafalh

Yes, it consistently crashes for me every time when I follow these steps. Interesting that you can't reproduce it on Linux though :o Is there any way for me to send you a RED crash dump perhaps?

GooberRF avatar Jul 11 '22 03:07 GooberRF

I tried to debug this but the code looks correct and works perfectly fine under Wine. On Windows for some reason the listbox control returns 0 in response to LB_GETCURSEL message which is incorrect (it should return -1 for an empty listbox). It's very unlikely that Windows is broken so there must be some other weird explanation that I do not see :(

rafalh avatar Jul 13 '22 20:07 rafalh

Would it be an option to perhaps just disable the properties button unless there's at least one entry in the list?

GooberRF avatar Jul 13 '22 21:07 GooberRF