I've compiled qgis from source, and when I call qgis_mapserv.fcgi in my browser with REQUEST=GetProjectSettings (and my map file set via map=) is returns the XML correctly.
But if I then try to actually view a map, it seg faults
qgiswebclient.html?map=/var/www/html/testmap.qgs
mod_fcgid: error reading data, FastCGI server closed connection, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs
Premature end of script headers: qgis_mapserv.fcgi, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs
mod_fcgid: process /var/www/cgi-bin/qgis_mapserv.fcgi(27652) exit(communication error), get unexpected signal 11
kernel: qgis_mapserv.fc[27692]: segfault at 0 ip 000000000043dc02 sp 00007fffa9967bf0 error 4 in qgis_mapserv.fcgi[400000+104000]
Actually, it works fine with the helloworld.qgs file supplied with QGIS. The main difference I can see is that my qgs file uses some ECW files. I've made sure that qgis was compiled with ECW support, but I wonder if that's the problem.
Any ideas on how I can discover what is causing the seg fault?
UPDATE:
Running the mapserv CGI through GDB:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4
(gdb) bt
#0 0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4
#1 0x000000000044c2a3 in QHash<QString, QHashDummyValue>::findNode (this=0x87eac0, akey=..., ahp=0x0) at /usr/include/QtCore/qhash.h:875
#2 0x0000000000477b92 in QHash<QString, QHashDummyValue>::contains (this=0x87eac0, akey=...) at /usr/include/QtCore/qhash.h:867
#3 0x0000000000475797 in QSet<QString>::contains (this=0x87eac0, value=...) at /usr/include/QtCore/qset.h:86
#4 0x000000000045cc7e in QgsProjectParser::mapLayerFromStyle (this=0x87e9e0, lName=..., styleName=..., useCache=true) at /root/qgis/qgis-2.0.1/src/mapserver/qgsprojectparser.cpp:1365
#5 0x00000000004ae4a0 in QgsWMSServer::applyOpacities (this=0x82d4d0, layerList=..., vectorRenderers=..., rasterRenderers=..., labelTransparencies=..., labelBufferTransparencies=...)
at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:2045
#6 0x00000000004a2363 in QgsWMSServer::getMap (this=0x82d4d0) at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:674
#7 0x000000000043eb60 in main (argc=1, argv=0x7fffffffe5a8) at /root/qgis/qgis-2.0.1/src/mapserver/qgis_map_serv.cpp:533