Qt4.3.3 crashs with -system-sqlite

Jochen Küpper jochen at fhi-berlin.mpg.de
Sat Jan 5 04:40:48 PST 2008


Dear MacPort users,

this is an Email to qt-interest due to problems of sqlite support in  
Qt4 using macPorts' sqlite3 port. See the end for macPorts-specific  
questions, please.

On 05.01.2008, at 10:46, Dimitri wrote:

>> I am the MacPorts (www.macports.org) maintainer of Qt4 for Mac OS X.
>
> I understand this MacPort is a binary package for MacOS made from a  
> vanilla Qt/Mac source package. Is that correct?

Yes.
However, we do (yet) not distribute binary packages but "recipes" to  
build them on the destination machine.
When executed the qt4-mac Portfile (recipe) downloads the source from  
TrollTech and builds it..

> By the way, you shouldn't have to force:
> 	-largefile
> 	-stl
>
> You definitely shouldn't need:
> 	-no-nis
> 	-no-cups
> These are Qt/X11 only.

Okay, but thet should not hurd, I guess.

>> We are having some problems with sqlite support when using the  
>> system-sqlite (sqlite 3.5.4), i.e., calls to sqlite3_set_auxdata  
>> fail (confirmed, for example, for sqliteman and the books demo of  
>> Qt4).
>> [...]
>> Starting the books demo gives the following backtrace:
>> [...]
>> Exception Type:  EXC_BAD_ACCESS (SIGBUS)
>> Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000003d
>> Crashed Thread:  0
>> Thread 0 Crashed:
>> 0   libsqlite3.0.dylib                0x95f0a56e  
>> sqlite3_set_auxdata + 6062
>> 1   libsqlite3.0.dylib                0x95f380b2  
>> sqlite3RegisterBuiltinFunctions + 178
>> 2   libsqlite3.0.dylib                0x010d2f41 openDatabase + 961
>> 3   libsqlite3.0.dylib                0x010d3033 sqlite3_open16 + 131
>> 4   libqsqlite.dylib                  0x010a6124 [...]
>
> This could as well be an issue with SQLite. It would be interesting  
> to see how the system SQLite library itself has been built.

It's build using this Portfile
   http://trac.macports.org/projects/macports/browser/trunk/dports/databases/sqlite3/Portfile

> What are the arguments passed to sqlite3_open16? It would be worth  
> writing a non-Qt program and passing the same arguments to  
> sqlite3_open16. Does it also crash?

For the books example this should be the call from within Qt's

bool QSQLiteDriver::open(const QString & db, const QString &, const  
QString &, const QString &, int, const QString &conOpts)

which is this:

     if (sqlite3_open16(db.constData(), &d->access) == SQLITE_OK) {


We get there from books.app

    QSqlError initDb()

which contains

     QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");

...


MacPorts question: Are people successfully using MacPorts' sqlite3  
port? Are you using the functions in question?
   sqlite3_open16
   sqlite3_set_auxdata

Are there any known issues with these functions on Mac OS X or in  
MacPorts?

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll




More information about the macports-users mailing list