edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

GUI Thread crash after supplying trainer via sbus in

Open wimalopaan opened this issue 4 years ago • 6 comments

I can crash the gui thread using

  1. new model
  2. trainer-serial
  3. feed some sbus signal
  4. try to calibrate the trainer signal, select calibrate
  5. gui freezes
  6. main thread still works: get trainer lost if sbus is pulled out
  7. can't switch off, have to unplug the battery

wimalopaan avatar Sep 01 '21 07:09 wimalopaan

I have a potential solution here https://github.com/dlktdr/edgetx/commit/2e5c96bf4bb4d1b2884e622e7067b497b7c6f913.

Looks like it's trying to set the value but another update comes in and crashes the GUI. An option is to go to the way OTX did it with a calibration button to calibrate all at once which works well, disabling the events on the number edit so they just show the data.

I could split into 4 buttons to calibrate each one separately if that's something that would actually be needed.

image

dlktdr avatar Sep 13 '21 05:09 dlktdr

I think the button is all that is needed... I don't think the values have ever actually been 'configurable in any way... just shown so you can see if they are crazy values or something is wrong with the trainer. You can't even edit those values in Companion - it's read-only as well.

pfeerick avatar Sep 13 '21 05:09 pfeerick

Ok. I'll make a pull request on this one then you can review.

dlktdr avatar Sep 13 '21 05:09 dlktdr

Do you think there is any value to having them read only NumberEdits, rather than some form of StaticText/drawText?

pfeerick avatar Sep 13 '21 05:09 pfeerick

No I don't think so, I guess static would make more sense. Let me change that... Ignore pull for now..

dlktdr avatar Sep 13 '21 05:09 dlktdr

Is this fixed?

gagarinlg avatar Sep 22 '22 11:09 gagarinlg