QT 6.8.0: QSqlDatabase crashes on macOS
-
Hi,
I'm developing an application on my MacMini (macOS Sequoia 15.0.1). The application should access a PostgreSQL server on another machine. Unfortunately the application crashes at the moment I try to find out whether QPSQL is supported or not. The following code works fine on Linux, but crashes on my Mac:QList<QSqlDatabase> TDatabase::mDbs; int TDatabase::mConnection{0}; int TDatabase::mCurrent{-1}; void TDatabase::init() { if (mDbs.size() > 0) return; QSqlDatabase db; if (!db.isDriverAvailable("QPSQL")) //Crash here!! { MSG_ERROR("Fatal error: No PostgreSQL driver available!"); abort(); } db.addDatabase("QPSQL", connectionName()); if (!db.isValid()) { MSG_ERROR("Database driver for PostgreSQL is not available!"); assert(db.isValid() == true); } db.setHostName(TConfig::getDbHost().c_str()); db.setPort(TConfig::getDbPort()); db.setDatabaseName(TConfig::getDbDatabase().c_str()); db.setUserName(TConfig::getDbUser().c_str()); db.setPassword(TConfig::getDbPasswd().c_str()); if (!db.open()) { QSqlError dberror = db.lastError(); MSG_ERROR("Database error: " << dberror.databaseText().toStdString()); MSG_ERROR("Driver error: " << dberror.driverText().toStdString()); MSG_ERROR("Error message: " << dberror.text().toStdString()); MSG_ERROR("Error code: " << dberror.nativeErrorCode().toStdString()); assert(db.open() == true); } mDbs.append(db); mCurrent = 0; }
It don't get the error message in the 2nd
if
.
Here are some parts of mycmake
file:cmake_minimum_required(VERSION 3.10) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) .... find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Network Sql HttpServer Concurrent Core5Compat) find_package(Qt6 REQUIRED COMPONENTS Core Network Sql HttpServer Concurrent Core5Compat) find_package(OpenSSL REQUIRED) set(PostgreSQL_INCLUDE_DIR /opt/homebrew/opt/libpq/include) set(PostgreSQL_LIBRARY /opt/homebrew/opt/libpq/lib/libpq.a) find_package(PostgreSQL REQUIRED) set(TSports_SRC main.cpp .... ) add_compile_options(-I/opt/homebrew/include -I/opt/homebrew/opt/libpq/include) add_executable(tsports ${TSports_SRC}) target_link_libraries(tsports m pthread OpenSSL::SSL PostgreSQL::PostgreSQL Qt6::Core Qt6::Network Qt6::Sql Qt6::HttpServer Qt6::Concurrent Qt6::Core5Compat) install(TARGETS tsports RUNTIME DESTINATION sbin)
Because it's working on Linux, I can't see the error. What's wrong with my code?
Some more information:
I installedbrew
and I'm usingOpenSSL
as well as the librarylibpq
frombrew
as you can see from mycmake
file. Could this be a problem? Should I get the source of PostgreSQL and compile the libraries myself?A.T.
-
Hi,
I'm developing an application on my MacMini (macOS Sequoia 15.0.1). The application should access a PostgreSQL server on another machine. Unfortunately the application crashes at the moment I try to find out whether QPSQL is supported or not. The following code works fine on Linux, but crashes on my Mac:QList<QSqlDatabase> TDatabase::mDbs; int TDatabase::mConnection{0}; int TDatabase::mCurrent{-1}; void TDatabase::init() { if (mDbs.size() > 0) return; QSqlDatabase db; if (!db.isDriverAvailable("QPSQL")) //Crash here!! { MSG_ERROR("Fatal error: No PostgreSQL driver available!"); abort(); } db.addDatabase("QPSQL", connectionName()); if (!db.isValid()) { MSG_ERROR("Database driver for PostgreSQL is not available!"); assert(db.isValid() == true); } db.setHostName(TConfig::getDbHost().c_str()); db.setPort(TConfig::getDbPort()); db.setDatabaseName(TConfig::getDbDatabase().c_str()); db.setUserName(TConfig::getDbUser().c_str()); db.setPassword(TConfig::getDbPasswd().c_str()); if (!db.open()) { QSqlError dberror = db.lastError(); MSG_ERROR("Database error: " << dberror.databaseText().toStdString()); MSG_ERROR("Driver error: " << dberror.driverText().toStdString()); MSG_ERROR("Error message: " << dberror.text().toStdString()); MSG_ERROR("Error code: " << dberror.nativeErrorCode().toStdString()); assert(db.open() == true); } mDbs.append(db); mCurrent = 0; }
It don't get the error message in the 2nd
if
.
Here are some parts of mycmake
file:cmake_minimum_required(VERSION 3.10) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) .... find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Network Sql HttpServer Concurrent Core5Compat) find_package(Qt6 REQUIRED COMPONENTS Core Network Sql HttpServer Concurrent Core5Compat) find_package(OpenSSL REQUIRED) set(PostgreSQL_INCLUDE_DIR /opt/homebrew/opt/libpq/include) set(PostgreSQL_LIBRARY /opt/homebrew/opt/libpq/lib/libpq.a) find_package(PostgreSQL REQUIRED) set(TSports_SRC main.cpp .... ) add_compile_options(-I/opt/homebrew/include -I/opt/homebrew/opt/libpq/include) add_executable(tsports ${TSports_SRC}) target_link_libraries(tsports m pthread OpenSSL::SSL PostgreSQL::PostgreSQL Qt6::Core Qt6::Network Qt6::Sql Qt6::HttpServer Qt6::Concurrent Qt6::Core5Compat) install(TARGETS tsports RUNTIME DESTINATION sbin)
Because it's working on Linux, I can't see the error. What's wrong with my code?
Some more information:
I installedbrew
and I'm usingOpenSSL
as well as the librarylibpq
frombrew
as you can see from mycmake
file. Could this be a problem? Should I get the source of PostgreSQL and compile the libraries myself?A.T.
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
if (!db.isDriverAvailable("QPSQL")) //Crash here!!
Although it should not "crash" here, and of course you need to resolve that, what does QStringList QSqlDatabase::drivers() give you? One would assume that ought crash equally....
It don't get the error message in the 2nd if.
Well you wouldn't if your program actually "crashes" where you say. You might try letting it "crash" inside debugger and see what it shows, but from what you say it would be in internal Qt code.
Just checking you have created a
Q
-whatever-Application
object by the time you execute this code?I know nothing about Mac issues. You should probably state your exact Qt version.
-
As always with crashes, attach the full stack trace when asking for help.
P.S 1: You are misusing the
QSqlDatabase
interface. You seem to be keepingQSqlDatabase
instances in a static list, and that is a bad idea. QSqlDatabase itself already provides a way to access a connection when needed while handling the very subtle lifetime issues. You also useisDriverAvailable
and more importantlyaddDatabase
as instance methods when they are actually static methods; this is not a problem by itself, but it led you to thinkingaddDatabase
is doing something else than it actually does.Read the detailed description in the documentation very very carefully, and pay attention to the warnings and notes.
P.S 2: Your application doesn't need to link to
libpq
directly. The Qt SQL plugin for PostgreSQL is the one that needs to link to it, double check that theplugins/sqldrivers/libqsqlpsql.dylib
in your Qt installation is linked to a proper libpq withotool
. -
Hi,
Are you sure it's a crash ?
After all you have a call to abort in case QPSQL is not available.
As @IgKh wrote, you have to check that the plug-in can find libpsql which is likely the issue at hand.@SGaist said in QT 6.8.0: QSqlDatabase crashes on macOS:
Are you sure it's a crash ?
After all you have a call to abort in case QPSQL is not available.Before the
abort()
is a message printed out. I don't see this message which means it doesn't ever reach theabort()
.However: I get no crash report, no core dump (yes, core dumps are enabled). It even doesn't write me a message that it made a core dump, which it does usually in such a case. It looks like that it silently aborts somewhere inside the class
QSqlDatabase
.@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
P.S 1: You are misusing the QSqlDatabase interface. You seem to be keeping QSqlDatabase instances in a static list, and that is a bad idea. QSqlDatabase itself already provides a way to access a connection when needed while handling the very subtle lifetime issues. You also use isDriverAvailable and more importantly addDatabase as instance methods when they are actually static methods; this is not a problem by itself, but it led you to thinking addDatabase is doing something else than it actually does.
You're right. However: It doesn't even reach the point where this could be a problem.
@JonB said in QT 6.8.0: QSqlDatabase crashes on macOS:
Just checking you have created a Q-whatever-Application object by the time you execute this code?
Here is the main function:
int main (int argc, char *argv[]) { QCoreApplication app(argc, argv); QCommandLineParser parser; parser.addOptions( { { "config", QCoreApplication::translate("main", "The path and name of the configuration file"), "config" }, { "logfile", QCoreApplication::translate("main", "The path and name of the logfile"), "logfile" } } ); parser.addHelpOption(); parser.process(app); // Read configuration and/ or set defaults TConfig conf; if (!parser.value("config").isEmpty()) conf.setConfigFile(parser.value("config").toStdString()); if (!parser.value("logfile").isEmpty()) conf.setLogFile(parser.value("logfile").toStdString()); // Initialize server and wait for connections TServer server; app.exec(); MSG_DEBUG("Server shutting down ..."); int _exit = 0; // Free allocated memory and exit return _exit; }
In fact the initializing of class
TServer
is also executing the database initialization. This is done beforeapp.exec()
is called. Could this be the problem? I'll try to change my code so that it will be called when the main application is initialized.A.T.
-
As long as a QCoreApplication is available it's fine - no need for a running event loop.
Use a debugger and see where it crashes. -
@SGaist said in QT 6.8.0: QSqlDatabase crashes on macOS:
Are you sure it's a crash ?
After all you have a call to abort in case QPSQL is not available.Before the
abort()
is a message printed out. I don't see this message which means it doesn't ever reach theabort()
.However: I get no crash report, no core dump (yes, core dumps are enabled). It even doesn't write me a message that it made a core dump, which it does usually in such a case. It looks like that it silently aborts somewhere inside the class
QSqlDatabase
.@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
P.S 1: You are misusing the QSqlDatabase interface. You seem to be keeping QSqlDatabase instances in a static list, and that is a bad idea. QSqlDatabase itself already provides a way to access a connection when needed while handling the very subtle lifetime issues. You also use isDriverAvailable and more importantly addDatabase as instance methods when they are actually static methods; this is not a problem by itself, but it led you to thinking addDatabase is doing something else than it actually does.
You're right. However: It doesn't even reach the point where this could be a problem.
@JonB said in QT 6.8.0: QSqlDatabase crashes on macOS:
Just checking you have created a Q-whatever-Application object by the time you execute this code?
Here is the main function:
int main (int argc, char *argv[]) { QCoreApplication app(argc, argv); QCommandLineParser parser; parser.addOptions( { { "config", QCoreApplication::translate("main", "The path and name of the configuration file"), "config" }, { "logfile", QCoreApplication::translate("main", "The path and name of the logfile"), "logfile" } } ); parser.addHelpOption(); parser.process(app); // Read configuration and/ or set defaults TConfig conf; if (!parser.value("config").isEmpty()) conf.setConfigFile(parser.value("config").toStdString()); if (!parser.value("logfile").isEmpty()) conf.setLogFile(parser.value("logfile").toStdString()); // Initialize server and wait for connections TServer server; app.exec(); MSG_DEBUG("Server shutting down ..."); int _exit = 0; // Free allocated memory and exit return _exit; }
In fact the initializing of class
TServer
is also executing the database initialization. This is done beforeapp.exec()
is called. Could this be the problem? I'll try to change my code so that it will be called when the main application is initialized.A.T.
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
Before the abort() is a message printed out. I don't see this message which means it doesn't ever reach the abort().
However: I get no crash report, no core dump (yes, core dumps are enabled). It even doesn't write me a message that it made a core dump, which it does usually in such a case. It looks like that it silently aborts somewhere inside the class QSqlDatabase.
I have no idea what any of this means. You chose to write
if (!db.isDriverAvailable("QPSQL")) //Crash here!!
Either it "crashes" which means you will see something, and certainly in the debugger, or it does not "crash", in which case your comment is wrong. If you get a "crash" under debugger it will show you a stack trace. If you do not get a "crash" it will not show you anything. If by any chance you claim it simply never returns from
isDriverAvailable("QPSQL")
, or during it itexit()
s the program --- neither of which I think is likely --- neither of those are a "crash".No idea what your
MSG_ERROR()
might do since it's not a part of Qt or C++. Whether it works or might fail I would not know.I suggested you print out
QStringList QSqlDatabase::drivers()
but you don't seem to have acted on that. It is "not possible" forisDriverAvailable("QPSQL")
to crash/hang/misbehave if you can access thedrivers()
list. EitherQPSQL
is in theQStringList
or it is not.isDriverAvailable("QPSQL")
does not do anything special about the fact that you are asking about"QPSQL"
. -
@SGaist said in QT 6.8.0: QSqlDatabase crashes on macOS:
Are you sure it's a crash ?
After all you have a call to abort in case QPSQL is not available.Before the
abort()
is a message printed out. I don't see this message which means it doesn't ever reach theabort()
.However: I get no crash report, no core dump (yes, core dumps are enabled). It even doesn't write me a message that it made a core dump, which it does usually in such a case. It looks like that it silently aborts somewhere inside the class
QSqlDatabase
.@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
P.S 1: You are misusing the QSqlDatabase interface. You seem to be keeping QSqlDatabase instances in a static list, and that is a bad idea. QSqlDatabase itself already provides a way to access a connection when needed while handling the very subtle lifetime issues. You also use isDriverAvailable and more importantly addDatabase as instance methods when they are actually static methods; this is not a problem by itself, but it led you to thinking addDatabase is doing something else than it actually does.
You're right. However: It doesn't even reach the point where this could be a problem.
@JonB said in QT 6.8.0: QSqlDatabase crashes on macOS:
Just checking you have created a Q-whatever-Application object by the time you execute this code?
Here is the main function:
int main (int argc, char *argv[]) { QCoreApplication app(argc, argv); QCommandLineParser parser; parser.addOptions( { { "config", QCoreApplication::translate("main", "The path and name of the configuration file"), "config" }, { "logfile", QCoreApplication::translate("main", "The path and name of the logfile"), "logfile" } } ); parser.addHelpOption(); parser.process(app); // Read configuration and/ or set defaults TConfig conf; if (!parser.value("config").isEmpty()) conf.setConfigFile(parser.value("config").toStdString()); if (!parser.value("logfile").isEmpty()) conf.setLogFile(parser.value("logfile").toStdString()); // Initialize server and wait for connections TServer server; app.exec(); MSG_DEBUG("Server shutting down ..."); int _exit = 0; // Free allocated memory and exit return _exit; }
In fact the initializing of class
TServer
is also executing the database initialization. This is done beforeapp.exec()
is called. Could this be the problem? I'll try to change my code so that it will be called when the main application is initialized.A.T.
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
I don't see this message which means it doesn't ever reach the abort().
It doesn't necessarily mean that. It could just as well be that however
MSG_ERROR
is implemented, it writes via some sort of buffered IO, that doesn't get flushed due to the program abnormally exiting. The only way to confirm that at this point and with the available information is to step through the method with a debugger. -
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
Before the abort() is a message printed out. I don't see this message which means it doesn't ever reach the abort().
However: I get no crash report, no core dump (yes, core dumps are enabled). It even doesn't write me a message that it made a core dump, which it does usually in such a case. It looks like that it silently aborts somewhere inside the class QSqlDatabase.
I have no idea what any of this means. You chose to write
if (!db.isDriverAvailable("QPSQL")) //Crash here!!
Either it "crashes" which means you will see something, and certainly in the debugger, or it does not "crash", in which case your comment is wrong. If you get a "crash" under debugger it will show you a stack trace. If you do not get a "crash" it will not show you anything. If by any chance you claim it simply never returns from
isDriverAvailable("QPSQL")
, or during it itexit()
s the program --- neither of which I think is likely --- neither of those are a "crash".No idea what your
MSG_ERROR()
might do since it's not a part of Qt or C++. Whether it works or might fail I would not know.I suggested you print out
QStringList QSqlDatabase::drivers()
but you don't seem to have acted on that. It is "not possible" forisDriverAvailable("QPSQL")
to crash/hang/misbehave if you can access thedrivers()
list. EitherQPSQL
is in theQStringList
or it is not.isDriverAvailable("QPSQL")
does not do anything special about the fact that you are asking about"QPSQL"
.@JonB said in QT 6.8.0: QSqlDatabase crashes on macOS:
I suggested you print out QStringList QSqlDatabase::drivers() but you don't seem to have acted on that.
It prints nothing but crashes.
However: MacOS 15.0.1 changed the way core dumps are handled. Finally I found them and this is what I get:------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: tsports [97965] Path: /Users/USER/*/tsports Identifier: tsports Version: ??? Code Type: ARM-64 (Native) Parent Process: launchd [1] Responsible: Terminal [82263] User ID: 501 Date/Time: 2024-11-10 17:06:30.9083 +0100 OS Version: macOS 15.0.1 (24A348) Report Version: 12 Anonymous UUID: 45D4B423-91DF-ED45-CA23-12D05999B925 Sleep/Wake UUID: 76BEB25C-C59E-4263-BD80-CEBB51D2180D Time Awake Since Boot: 200000 seconds Time Since Wake: 20443 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000110 Exception Codes: 0x0000000000000001, 0x0000000000000110 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [97965] VM Region Info: 0x110 is not in any region. Bytes before following region: 4343889648 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 102ea8000-102fe4000 [ 1264K] r-x/r-x SM=COW /Users/USER/*/tsports Application Specific Information: *** multi-threaded process forked *** crashed on child side of fork pre-exec Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libdispatch.dylib 0x18779d260 _dispatch_mgr_queue_push + 60 1 CarbonCore 0x18b06cf68 connectToCoreServicesD() + 476 2 CarbonCore 0x18b06cc38 getStatus() + 64 3 CarbonCore 0x18b0700c4 scCreateSystemServiceVersion + 56 4 CarbonCore 0x18b06ff38 FileIDTreeGetCachedPort + 276 5 CarbonCore 0x18b06fca8 FSNodeStorageGetAndLockCurrentUniverse + 76 6 CarbonCore 0x18b06fa90 FileIDTreeGetAndLockVolumeEntryForDeviceID + 88 7 CarbonCore 0x18b06f8f8 FSMount::FSMount(unsigned int, FSMountNumberType, int*, unsigned int const*) + 92 8 CarbonCore 0x18b06f854 FSMountPrepare + 76 9 CoreServicesInternal 0x18b3668a0 MountInfoPrepare + 68 10 CoreServicesInternal 0x18b390bd4 parseAttributeBuffer(__CFAllocator const*, unsigned char const*, unsigned char, attrlist const*, void const*, void**, _FileAttributes*, unsigned int*, unsigned char) + 2616 11 CoreServicesInternal 0x18b366250 corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 1344 12 CoreServicesInternal 0x18b365c9c prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 460 13 CoreServicesInternal 0x18b362bac _FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 232 14 CoreFoundation 0x1879fb708 CFURLCopyResourcePropertyForKey + 108 15 QtCore 0x104d3c860 hasResourcePropertyFlag(QFileSystemMetaData const&, QFileSystemEntry const&, __CFString const*) + 224 (qfilesystemengine_unix.cpp:109) 16 QtCore 0x104d3af00 QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) + 1780 (qfilesystemengine_unix.cpp:1005) 17 QtCore 0x104b6d3d8 QDirEntryInfo::ensureFilled(QFlags<QFileSystemMetaData::MetaDataFlag>) + 24 (qdirentryinfo_p.h:29) [inlined] 18 QtCore 0x104b6d3d8 QDirEntryInfo::isHidden() + 24 (qdirentryinfo_p.h:114) [inlined] 19 QtCore 0x104b6d3d8 QDirListingPrivate::matchesFilters(QDirEntryInfo&) const + 328 (qdirlisting.cpp:506) 20 QtCore 0x104b6d8a4 QDirListingPrivate::entryMatches(QDirEntryInfo&) + 12 (qdirlisting.cpp:306) [inlined] 21 QtCore 0x104b6d8a4 QDirListingPrivate::advance() + 688 (qdirlisting.cpp:352) 22 QtCore 0x104b6e440 QDirListing::next(QDirListing::DirEntry) + 8 (qdirlisting.cpp:805) [inlined] 23 QtCore 0x104b6e440 QDirListing::const_iterator::operator++() + 8 (qdirlisting.h:122) [inlined] 24 QtCore 0x104b6e440 QDirListing::begin() const + 140 (qdirlisting.cpp:756) 25 QtCore 0x104c2dc2c QFactoryLoaderPrivate::updateSinglePath(QString const&) + 512 (qfactoryloader.cpp:314) 26 QtCore 0x104c2d918 QFactoryLoader::update() + 260 (qfactoryloader.cpp:397) 27 QtCore 0x104c2f2c0 QFactoryLoader::QFactoryLoader(char const*, QString const&, Qt::CaseSensitivity) + 192 (qfactoryloader.cpp:458) 28 QtSql 0x1033334ac (anonymous namespace)::Q_QGS_loader::innerFunction(void*) + 64 (qsqldatabase.cpp:36) [inlined] 29 QtSql 0x1033334ac QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder() + 64 (qglobalstatic.h:37) [inlined] 30 QtSql 0x1033334ac QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder() + 64 (qglobalstatic.h:36) [inlined] 31 QtSql 0x1033334ac QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::instance() + 80 (qglobalstatic.h:100) [inlined] 32 QtSql 0x1033334ac QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::operator()() + 212 (qglobalstatic.h:82) 33 QtSql 0x103333120 QSqlDatabase::drivers() + 72 (qsqldatabase.cpp:489) 34 QtSql 0x103334324 QSqlDatabase::isDriverAvailable(QString const&) + 48 (qsqldatabase.cpp:1135) 35 tsports 0x102fb1ac0 TDatabase::init() + 336 36 tsports 0x102fb2718 TDatabase::first() + 128 37 tsports 0x102f45df8 TUser::TUser() + 152 38 tsports 0x102f24e58 TAuthenticate::TAuthenticate() + 56 39 tsports 0x102f253b8 TAuthenticate::TAuthenticate() + 28 40 tsports 0x102eb32e8 TServer::TServer() + 196 41 tsports 0x102eb4984 TServer::TServer() + 28 42 tsports 0x102eae0fc main + 2212 43 dyld 0x1875c0274 start + 2840 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001ec086e40 x1: 0x000000014b004080 x2: 0x0000000000000000 x3: 0x00000001ec086e40 x4: 0x000000018779d224 x5: 0x00000001ec0864d0 x6: 0x000000014b004080 x7: 0x0000000000000000 x8: 0x00000001ec083320 x9: 0x0000000000000100 x10: 0x0000004000000000 x11: 0x0000000000000000 x12: 0x0080000000000000 x13: 0x0000004000000001 x14: 0x001ffe8000000000 x15: 0x001ffe8000000000 x16: 0xbb300001ec0864d0 x17: 0x6ae10001ec086e40 x18: 0x0000000000000000 x19: 0x000000014b004080 x20: 0x000000014b004170 x21: 0x00000001ec0ab000 x22: 0x00000001ec0ab000 x23: 0x0000000000001903 x24: 0x000000000100001c x25: 0x0000000000000000 x26: 0x00000000d01fde0d x27: 0x0000000000000000 x28: 0x00000001ea089000 fp: 0x000000016cf53ca0 lr: 0x000000018b06cf68 sp: 0x000000016cf53ca0 pc: 0x000000018779d260 cpsr: 0x40001000 far: 0x0000000000000110 esr: 0x92000046 (Data Abort) byte write Translation fault Binary Images: 0x102ea8000 - 0x102fe3fff tsports (*) <255224f9-ccba-3824-bbe3-8aa99424a6d4> /Users/USER/*/tsports 0x10325c000 - 0x1032e3fff libssl.3.dylib (*) <d6155905-1501-3a5a-a580-7905e267f8c2> /Volumes/VOLUME/*/libssl.3.dylib 0x10332c000 - 0x10335bfff org.qt-project.QtSql (6.8) <bdc778a8-d4b6-38f9-8707-34bf18f347ab> /Volumes/VOLUME/*/QtSql.framework/Versions/A/QtSql 0x1031fc000 - 0x103217fff org.qt-project.QtHttpServer (6.8) <ecb59bd4-08f8-39de-80a9-7ae3b050f0d5> /Volumes/VOLUME/*/QtHttpServer.framework/Versions/A/QtHttpServer 0x1031b4000 - 0x1031b7fff org.qt-project.QtConcurrent (6.8) <9e1eed8f-bec6-3c03-b8bc-e722683e0ad4> /Volumes/VOLUME/*/QtConcurrent.framework/Versions/A/QtConcurrent 0x103520000 - 0x1035cffff org.qt-project.QtCore5Compat (6.8) <30900940-be81-3326-87e1-c1d50942a14b> /Volumes/VOLUME/*/QtCore5Compat.framework/Versions/A/QtCore5Compat 0x103a0c000 - 0x103cfbfff libcrypto.3.dylib (*) <0ef13b00-8944-3a1e-ac18-21753de7eedf> /Volumes/VOLUME/*/libcrypto.3.dylib 0x1033f4000 - 0x103413fff org.qt-project.QtWebSockets (6.8) <6a66caf0-ba09-315f-8e21-c535658cb28d> /Volumes/VOLUME/*/QtWebSockets.framework/Versions/A/QtWebSockets 0x103e28000 - 0x103f6bfff org.qt-project.QtNetwork (6.8) <2344b9d0-3d7c-3dba-aac6-da6b1335bd80> /Volumes/VOLUME/*/QtNetwork.framework/Versions/A/QtNetwork 0x104b2c000 - 0x104fbffff org.qt-project.QtCore (6.8) <83b7182b-42a9-35dd-8b5b-7b2e891bcce1> /Volumes/VOLUME/*/QtCore.framework/Versions/A/QtCore 0x10349c000 - 0x1034bbfff com.apple.security.csparser (3.0) <e42bb390-a01c-3bb4-b37b-9c7d282bec92> /System/Library/Frameworks/Security.framework/Versions/A/PlugIns/csparser.bundle/Contents/MacOS/csparser 0x18778c000 - 0x1877d2fff libdispatch.dylib (*) <465565e8-ef8a-3188-80fa-598063c54161> /usr/lib/system/libdispatch.dylib 0x18b06b000 - 0x18b360fff com.apple.CoreServices.CarbonCore (1333) <02a4bca7-031e-3472-a930-f02b4ea13f3a> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x18b361000 - 0x18b3a0ffb com.apple.CoreServicesInternal (505) <4ec74c60-6dee-3835-a203-fedab25c0ab3> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x1879ac000 - 0x187ea2fff com.apple.CoreFoundation (6.9) <1ad672c1-da68-3367-b947-93ae47652366> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x1875ba000 - 0x18763c663 dyld (*) <40bedd20-da23-3b70-a9c2-a1c68a738762> /usr/lib/dyld 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=860.1M resident=0K(0%) swapped_out_or_unallocated=860.1M(100%) Writable regions: Total=932.8M written=289K(0%) resident=289K(0%) swapped_out=0K(0%) unallocated=932.5M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 Kernel Alloc Once 32K 1 MALLOC 923.2M 18 MALLOC guard page 96K 6 STACK GUARD 56.0M 1 Stack 9296K 4 Stack Guard 32K 2 __AUTH 966K 197 __AUTH_CONST 17.1M 344 __DATA 3906K 338 __DATA_CONST 13.2M 357 __DATA_DIRTY 691K 109 __FONT_DATA 2352 1 __LINKEDIT 586.8M 12 __OBJC_RW 2353K 1 __TEXT 273.3M 368 __TPRO_CONST 272K 2 mapped file 31.5M 4 owned unmapped memory 32K 1 page table in kernel 289K 1 shared memory 80K 4 =========== ======= ======= TOTAL 1.9G 1772 ----------- Full Report ----------- {"app_name":"tsports","timestamp":"2024-11-10 17:06:34.00 +0100","app_version":"","slice_uuid":"255224f9-ccba-3824-bbe3-8aa99424a6d4","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 15.0.1 (24A348)","roots_installed":0,"incident_id":"D31FF3A4-5AF6-4A29-BCA8-9139693D6F90","name":"tsports"} { "uptime" : 200000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "Macmini9,1", "coalitionID" : 4919, "osVersion" : { "train" : "macOS 15.0.1", "build" : "24A348", "releaseType" : "User" }, "captureTime" : "2024-11-10 17:06:30.9083 +0100", "codeSigningMonitor" : 1, "incident" : "D31FF3A4-5AF6-4A29-BCA8-9139693D6F90", "pid" : 97965, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-11-10 17:06:30.8914 +0100", "procStartAbsTime" : 4819223996042, "procExitAbsTime" : 4819224383491, "procName" : "tsports", "procPath" : "\/Users\/USER\/*\/tsports", "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "com.apple.Terminal", "crashReporterKey" : "45D4B423-91DF-ED45-CA23-12D05999B925", "responsiblePid" : 82263, "responsibleProc" : "Terminal", "codeSigningID" : "tsports", "codeSigningTeamID" : "", "codeSigningFlags" : 570556929, "codeSigningValidationCategory" : 10, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"CQEJih\/9P\/EkmUD6YQEAVD8IAPkJwACRaNA71QnpAfkpgWH4yQAAtA==","atPC":"IQkA+R\/pAfn9e8Go\/w9f1q6oAJQBNAD5H+kB+QngAJEKEMDSKTFq+A=="}, "bootSessionUUID" : "621D048C-F038-4572-9759-B9F2886939B9", "wakeTime" : 20443, "sleepWakeUUID" : "76BEB25C-C59E-4263-BD80-CEBB51D2180D", "sip" : "enabled", "vmRegionInfo" : "0x110 is not in any region. Bytes before following region: 4343889648\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 102ea8000-102fe4000 [ 1264K] r-x\/r-x SM=COW \/Users\/USER\/*\/tsports", "exception" : {"codes":"0x0000000000000001, 0x0000000000000110","rawCodes":[1,272],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000110"}, "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":97965}, "vmregioninfo" : "0x110 is not in any region. Bytes before following region: 4343889648\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 102ea8000-102fe4000 [ 1264K] r-x\/r-x SM=COW \/Users\/USER\/*\/tsports", "asi" : {"CoreFoundation":["*** multi-threaded process forked ***"],"libsystem_c.dylib":["crashed on child side of fork pre-exec"]}, "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":2041902,"threadState":{"x":[{"value":8254942784,"symbolLocation":0,"symbol":"_dispatch_mgr_q"},{"value":5553275008},{"value":0},{"value":8254942784,"symbolLocation":0,"symbol":"_dispatch_mgr_q"},{"value":6567875108,"symbolLocation":0,"symbol":"_dispatch_mgr_queue_push"},{"value":8254940368,"symbolLocation":48,"symbol":"_OS_dispatch_queue_mgr_vtable"},{"value":5553275008},{"value":0},{"value":8254927648,"symbolLocation":224,"symbol":"_main_thread"},{"value":256},{"value":274877906944},{"value":0},{"value":36028797018963968},{"value":274877906945},{"value":9005549987299328},{"value":9005549987299328},{"value":13488280892229575888,"symbolLocation":13488280883974635568,"symbol":"_OS_dispatch_queue_mgr_vtable"},{"value":7701436846035201600},{"value":0},{"value":5553275008},{"value":5553275248},{"value":8255090688},{"value":8255090688},{"value":6403},{"value":16777244},{"value":0},{"value":3491749389},{"value":0},{"value":8221396992,"symbolLocation":8,"symbol":"VMExtendedAttributesDescription.text"}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6627446632},"cpsr":{"value":1073745920},"fp":{"value":6122978464},"sp":{"value":6122978464},"esr":{"value":2449473606,"description":"(Data Abort) byte write Translation fault"},"pc":{"value":6567875168,"matchesCrashFrame":1},"far":{"value":272}},"queue":"com.apple.main-thread","frames":[{"imageOffset":70240,"symbol":"_dispatch_mgr_queue_push","symbolLocation":60,"imageIndex":11},{"imageOffset":8040,"symbol":"connectToCoreServicesD()","symbolLocation":476,"imageIndex":12},{"imageOffset":7224,"symbol":"getStatus()","symbolLocation":64,"imageIndex":12},{"imageOffset":20676,"symbol":"scCreateSystemServiceVersion","symbolLocation":56,"imageIndex":12},{"imageOffset":20280,"symbol":"FileIDTreeGetCachedPort","symbolLocation":276,"imageIndex":12},{"imageOffset":19624,"symbol":"FSNodeStorageGetAndLockCurrentUniverse","symbolLocation":76,"imageIndex":12},{"imageOffset":19088,"symbol":"FileIDTreeGetAndLockVolumeEntryForDeviceID","symbolLocation":88,"imageIndex":12},{"imageOffset":18680,"symbol":"FSMount::FSMount(unsigned int, FSMountNumberType, int*, unsigned int const*)","symbolLocation":92,"imageIndex":12},{"imageOffset":18516,"symbol":"FSMountPrepare","symbolLocation":76,"imageIndex":12},{"imageOffset":22688,"symbol":"MountInfoPrepare","symbolLocation":68,"imageIndex":13},{"imageOffset":195540,"symbol":"parseAttributeBuffer(__CFAllocator const*, unsigned char const*, unsigned char, attrlist const*, void const*, void**, _FileAttributes*, unsigned int*, unsigned char)","symbolLocation":2616,"imageIndex":13},{"imageOffset":21072,"symbol":"corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**)","symbolLocation":1344,"imageIndex":13},{"imageOffset":19612,"symbol":"prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**)","symbolLocation":460,"imageIndex":13},{"imageOffset":7084,"symbol":"_FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char)","symbolLocation":232,"imageIndex":13},{"imageOffset":325384,"symbol":"CFURLCopyResourcePropertyForKey","symbolLocation":108,"imageIndex":14},{"imageOffset":2164832,"sourceLine":109,"sourceFile":"qfilesystemengine_unix.cpp","symbol":"hasResourcePropertyFlag(QFileSystemMetaData const&, QFileSystemEntry const&, __CFString const*)","imageIndex":9,"symbolLocation":224},{"imageOffset":2158336,"sourceLine":1005,"sourceFile":"qfilesystemengine_unix.cpp","symbol":"QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>)","imageIndex":9,"symbolLocation":1780},{"symbol":"QDirEntryInfo::ensureFilled(QFlags<QFileSystemMetaData::MetaDataFlag>)","inline":true,"imageIndex":9,"imageOffset":267224,"symbolLocation":24,"sourceLine":29,"sourceFile":"qdirentryinfo_p.h"},{"symbol":"QDirEntryInfo::isHidden()","inline":true,"imageIndex":9,"imageOffset":267224,"symbolLocation":24,"sourceLine":114,"sourceFile":"qdirentryinfo_p.h"},{"imageOffset":267224,"sourceLine":506,"sourceFile":"qdirlisting.cpp","symbol":"QDirListingPrivate::matchesFilters(QDirEntryInfo&) const","imageIndex":9,"symbolLocation":328},{"symbol":"QDirListingPrivate::entryMatches(QDirEntryInfo&)","inline":true,"imageIndex":9,"imageOffset":268452,"symbolLocation":12,"sourceLine":306,"sourceFile":"qdirlisting.cpp"},{"imageOffset":268452,"sourceLine":352,"sourceFile":"qdirlisting.cpp","symbol":"QDirListingPrivate::advance()","imageIndex":9,"symbolLocation":688},{"symbol":"QDirListing::next(QDirListing::DirEntry)","inline":true,"imageIndex":9,"imageOffset":271424,"symbolLocation":8,"sourceLine":805,"sourceFile":"qdirlisting.cpp"},{"symbol":"QDirListing::const_iterator::operator++()","inline":true,"imageIndex":9,"imageOffset":271424,"symbolLocation":8,"sourceLine":122,"sourceFile":"qdirlisting.h"},{"imageOffset":271424,"sourceLine":756,"sourceFile":"qdirlisting.cpp","symbol":"QDirListing::begin() const","imageIndex":9,"symbolLocation":140},{"imageOffset":1055788,"sourceLine":314,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoaderPrivate::updateSinglePath(QString const&)","imageIndex":9,"symbolLocation":512},{"imageOffset":1055000,"sourceLine":397,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoader::update()","imageIndex":9,"symbolLocation":260},{"imageOffset":1061568,"sourceLine":458,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoader::QFactoryLoader(char const*, QString const&, Qt::CaseSensitivity)","imageIndex":9,"symbolLocation":192},{"symbol":"(anonymous namespace)::Q_QGS_loader::innerFunction(void*)","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":36,"sourceFile":"qsqldatabase.cpp"},{"symbol":"QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":37,"sourceFile":"qglobalstatic.h"},{"symbol":"QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":36,"sourceFile":"qglobalstatic.h"},{"symbol":"QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::instance()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":80,"sourceLine":100,"sourceFile":"qglobalstatic.h"},{"imageOffset":29868,"sourceLine":82,"sourceFile":"qglobalstatic.h","symbol":"QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::operator()()","imageIndex":2,"symbolLocation":212},{"imageOffset":28960,"sourceLine":489,"sourceFile":"qsqldatabase.cpp","symbol":"QSqlDatabase::drivers()","imageIndex":2,"symbolLocation":72},{"imageOffset":33572,"sourceLine":1135,"sourceFile":"qsqldatabase.cpp","symbol":"QSqlDatabase::isDriverAvailable(QString const&)","imageIndex":2,"symbolLocation":48},{"imageOffset":1088192,"symbol":"TDatabase::init()","symbolLocation":336,"imageIndex":0},{"imageOffset":1091352,"symbol":"TDatabase::first()","symbolLocation":128,"imageIndex":0},{"imageOffset":646648,"symbol":"TUser::TUser()","symbolLocation":152,"imageIndex":0},{"imageOffset":511576,"symbol":"TAuthenticate::TAuthenticate()","symbolLocation":56,"imageIndex":0},{"imageOffset":512952,"symbol":"TAuthenticate::TAuthenticate()","symbolLocation":28,"imageIndex":0},{"imageOffset":45800,"symbol":"TServer::TServer()","symbolLocation":196,"imageIndex":0},{"imageOffset":51588,"symbol":"TServer::TServer()","symbolLocation":28,"imageIndex":0},{"imageOffset":24828,"symbol":"main","symbolLocation":2212,"imageIndex":0},{"imageOffset":25204,"symbol":"start","symbolLocation":2840,"imageIndex":15}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4343889920, "size" : 1294336, "uuid" : "255224f9-ccba-3824-bbe3-8aa99424a6d4", "path" : "\/Users\/USER\/*\/tsports", "name" : "tsports" }, { "source" : "P", "arch" : "arm64", "base" : 4347772928, "size" : 557056, "uuid" : "d6155905-1501-3a5a-a580-7905e267f8c2", "path" : "\/Volumes\/VOLUME\/*\/libssl.3.dylib", "name" : "libssl.3.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4348624896, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtSql", "size" : 196608, "uuid" : "bdc778a8-d4b6-38f9-8707-34bf18f347ab", "path" : "\/Volumes\/VOLUME\/*\/QtSql.framework\/Versions\/A\/QtSql", "name" : "QtSql", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4347379712, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtHttpServer", "size" : 114688, "uuid" : "ecb59bd4-08f8-39de-80a9-7ae3b050f0d5", "path" : "\/Volumes\/VOLUME\/*\/QtHttpServer.framework\/Versions\/A\/QtHttpServer", "name" : "QtHttpServer", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4347084800, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtConcurrent", "size" : 16384, "uuid" : "9e1eed8f-bec6-3c03-b8bc-e722683e0ad4", "path" : "\/Volumes\/VOLUME\/*\/QtConcurrent.framework\/Versions\/A\/QtConcurrent", "name" : "QtConcurrent", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4350672896, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtCore5Compat", "size" : 720896, "uuid" : "30900940-be81-3326-87e1-c1d50942a14b", "path" : "\/Volumes\/VOLUME\/*\/QtCore5Compat.framework\/Versions\/A\/QtCore5Compat", "name" : "QtCore5Compat", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4355833856, "size" : 3080192, "uuid" : "0ef13b00-8944-3a1e-ac18-21753de7eedf", "path" : "\/Volumes\/VOLUME\/*\/libcrypto.3.dylib", "name" : "libcrypto.3.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4349444096, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtWebSockets", "size" : 131072, "uuid" : "6a66caf0-ba09-315f-8e21-c535658cb28d", "path" : "\/Volumes\/VOLUME\/*\/QtWebSockets.framework\/Versions\/A\/QtWebSockets", "name" : "QtWebSockets", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4360142848, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtNetwork", "size" : 1327104, "uuid" : "2344b9d0-3d7c-3dba-aac6-da6b1335bd80", "path" : "\/Volumes\/VOLUME\/*\/QtNetwork.framework\/Versions\/A\/QtNetwork", "name" : "QtNetwork", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4373790720, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtCore", "size" : 4800512, "uuid" : "83b7182b-42a9-35dd-8b5b-7b2e891bcce1", "path" : "\/Volumes\/VOLUME\/*\/QtCore.framework\/Versions\/A\/QtCore", "name" : "QtCore", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64e", "base" : 4350132224, "CFBundleShortVersionString" : "3.0", "CFBundleIdentifier" : "com.apple.security.csparser", "size" : 131072, "uuid" : "e42bb390-a01c-3bb4-b37b-9c7d282bec92", "path" : "\/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/PlugIns\/csparser.bundle\/Contents\/MacOS\/csparser", "name" : "csparser", "CFBundleVersion" : "61439.1.1" }, { "source" : "P", "arch" : "arm64e", "base" : 6567804928, "size" : 290816, "uuid" : "465565e8-ef8a-3188-80fa-598063c54161", "path" : "\/usr\/lib\/system\/libdispatch.dylib", "name" : "libdispatch.dylib" }, { "source" : "P", "arch" : "arm64e", "base" : 6627438592, "CFBundleShortVersionString" : "1333", "CFBundleIdentifier" : "com.apple.CoreServices.CarbonCore", "size" : 3104768, "uuid" : "02a4bca7-031e-3472-a930-f02b4ea13f3a", "path" : "\/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/CarbonCore.framework\/Versions\/A\/CarbonCore", "name" : "CarbonCore", "CFBundleVersion" : "1333" }, { "source" : "P", "arch" : "arm64e", "base" : 6630543360, "CFBundleShortVersionString" : "505", "CFBundleIdentifier" : "com.apple.CoreServicesInternal", "size" : 262140, "uuid" : "4ec74c60-6dee-3835-a203-fedab25c0ab3", "path" : "\/System\/Library\/PrivateFrameworks\/CoreServicesInternal.framework\/Versions\/A\/CoreServicesInternal", "name" : "CoreServicesInternal", "CFBundleVersion" : "505" }, { "source" : "P", "arch" : "arm64e", "base" : 6570033152, "CFBundleShortVersionString" : "6.9", "CFBundleIdentifier" : "com.apple.CoreFoundation", "size" : 5206016, "uuid" : "1ad672c1-da68-3367-b947-93ae47652366", "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation", "name" : "CoreFoundation", "CFBundleVersion" : "3038.1.403" }, { "source" : "P", "arch" : "arm64e", "base" : 6565896192, "size" : 534116, "uuid" : "40bedd20-da23-3b70-a9c2-a1c68a738762", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6565085184, "size" : 4728750080, "uuid" : "a02dcfba-3bda-3ca6-8a42-12f00a4d75d3" }, "vmSummary" : "ReadOnly portion of Libraries: Total=860.1M resident=0K(0%) swapped_out_or_unallocated=860.1M(100%)\nWritable regions: Total=932.8M written=289K(0%) resident=289K(0%) swapped_out=0K(0%) unallocated=932.5M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 32K 1 \nMALLOC 923.2M 18 \nMALLOC guard page 96K 6 \nSTACK GUARD 56.0M 1 \nStack 9296K 4 \nStack Guard 32K 2 \n__AUTH 966K 197 \n__AUTH_CONST 17.1M 344 \n__DATA 3906K 338 \n__DATA_CONST 13.2M 357 \n__DATA_DIRTY 691K 109 \n__FONT_DATA 2352 1 \n__LINKEDIT 586.8M 12 \n__OBJC_RW 2353K 1 \n__TEXT 273.3M 368 \n__TPRO_CONST 272K 2 \nmapped file 31.5M 4 \nowned unmapped memory 32K 1 \npage table in kernel 289K 1 \nshared memory 80K 4 \n=========== ======= ======= \nTOTAL 1.9G 1772 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "logWritingSignature" : "bdc82570667e544b5bc9ba627ffb01018e7da413", "trialInfo" : { "rollouts" : [ { "rolloutId" : "661464ecda55e5192b100804", "factorPackIds" : { }, "deploymentId" : 240000005 }, { "rolloutId" : "632c763c58740028737bfdd2", "factorPackIds" : { "SIRI_DIALOG_ASSETS" : "64a57d23fa6fd41b2353e2ae" }, "deploymentId" : 240000034 } ], "experiments" : [ { "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8", "experimentId" : "6643969b3099cf28e049862f", "deploymentId" : 400000007 } ] } }
-
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
I don't see this message which means it doesn't ever reach the abort().
It doesn't necessarily mean that. It could just as well be that however
MSG_ERROR
is implemented, it writes via some sort of buffered IO, that doesn't get flushed due to the program abnormally exiting. The only way to confirm that at this point and with the available information is to step through the method with a debugger.@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
It doesn't necessarily mean that. It could just as well be that however MSG_ERROR is implemented, it writes via some sort of buffered IO, that doesn't get flushed due to the program abnormally exiting. The only way to confirm that at this point and with the available information is to step through the method with a debugger.
This was developped by me and I use it in all my applications. In case you're interrested how it is implemented look at: terror.h and terror.cpp. This code is well tested and it prints messages into a file or on screen if no file was defined.
BTW: Stepping through with a debugger is difficult, because the program is a server detatching from terminal and is running in the background.
-
@JonB said in QT 6.8.0: QSqlDatabase crashes on macOS:
I suggested you print out QStringList QSqlDatabase::drivers() but you don't seem to have acted on that.
It prints nothing but crashes.
However: MacOS 15.0.1 changed the way core dumps are handled. Finally I found them and this is what I get:------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: tsports [97965] Path: /Users/USER/*/tsports Identifier: tsports Version: ??? Code Type: ARM-64 (Native) Parent Process: launchd [1] Responsible: Terminal [82263] User ID: 501 Date/Time: 2024-11-10 17:06:30.9083 +0100 OS Version: macOS 15.0.1 (24A348) Report Version: 12 Anonymous UUID: 45D4B423-91DF-ED45-CA23-12D05999B925 Sleep/Wake UUID: 76BEB25C-C59E-4263-BD80-CEBB51D2180D Time Awake Since Boot: 200000 seconds Time Since Wake: 20443 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000110 Exception Codes: 0x0000000000000001, 0x0000000000000110 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [97965] VM Region Info: 0x110 is not in any region. Bytes before following region: 4343889648 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 102ea8000-102fe4000 [ 1264K] r-x/r-x SM=COW /Users/USER/*/tsports Application Specific Information: *** multi-threaded process forked *** crashed on child side of fork pre-exec Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libdispatch.dylib 0x18779d260 _dispatch_mgr_queue_push + 60 1 CarbonCore 0x18b06cf68 connectToCoreServicesD() + 476 2 CarbonCore 0x18b06cc38 getStatus() + 64 3 CarbonCore 0x18b0700c4 scCreateSystemServiceVersion + 56 4 CarbonCore 0x18b06ff38 FileIDTreeGetCachedPort + 276 5 CarbonCore 0x18b06fca8 FSNodeStorageGetAndLockCurrentUniverse + 76 6 CarbonCore 0x18b06fa90 FileIDTreeGetAndLockVolumeEntryForDeviceID + 88 7 CarbonCore 0x18b06f8f8 FSMount::FSMount(unsigned int, FSMountNumberType, int*, unsigned int const*) + 92 8 CarbonCore 0x18b06f854 FSMountPrepare + 76 9 CoreServicesInternal 0x18b3668a0 MountInfoPrepare + 68 10 CoreServicesInternal 0x18b390bd4 parseAttributeBuffer(__CFAllocator const*, unsigned char const*, unsigned char, attrlist const*, void const*, void**, _FileAttributes*, unsigned int*, unsigned char) + 2616 11 CoreServicesInternal 0x18b366250 corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 1344 12 CoreServicesInternal 0x18b365c9c prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 460 13 CoreServicesInternal 0x18b362bac _FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 232 14 CoreFoundation 0x1879fb708 CFURLCopyResourcePropertyForKey + 108 15 QtCore 0x104d3c860 hasResourcePropertyFlag(QFileSystemMetaData const&, QFileSystemEntry const&, __CFString const*) + 224 (qfilesystemengine_unix.cpp:109) 16 QtCore 0x104d3af00 QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) + 1780 (qfilesystemengine_unix.cpp:1005) 17 QtCore 0x104b6d3d8 QDirEntryInfo::ensureFilled(QFlags<QFileSystemMetaData::MetaDataFlag>) + 24 (qdirentryinfo_p.h:29) [inlined] 18 QtCore 0x104b6d3d8 QDirEntryInfo::isHidden() + 24 (qdirentryinfo_p.h:114) [inlined] 19 QtCore 0x104b6d3d8 QDirListingPrivate::matchesFilters(QDirEntryInfo&) const + 328 (qdirlisting.cpp:506) 20 QtCore 0x104b6d8a4 QDirListingPrivate::entryMatches(QDirEntryInfo&) + 12 (qdirlisting.cpp:306) [inlined] 21 QtCore 0x104b6d8a4 QDirListingPrivate::advance() + 688 (qdirlisting.cpp:352) 22 QtCore 0x104b6e440 QDirListing::next(QDirListing::DirEntry) + 8 (qdirlisting.cpp:805) [inlined] 23 QtCore 0x104b6e440 QDirListing::const_iterator::operator++() + 8 (qdirlisting.h:122) [inlined] 24 QtCore 0x104b6e440 QDirListing::begin() const + 140 (qdirlisting.cpp:756) 25 QtCore 0x104c2dc2c QFactoryLoaderPrivate::updateSinglePath(QString const&) + 512 (qfactoryloader.cpp:314) 26 QtCore 0x104c2d918 QFactoryLoader::update() + 260 (qfactoryloader.cpp:397) 27 QtCore 0x104c2f2c0 QFactoryLoader::QFactoryLoader(char const*, QString const&, Qt::CaseSensitivity) + 192 (qfactoryloader.cpp:458) 28 QtSql 0x1033334ac (anonymous namespace)::Q_QGS_loader::innerFunction(void*) + 64 (qsqldatabase.cpp:36) [inlined] 29 QtSql 0x1033334ac QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder() + 64 (qglobalstatic.h:37) [inlined] 30 QtSql 0x1033334ac QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder() + 64 (qglobalstatic.h:36) [inlined] 31 QtSql 0x1033334ac QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::instance() + 80 (qglobalstatic.h:100) [inlined] 32 QtSql 0x1033334ac QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::operator()() + 212 (qglobalstatic.h:82) 33 QtSql 0x103333120 QSqlDatabase::drivers() + 72 (qsqldatabase.cpp:489) 34 QtSql 0x103334324 QSqlDatabase::isDriverAvailable(QString const&) + 48 (qsqldatabase.cpp:1135) 35 tsports 0x102fb1ac0 TDatabase::init() + 336 36 tsports 0x102fb2718 TDatabase::first() + 128 37 tsports 0x102f45df8 TUser::TUser() + 152 38 tsports 0x102f24e58 TAuthenticate::TAuthenticate() + 56 39 tsports 0x102f253b8 TAuthenticate::TAuthenticate() + 28 40 tsports 0x102eb32e8 TServer::TServer() + 196 41 tsports 0x102eb4984 TServer::TServer() + 28 42 tsports 0x102eae0fc main + 2212 43 dyld 0x1875c0274 start + 2840 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001ec086e40 x1: 0x000000014b004080 x2: 0x0000000000000000 x3: 0x00000001ec086e40 x4: 0x000000018779d224 x5: 0x00000001ec0864d0 x6: 0x000000014b004080 x7: 0x0000000000000000 x8: 0x00000001ec083320 x9: 0x0000000000000100 x10: 0x0000004000000000 x11: 0x0000000000000000 x12: 0x0080000000000000 x13: 0x0000004000000001 x14: 0x001ffe8000000000 x15: 0x001ffe8000000000 x16: 0xbb300001ec0864d0 x17: 0x6ae10001ec086e40 x18: 0x0000000000000000 x19: 0x000000014b004080 x20: 0x000000014b004170 x21: 0x00000001ec0ab000 x22: 0x00000001ec0ab000 x23: 0x0000000000001903 x24: 0x000000000100001c x25: 0x0000000000000000 x26: 0x00000000d01fde0d x27: 0x0000000000000000 x28: 0x00000001ea089000 fp: 0x000000016cf53ca0 lr: 0x000000018b06cf68 sp: 0x000000016cf53ca0 pc: 0x000000018779d260 cpsr: 0x40001000 far: 0x0000000000000110 esr: 0x92000046 (Data Abort) byte write Translation fault Binary Images: 0x102ea8000 - 0x102fe3fff tsports (*) <255224f9-ccba-3824-bbe3-8aa99424a6d4> /Users/USER/*/tsports 0x10325c000 - 0x1032e3fff libssl.3.dylib (*) <d6155905-1501-3a5a-a580-7905e267f8c2> /Volumes/VOLUME/*/libssl.3.dylib 0x10332c000 - 0x10335bfff org.qt-project.QtSql (6.8) <bdc778a8-d4b6-38f9-8707-34bf18f347ab> /Volumes/VOLUME/*/QtSql.framework/Versions/A/QtSql 0x1031fc000 - 0x103217fff org.qt-project.QtHttpServer (6.8) <ecb59bd4-08f8-39de-80a9-7ae3b050f0d5> /Volumes/VOLUME/*/QtHttpServer.framework/Versions/A/QtHttpServer 0x1031b4000 - 0x1031b7fff org.qt-project.QtConcurrent (6.8) <9e1eed8f-bec6-3c03-b8bc-e722683e0ad4> /Volumes/VOLUME/*/QtConcurrent.framework/Versions/A/QtConcurrent 0x103520000 - 0x1035cffff org.qt-project.QtCore5Compat (6.8) <30900940-be81-3326-87e1-c1d50942a14b> /Volumes/VOLUME/*/QtCore5Compat.framework/Versions/A/QtCore5Compat 0x103a0c000 - 0x103cfbfff libcrypto.3.dylib (*) <0ef13b00-8944-3a1e-ac18-21753de7eedf> /Volumes/VOLUME/*/libcrypto.3.dylib 0x1033f4000 - 0x103413fff org.qt-project.QtWebSockets (6.8) <6a66caf0-ba09-315f-8e21-c535658cb28d> /Volumes/VOLUME/*/QtWebSockets.framework/Versions/A/QtWebSockets 0x103e28000 - 0x103f6bfff org.qt-project.QtNetwork (6.8) <2344b9d0-3d7c-3dba-aac6-da6b1335bd80> /Volumes/VOLUME/*/QtNetwork.framework/Versions/A/QtNetwork 0x104b2c000 - 0x104fbffff org.qt-project.QtCore (6.8) <83b7182b-42a9-35dd-8b5b-7b2e891bcce1> /Volumes/VOLUME/*/QtCore.framework/Versions/A/QtCore 0x10349c000 - 0x1034bbfff com.apple.security.csparser (3.0) <e42bb390-a01c-3bb4-b37b-9c7d282bec92> /System/Library/Frameworks/Security.framework/Versions/A/PlugIns/csparser.bundle/Contents/MacOS/csparser 0x18778c000 - 0x1877d2fff libdispatch.dylib (*) <465565e8-ef8a-3188-80fa-598063c54161> /usr/lib/system/libdispatch.dylib 0x18b06b000 - 0x18b360fff com.apple.CoreServices.CarbonCore (1333) <02a4bca7-031e-3472-a930-f02b4ea13f3a> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x18b361000 - 0x18b3a0ffb com.apple.CoreServicesInternal (505) <4ec74c60-6dee-3835-a203-fedab25c0ab3> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x1879ac000 - 0x187ea2fff com.apple.CoreFoundation (6.9) <1ad672c1-da68-3367-b947-93ae47652366> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x1875ba000 - 0x18763c663 dyld (*) <40bedd20-da23-3b70-a9c2-a1c68a738762> /usr/lib/dyld 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=860.1M resident=0K(0%) swapped_out_or_unallocated=860.1M(100%) Writable regions: Total=932.8M written=289K(0%) resident=289K(0%) swapped_out=0K(0%) unallocated=932.5M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 Kernel Alloc Once 32K 1 MALLOC 923.2M 18 MALLOC guard page 96K 6 STACK GUARD 56.0M 1 Stack 9296K 4 Stack Guard 32K 2 __AUTH 966K 197 __AUTH_CONST 17.1M 344 __DATA 3906K 338 __DATA_CONST 13.2M 357 __DATA_DIRTY 691K 109 __FONT_DATA 2352 1 __LINKEDIT 586.8M 12 __OBJC_RW 2353K 1 __TEXT 273.3M 368 __TPRO_CONST 272K 2 mapped file 31.5M 4 owned unmapped memory 32K 1 page table in kernel 289K 1 shared memory 80K 4 =========== ======= ======= TOTAL 1.9G 1772 ----------- Full Report ----------- {"app_name":"tsports","timestamp":"2024-11-10 17:06:34.00 +0100","app_version":"","slice_uuid":"255224f9-ccba-3824-bbe3-8aa99424a6d4","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 15.0.1 (24A348)","roots_installed":0,"incident_id":"D31FF3A4-5AF6-4A29-BCA8-9139693D6F90","name":"tsports"} { "uptime" : 200000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "Macmini9,1", "coalitionID" : 4919, "osVersion" : { "train" : "macOS 15.0.1", "build" : "24A348", "releaseType" : "User" }, "captureTime" : "2024-11-10 17:06:30.9083 +0100", "codeSigningMonitor" : 1, "incident" : "D31FF3A4-5AF6-4A29-BCA8-9139693D6F90", "pid" : 97965, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-11-10 17:06:30.8914 +0100", "procStartAbsTime" : 4819223996042, "procExitAbsTime" : 4819224383491, "procName" : "tsports", "procPath" : "\/Users\/USER\/*\/tsports", "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "com.apple.Terminal", "crashReporterKey" : "45D4B423-91DF-ED45-CA23-12D05999B925", "responsiblePid" : 82263, "responsibleProc" : "Terminal", "codeSigningID" : "tsports", "codeSigningTeamID" : "", "codeSigningFlags" : 570556929, "codeSigningValidationCategory" : 10, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"CQEJih\/9P\/EkmUD6YQEAVD8IAPkJwACRaNA71QnpAfkpgWH4yQAAtA==","atPC":"IQkA+R\/pAfn9e8Go\/w9f1q6oAJQBNAD5H+kB+QngAJEKEMDSKTFq+A=="}, "bootSessionUUID" : "621D048C-F038-4572-9759-B9F2886939B9", "wakeTime" : 20443, "sleepWakeUUID" : "76BEB25C-C59E-4263-BD80-CEBB51D2180D", "sip" : "enabled", "vmRegionInfo" : "0x110 is not in any region. Bytes before following region: 4343889648\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 102ea8000-102fe4000 [ 1264K] r-x\/r-x SM=COW \/Users\/USER\/*\/tsports", "exception" : {"codes":"0x0000000000000001, 0x0000000000000110","rawCodes":[1,272],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000110"}, "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":97965}, "vmregioninfo" : "0x110 is not in any region. Bytes before following region: 4343889648\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n __TEXT 102ea8000-102fe4000 [ 1264K] r-x\/r-x SM=COW \/Users\/USER\/*\/tsports", "asi" : {"CoreFoundation":["*** multi-threaded process forked ***"],"libsystem_c.dylib":["crashed on child side of fork pre-exec"]}, "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":2041902,"threadState":{"x":[{"value":8254942784,"symbolLocation":0,"symbol":"_dispatch_mgr_q"},{"value":5553275008},{"value":0},{"value":8254942784,"symbolLocation":0,"symbol":"_dispatch_mgr_q"},{"value":6567875108,"symbolLocation":0,"symbol":"_dispatch_mgr_queue_push"},{"value":8254940368,"symbolLocation":48,"symbol":"_OS_dispatch_queue_mgr_vtable"},{"value":5553275008},{"value":0},{"value":8254927648,"symbolLocation":224,"symbol":"_main_thread"},{"value":256},{"value":274877906944},{"value":0},{"value":36028797018963968},{"value":274877906945},{"value":9005549987299328},{"value":9005549987299328},{"value":13488280892229575888,"symbolLocation":13488280883974635568,"symbol":"_OS_dispatch_queue_mgr_vtable"},{"value":7701436846035201600},{"value":0},{"value":5553275008},{"value":5553275248},{"value":8255090688},{"value":8255090688},{"value":6403},{"value":16777244},{"value":0},{"value":3491749389},{"value":0},{"value":8221396992,"symbolLocation":8,"symbol":"VMExtendedAttributesDescription.text"}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6627446632},"cpsr":{"value":1073745920},"fp":{"value":6122978464},"sp":{"value":6122978464},"esr":{"value":2449473606,"description":"(Data Abort) byte write Translation fault"},"pc":{"value":6567875168,"matchesCrashFrame":1},"far":{"value":272}},"queue":"com.apple.main-thread","frames":[{"imageOffset":70240,"symbol":"_dispatch_mgr_queue_push","symbolLocation":60,"imageIndex":11},{"imageOffset":8040,"symbol":"connectToCoreServicesD()","symbolLocation":476,"imageIndex":12},{"imageOffset":7224,"symbol":"getStatus()","symbolLocation":64,"imageIndex":12},{"imageOffset":20676,"symbol":"scCreateSystemServiceVersion","symbolLocation":56,"imageIndex":12},{"imageOffset":20280,"symbol":"FileIDTreeGetCachedPort","symbolLocation":276,"imageIndex":12},{"imageOffset":19624,"symbol":"FSNodeStorageGetAndLockCurrentUniverse","symbolLocation":76,"imageIndex":12},{"imageOffset":19088,"symbol":"FileIDTreeGetAndLockVolumeEntryForDeviceID","symbolLocation":88,"imageIndex":12},{"imageOffset":18680,"symbol":"FSMount::FSMount(unsigned int, FSMountNumberType, int*, unsigned int const*)","symbolLocation":92,"imageIndex":12},{"imageOffset":18516,"symbol":"FSMountPrepare","symbolLocation":76,"imageIndex":12},{"imageOffset":22688,"symbol":"MountInfoPrepare","symbolLocation":68,"imageIndex":13},{"imageOffset":195540,"symbol":"parseAttributeBuffer(__CFAllocator const*, unsigned char const*, unsigned char, attrlist const*, void const*, void**, _FileAttributes*, unsigned int*, unsigned char)","symbolLocation":2616,"imageIndex":13},{"imageOffset":21072,"symbol":"corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**)","symbolLocation":1344,"imageIndex":13},{"imageOffset":19612,"symbol":"prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**)","symbolLocation":460,"imageIndex":13},{"imageOffset":7084,"symbol":"_FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char)","symbolLocation":232,"imageIndex":13},{"imageOffset":325384,"symbol":"CFURLCopyResourcePropertyForKey","symbolLocation":108,"imageIndex":14},{"imageOffset":2164832,"sourceLine":109,"sourceFile":"qfilesystemengine_unix.cpp","symbol":"hasResourcePropertyFlag(QFileSystemMetaData const&, QFileSystemEntry const&, __CFString const*)","imageIndex":9,"symbolLocation":224},{"imageOffset":2158336,"sourceLine":1005,"sourceFile":"qfilesystemengine_unix.cpp","symbol":"QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>)","imageIndex":9,"symbolLocation":1780},{"symbol":"QDirEntryInfo::ensureFilled(QFlags<QFileSystemMetaData::MetaDataFlag>)","inline":true,"imageIndex":9,"imageOffset":267224,"symbolLocation":24,"sourceLine":29,"sourceFile":"qdirentryinfo_p.h"},{"symbol":"QDirEntryInfo::isHidden()","inline":true,"imageIndex":9,"imageOffset":267224,"symbolLocation":24,"sourceLine":114,"sourceFile":"qdirentryinfo_p.h"},{"imageOffset":267224,"sourceLine":506,"sourceFile":"qdirlisting.cpp","symbol":"QDirListingPrivate::matchesFilters(QDirEntryInfo&) const","imageIndex":9,"symbolLocation":328},{"symbol":"QDirListingPrivate::entryMatches(QDirEntryInfo&)","inline":true,"imageIndex":9,"imageOffset":268452,"symbolLocation":12,"sourceLine":306,"sourceFile":"qdirlisting.cpp"},{"imageOffset":268452,"sourceLine":352,"sourceFile":"qdirlisting.cpp","symbol":"QDirListingPrivate::advance()","imageIndex":9,"symbolLocation":688},{"symbol":"QDirListing::next(QDirListing::DirEntry)","inline":true,"imageIndex":9,"imageOffset":271424,"symbolLocation":8,"sourceLine":805,"sourceFile":"qdirlisting.cpp"},{"symbol":"QDirListing::const_iterator::operator++()","inline":true,"imageIndex":9,"imageOffset":271424,"symbolLocation":8,"sourceLine":122,"sourceFile":"qdirlisting.h"},{"imageOffset":271424,"sourceLine":756,"sourceFile":"qdirlisting.cpp","symbol":"QDirListing::begin() const","imageIndex":9,"symbolLocation":140},{"imageOffset":1055788,"sourceLine":314,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoaderPrivate::updateSinglePath(QString const&)","imageIndex":9,"symbolLocation":512},{"imageOffset":1055000,"sourceLine":397,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoader::update()","imageIndex":9,"symbolLocation":260},{"imageOffset":1061568,"sourceLine":458,"sourceFile":"qfactoryloader.cpp","symbol":"QFactoryLoader::QFactoryLoader(char const*, QString const&, Qt::CaseSensitivity)","imageIndex":9,"symbolLocation":192},{"symbol":"(anonymous namespace)::Q_QGS_loader::innerFunction(void*)","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":36,"sourceFile":"qsqldatabase.cpp"},{"symbol":"QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":37,"sourceFile":"qglobalstatic.h"},{"symbol":"QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>::Holder()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":64,"sourceLine":36,"sourceFile":"qglobalstatic.h"},{"symbol":"QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::instance()","inline":true,"imageIndex":2,"imageOffset":29868,"symbolLocation":80,"sourceLine":100,"sourceFile":"qglobalstatic.h"},{"imageOffset":29868,"sourceLine":82,"sourceFile":"qglobalstatic.h","symbol":"QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_loader>>::operator()()","imageIndex":2,"symbolLocation":212},{"imageOffset":28960,"sourceLine":489,"sourceFile":"qsqldatabase.cpp","symbol":"QSqlDatabase::drivers()","imageIndex":2,"symbolLocation":72},{"imageOffset":33572,"sourceLine":1135,"sourceFile":"qsqldatabase.cpp","symbol":"QSqlDatabase::isDriverAvailable(QString const&)","imageIndex":2,"symbolLocation":48},{"imageOffset":1088192,"symbol":"TDatabase::init()","symbolLocation":336,"imageIndex":0},{"imageOffset":1091352,"symbol":"TDatabase::first()","symbolLocation":128,"imageIndex":0},{"imageOffset":646648,"symbol":"TUser::TUser()","symbolLocation":152,"imageIndex":0},{"imageOffset":511576,"symbol":"TAuthenticate::TAuthenticate()","symbolLocation":56,"imageIndex":0},{"imageOffset":512952,"symbol":"TAuthenticate::TAuthenticate()","symbolLocation":28,"imageIndex":0},{"imageOffset":45800,"symbol":"TServer::TServer()","symbolLocation":196,"imageIndex":0},{"imageOffset":51588,"symbol":"TServer::TServer()","symbolLocation":28,"imageIndex":0},{"imageOffset":24828,"symbol":"main","symbolLocation":2212,"imageIndex":0},{"imageOffset":25204,"symbol":"start","symbolLocation":2840,"imageIndex":15}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4343889920, "size" : 1294336, "uuid" : "255224f9-ccba-3824-bbe3-8aa99424a6d4", "path" : "\/Users\/USER\/*\/tsports", "name" : "tsports" }, { "source" : "P", "arch" : "arm64", "base" : 4347772928, "size" : 557056, "uuid" : "d6155905-1501-3a5a-a580-7905e267f8c2", "path" : "\/Volumes\/VOLUME\/*\/libssl.3.dylib", "name" : "libssl.3.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4348624896, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtSql", "size" : 196608, "uuid" : "bdc778a8-d4b6-38f9-8707-34bf18f347ab", "path" : "\/Volumes\/VOLUME\/*\/QtSql.framework\/Versions\/A\/QtSql", "name" : "QtSql", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4347379712, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtHttpServer", "size" : 114688, "uuid" : "ecb59bd4-08f8-39de-80a9-7ae3b050f0d5", "path" : "\/Volumes\/VOLUME\/*\/QtHttpServer.framework\/Versions\/A\/QtHttpServer", "name" : "QtHttpServer", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4347084800, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtConcurrent", "size" : 16384, "uuid" : "9e1eed8f-bec6-3c03-b8bc-e722683e0ad4", "path" : "\/Volumes\/VOLUME\/*\/QtConcurrent.framework\/Versions\/A\/QtConcurrent", "name" : "QtConcurrent", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4350672896, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtCore5Compat", "size" : 720896, "uuid" : "30900940-be81-3326-87e1-c1d50942a14b", "path" : "\/Volumes\/VOLUME\/*\/QtCore5Compat.framework\/Versions\/A\/QtCore5Compat", "name" : "QtCore5Compat", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4355833856, "size" : 3080192, "uuid" : "0ef13b00-8944-3a1e-ac18-21753de7eedf", "path" : "\/Volumes\/VOLUME\/*\/libcrypto.3.dylib", "name" : "libcrypto.3.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4349444096, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtWebSockets", "size" : 131072, "uuid" : "6a66caf0-ba09-315f-8e21-c535658cb28d", "path" : "\/Volumes\/VOLUME\/*\/QtWebSockets.framework\/Versions\/A\/QtWebSockets", "name" : "QtWebSockets", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4360142848, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtNetwork", "size" : 1327104, "uuid" : "2344b9d0-3d7c-3dba-aac6-da6b1335bd80", "path" : "\/Volumes\/VOLUME\/*\/QtNetwork.framework\/Versions\/A\/QtNetwork", "name" : "QtNetwork", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64", "base" : 4373790720, "CFBundleShortVersionString" : "6.8", "CFBundleIdentifier" : "org.qt-project.QtCore", "size" : 4800512, "uuid" : "83b7182b-42a9-35dd-8b5b-7b2e891bcce1", "path" : "\/Volumes\/VOLUME\/*\/QtCore.framework\/Versions\/A\/QtCore", "name" : "QtCore", "CFBundleVersion" : "6.8.0" }, { "source" : "P", "arch" : "arm64e", "base" : 4350132224, "CFBundleShortVersionString" : "3.0", "CFBundleIdentifier" : "com.apple.security.csparser", "size" : 131072, "uuid" : "e42bb390-a01c-3bb4-b37b-9c7d282bec92", "path" : "\/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/PlugIns\/csparser.bundle\/Contents\/MacOS\/csparser", "name" : "csparser", "CFBundleVersion" : "61439.1.1" }, { "source" : "P", "arch" : "arm64e", "base" : 6567804928, "size" : 290816, "uuid" : "465565e8-ef8a-3188-80fa-598063c54161", "path" : "\/usr\/lib\/system\/libdispatch.dylib", "name" : "libdispatch.dylib" }, { "source" : "P", "arch" : "arm64e", "base" : 6627438592, "CFBundleShortVersionString" : "1333", "CFBundleIdentifier" : "com.apple.CoreServices.CarbonCore", "size" : 3104768, "uuid" : "02a4bca7-031e-3472-a930-f02b4ea13f3a", "path" : "\/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/CarbonCore.framework\/Versions\/A\/CarbonCore", "name" : "CarbonCore", "CFBundleVersion" : "1333" }, { "source" : "P", "arch" : "arm64e", "base" : 6630543360, "CFBundleShortVersionString" : "505", "CFBundleIdentifier" : "com.apple.CoreServicesInternal", "size" : 262140, "uuid" : "4ec74c60-6dee-3835-a203-fedab25c0ab3", "path" : "\/System\/Library\/PrivateFrameworks\/CoreServicesInternal.framework\/Versions\/A\/CoreServicesInternal", "name" : "CoreServicesInternal", "CFBundleVersion" : "505" }, { "source" : "P", "arch" : "arm64e", "base" : 6570033152, "CFBundleShortVersionString" : "6.9", "CFBundleIdentifier" : "com.apple.CoreFoundation", "size" : 5206016, "uuid" : "1ad672c1-da68-3367-b947-93ae47652366", "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation", "name" : "CoreFoundation", "CFBundleVersion" : "3038.1.403" }, { "source" : "P", "arch" : "arm64e", "base" : 6565896192, "size" : 534116, "uuid" : "40bedd20-da23-3b70-a9c2-a1c68a738762", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6565085184, "size" : 4728750080, "uuid" : "a02dcfba-3bda-3ca6-8a42-12f00a4d75d3" }, "vmSummary" : "ReadOnly portion of Libraries: Total=860.1M resident=0K(0%) swapped_out_or_unallocated=860.1M(100%)\nWritable regions: Total=932.8M written=289K(0%) resident=289K(0%) swapped_out=0K(0%) unallocated=932.5M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 32K 1 \nMALLOC 923.2M 18 \nMALLOC guard page 96K 6 \nSTACK GUARD 56.0M 1 \nStack 9296K 4 \nStack Guard 32K 2 \n__AUTH 966K 197 \n__AUTH_CONST 17.1M 344 \n__DATA 3906K 338 \n__DATA_CONST 13.2M 357 \n__DATA_DIRTY 691K 109 \n__FONT_DATA 2352 1 \n__LINKEDIT 586.8M 12 \n__OBJC_RW 2353K 1 \n__TEXT 273.3M 368 \n__TPRO_CONST 272K 2 \nmapped file 31.5M 4 \nowned unmapped memory 32K 1 \npage table in kernel 289K 1 \nshared memory 80K 4 \n=========== ======= ======= \nTOTAL 1.9G 1772 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "logWritingSignature" : "bdc82570667e544b5bc9ba627ffb01018e7da413", "trialInfo" : { "rollouts" : [ { "rolloutId" : "661464ecda55e5192b100804", "factorPackIds" : { }, "deploymentId" : 240000005 }, { "rolloutId" : "632c763c58740028737bfdd2", "factorPackIds" : { "SIRI_DIALOG_ASSETS" : "64a57d23fa6fd41b2353e2ae" }, "deploymentId" : 240000034 } ], "experiments" : [ { "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8", "experimentId" : "6643969b3099cf28e049862f", "deploymentId" : 400000007 } ] } }
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
However: MacOS 15.0.1 changed the way core dumps are handled. Finally I found them and this is what I get:
I forget that I don't know how Macs might work! But when this happens from a program in the debugger doesn't the debugger at least tell you that the program has "terminated" or "is no longer running"? Else as you say you have absolutely no way of knowing something has happened.
15 QtCore 0x104d3c860 hasResourcePropertyFlag(QFileSystemMetaData const&, QFileSystemEntry const&, __CFString const*) + 224 (qfilesystemengine_unix.cpp:109)
You will have to wait for someone to suggest how this call from Qt can crash. Somewhere in
CarbonCore
. -
@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
It doesn't necessarily mean that. It could just as well be that however MSG_ERROR is implemented, it writes via some sort of buffered IO, that doesn't get flushed due to the program abnormally exiting. The only way to confirm that at this point and with the available information is to step through the method with a debugger.
This was developped by me and I use it in all my applications. In case you're interrested how it is implemented look at: terror.h and terror.cpp. This code is well tested and it prints messages into a file or on screen if no file was defined.
BTW: Stepping through with a debugger is difficult, because the program is a server detatching from terminal and is running in the background.
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
BTW: Stepping through with a debugger is difficult, because the program is a server detatching from terminal and is running in the background.
No problem, you can attach to it after it started with
lldb
(since you control the source, you can add a sleep in the start ofmain
to give yourself enough time to find out the PID, attach to it, and set a breakpoint).Finally I found them and this is what I get:
Hmm, this is tricky. The eventual crash is in Grand Central Dispatch while trying to post a message to the main thread. That would perhaps suggest that it expects the main event loop to be running at that point. Though it really shouldn't require it - I know for a fact that plugins can be used before the
QCoreApplication::exec
call, even on macOS.The path that leads to the crash is the Qt plugin loader iterating over the plugin directory, and specifically trying to determine if a file is hidden through a macOS only code path. The
FSMountPrepare
call in the path is somewhat strange, it is as if the Qt installation is on some sort of special filesystem? A disk image maybe, or an external drive? I don't know the internals of Core Foundation to anything like that level.I would first try to postpone the creation of the database connection to when the event loop has started by a single-shot timer and see if it helped.
-
@TheoSys said in QT 6.8.0: QSqlDatabase crashes on macOS:
BTW: Stepping through with a debugger is difficult, because the program is a server detatching from terminal and is running in the background.
No problem, you can attach to it after it started with
lldb
(since you control the source, you can add a sleep in the start ofmain
to give yourself enough time to find out the PID, attach to it, and set a breakpoint).Finally I found them and this is what I get:
Hmm, this is tricky. The eventual crash is in Grand Central Dispatch while trying to post a message to the main thread. That would perhaps suggest that it expects the main event loop to be running at that point. Though it really shouldn't require it - I know for a fact that plugins can be used before the
QCoreApplication::exec
call, even on macOS.The path that leads to the crash is the Qt plugin loader iterating over the plugin directory, and specifically trying to determine if a file is hidden through a macOS only code path. The
FSMountPrepare
call in the path is somewhat strange, it is as if the Qt installation is on some sort of special filesystem? A disk image maybe, or an external drive? I don't know the internals of Core Foundation to anything like that level.I would first try to postpone the creation of the database connection to when the event loop has started by a single-shot timer and see if it helped.
@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
I would first try to postpone the creation of the database connection to when the event loop has started by a single-shot timer and see if it helped.
QSqlDatabase has no such a requirement and it's clearly visible that this is not a QSql problem.
My best guess is that the filesystem in there is screwed up. Simply create a QDirListing and iterate over the Qt dir and I'm pretty sure it crashes as well. It might not crash for other directories. -
@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
I would first try to postpone the creation of the database connection to when the event loop has started by a single-shot timer and see if it helped.
QSqlDatabase has no such a requirement and it's clearly visible that this is not a QSql problem.
My best guess is that the filesystem in there is screwed up. Simply create a QDirListing and iterate over the Qt dir and I'm pretty sure it crashes as well. It might not crash for other directories.@Christian-Ehrlicher Yeah, I know that there is no such requirement. It was just a suggestion to confirm that this is the issue.
Also, the core dump shows that the QtSql framework bundle is in
/Volumes/VOLUME/*/QtSql.framework/Versions/A/QtSql
, so it further suggests that the Qt installation is on some sort of external media or other such unusual filesystem that needs auto-mounting (which in turn is what requires the main loop running, to contact some system daemon to do so). -
@Christian-Ehrlicher Yeah, I know that there is no such requirement. It was just a suggestion to confirm that this is the issue.
Also, the core dump shows that the QtSql framework bundle is in
/Volumes/VOLUME/*/QtSql.framework/Versions/A/QtSql
, so it further suggests that the Qt installation is on some sort of external media or other such unusual filesystem that needs auto-mounting (which in turn is what requires the main loop running, to contact some system daemon to do so).@IgKh said in QT 6.8.0: QSqlDatabase crashes on macOS:
Also, the core dump shows that the QtSql framework bundle is in /Volumes/VOLUME/*/QtSql.framework/Versions/A/QtSql, so it further suggests that the Qt installation is on some sort of external media or other such unusual filesystem that needs auto-mounting (which in turn is what requires the main loop running, to contact some system daemon to do so).
This was the right hint for me. In fact the Qt framework is on an external disk. It is necessary to explicitely allow an application to access such a disk. A normal application would display a short dialog box and ask for permission. In my case this doesn't work. As I mentioned already above, the application is a daemon running in the background and has no graphical surface. Because of this it can't ask for permission. And this is the real problem.
I tried to overcome this and there are a few possibilities. One is to install the application on the main disk and start it from there. This requires all libraries to be part of the bundle. Another possibility (not tried yet) is to create a special configuration file which allows the access.
On macOS 15 all applications are running in a sandbox. Inside this sandbox the application can do whatever it want. But it has no rights to access files outside of the sandbox without explicit permission. You can find the details at: https://developer.apple.com/documentation/security/accessing-files-from-the-macos-app-sandbox.A.T.
-