On Jul 24, 2017, at 2:30 AM, Simon Waters (Surevine) <simon.waters@xxxxxxxxxxxx> wrote:
> Noted that the 2.4.0 build immediately crashes on 10.13 beta of Mac OS.
>
> QWidget: Must construct a QApplication before a QWidget
> Abort trap: 6
Do you have a full stack trace?
I got this at one point under 10.12; in that particular case, the problem was that we were trying to display a dialog box before we'd constructed the main WiresharkApplication.
You can't call SimpleDialog::SimpleDialog() before you've constructed the main WiresharkApplication; SimpleDialog::SimpleDialog() does tests to check whether the main WiresharkApplication has been constructed or not, it's a subclass of QDialog, so it'll construct the QDialog - which is a QWidget - *before* doing the check.
So you can't call any of the simple_dialog functions before you've constructed the WiresharkApplication.
We probably need to have vsimple_error_message_box() do the check in question, and queue up the messages *itself* to report if the WiresharkApplication hasn't been constructed yet.
> Not the first Qt app to fail under 10.13, almost certainly a library mismatch.
Not necessarily; it could just be that, for whatever reason, Wireshark's trying to pop up a dialog from main() before the
/* Create The Wireshark app */
WiresharkApplication ws_app(argc, qt_argv);
code in main(). *That* will fail on *any* version of *any* OS, not just macOS 10.13, and not just macOS.