Opened 8 months ago

Last modified 8 months ago

#68250 new defect

qgis3-ltr: crash on startup with macOS 13.6 and Xcode 15

Reported by: nilason (Nicklas Larsson) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qgis3-ltr

Description

After updating macOS from macOS 12.6.6 to 13.6 and Xcode from 14.2 to 15.0 (and reinstalling MacPorts) on ARM, QGIS (version 3.28.11) crashes on startup:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libunwind.dylib               	       0x18f36fb24 _Unwind_GetIP + 244
1   libc++abi.dylib               	       0x1839cb22c __gxx_personality_v0 + 296
2   libunwind.1.dylib             	       0x1030790cc unwind_phase2 + 140
3   libunwind.1.dylib             	       0x103079158 _Unwind_Resume + 52
4   qgis_core                     	       0x10a28c274 QgsFileUtils::driveType(QString const&) + 180
5   qgis_core                     	       0x10a28c2bc QgsFileUtils::pathIsSlowDevice(QString const&) + 72
6   qgis_core                     	       0x10a448fdc QgsDirectoryItem::pathShouldByMonitoredByDefault(QString const&) + 236
7   qgis_core                     	       0x10a448890 QgsDirectoryItem::init(QString const&) + 180
8   qgis_core                     	       0x10a448c84 QgsDirectoryItem::QgsDirectoryItem(QgsDataItem*, QString const&, QString const&, QString const&, QString const&) + 248
9   qgis_core                     	       0x10a43a664 QgsBrowserModel::addRootItems() + 192
10  qgis_core                     	       0x10a43baa4 QgsBrowserModel::initialize() + 156
11  qgis_gui                      	       0x105e3ad30 QgsBrowserWidget::showEvent(QShowEvent*) + 48
12  QtWidgets                     	       0x1030dd2e0 QWidget::event(QEvent*) + 108
13  QtWidgets                     	       0x1030b67b0 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 236
14  QtWidgets                     	       0x1030b7628 QApplication::notify(QObject*, QEvent*) + 516
15  qgis_core                     	       0x10a1e29b8 QgsApplication::notify(QObject*, QEvent*) + 84
16  QtCore                        	       0x104998244 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 180
17  QtWidgets                     	       0x1030dc8c0 QWidgetPrivate::show_helper() + 276
18  QtWidgets                     	       0x1030dd12c QWidgetPrivate::setVisible(bool) + 576
19  QtWidgets                     	       0x1030dca54 QWidgetPrivate::showChildren(bool) + 200
20  QtWidgets                     	       0x1030dc7f0 QWidgetPrivate::show_helper() + 68
21  QtWidgets                     	       0x1030dca5c QWidgetPrivate::showChildren(bool) + 208
22  QtWidgets                     	       0x1030dc7f0 QWidgetPrivate::show_helper() + 68
23  QtWidgets                     	       0x1030dd12c QWidgetPrivate::setVisible(bool) + 576
24  QtWidgets                     	       0x10316c094 0x1030a8000 + 802964
25  QtWidgets                     	       0x10316c004 0x1030a8000 + 802820
26  QtWidgets                     	       0x10316cc34 0x1030a8000 + 805940
27  QtWidgets                     	       0x10318ace0 0x1030a8000 + 928992
28  QtWidgets                     	       0x10318e5a0 0x1030a8000 + 943520
29  QtWidgets                     	       0x10318761c QMainWindow::restoreState(QByteArray const&, int) + 136
30  libqgis_app.3.28.11.dylib     	       0x10389a064 void std::__1::__call_once_proxy[abi:v15006]<std::__1::tuple<QgisApp::showEvent(QShowEvent*)::$_967&&>>(void*) + 136
31  libc++.1.dylib                	       0x18393b6a0 std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 180
32  libqgis_app.3.28.11.dylib     	       0x10386bf38 QgisApp::showEvent(QShowEvent*) + 88
33  QtWidgets                     	       0x1030dd2e0 QWidget::event(QEvent*) + 108
34  QtWidgets                     	       0x1030b67b0 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 236
35  QtWidgets                     	       0x1030b7628 QApplication::notify(QObject*, QEvent*) + 516
36  qgis_core                     	       0x10a1e29b8 QgsApplication::notify(QObject*, QEvent*) + 84
37  QtCore                        	       0x104998244 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 180
38  QtWidgets                     	       0x1030dc8c0 QWidgetPrivate::show_helper() + 276
39  QtWidgets                     	       0x1030dd12c QWidgetPrivate::setVisible(bool) + 576
40  libqgis_app.3.28.11.dylib     	       0x1037f22a8 QgisApp::QgisApp(QSplashScreen*, bool, bool, bool, QString const&, QString const&, QWidget*, QFlags<Qt::WindowType>) + 25248
41  QGIS3                         	       0x10299c74c main + 16536
42  dyld                          	       0x1836b7f28 start + 2236

Previously I had no similar problems.

The crash seems to be caused by a C++ try-catch statement in: https://github.com/qgis/QGIS/blob/b02458a196a68c60fad3281272035813f73d610e/src/core/qgsfileutils.cpp#L349

Patching that method to only return false (which would be the correct return value in this case) QGIS start up fine, but I doubt that patch alone would be sufficient.

Attachments (1)

qgis3_crash.log (192.5 KB) - added by nilason (Nicklas Larsson) 8 months ago.

Download all attachments as: .zip

Change History (6)

Changed 8 months ago by nilason (Nicklas Larsson)

Attachment: qgis3_crash.log added

comment:1 Changed 8 months ago by nilason (Nicklas Larsson)

Any help or suggestion is really appreciated!

comment:2 Changed 8 months ago by nilason (Nicklas Larsson)

I see libunwind is loaded from both system (/usr/lib/system/libunwind.dylib) and MP (/opt/local/lib/libunwind.1.dylib).

comment:3 Changed 8 months ago by jmroot (Joshua Root)

Cf. #66250

comment:4 Changed 8 months ago by nilason (Nicklas Larsson)

comment:5 Changed 8 months ago by nilason (Nicklas Larsson)

In 5741e9657e2fced0b576b2adc4f2e5eb1282334f/macports-ports (master):

PDAL: enable use of system libunwind, drop dependency of port

This doesn't solve the problem with Xcode 15, automatically linking to
MacPorts' libunwind, but it makes it possible to some degree avoid
installing the port in the first place.

See #68250
See #66250

Note: See TracTickets for help on using tickets.