Closed srmainwaring closed 7 months ago
@srmainwaring I just tested this on an Intel macOS running Monterey, but I'm not getting a segfault at all. The spinbox doesn't seem to work properly (it's blank), but it doesn't crash. qt@5 has been upgraded to 5.15.10. Can you give it another try?
Can you give it another try?
@azeey - doing some book-keeping! Not seeing this at all in current Garden and Harmonic running Sonoma on M1 with latest brew - so suspect it was transient.
Environment
qt@5 5.15.8_3
Description
Steps to reproduce
brew
. This will installqt@5 5.15.8_3
.gz sim -g shapes.sdf
Output
See https://github.com/gazebosim/gz-sim/issues/1987.
The problem appears to be a conflict between QtQuickControls 1.4 and QtQuickControls 2.2. Both versions have a SpinBox but the behaviour is very different. The version in QtQuickControls 2.2 is for integer values only.
The QML documentation suggests an approach to use the controls for floats, but it is badly flawed and will not work for the use cases needed in
gz-sim
. A reimplementation of a spin box for doubles is needed. Docs and discussion:This is a serious bug on macOS as it causes an application crash on start up for any of the default examples (because the default
gui.config
includes the component inspector which indirectly loads the spin box).Possible approach
One of the answers in the SO article suggests a replacement SpinBox supporting doubles. This is almost a drop-in replacement for GzSpinBox. The branches below make the modifications to
gz-gui7
andgz-sim7
: