1

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
3
  • 1
    Unless you have a licence you shouldn't be building QGIS server with ECW support. Desktop you can but not server.
    – Nathan W
    Commented Oct 2, 2013 at 23:16
  • I have the same problem with qgis-mapserver version 2.X Qgis Desktop works well with ECW but not qgis-mapserver (not supported file in Apache error logs). Can you provide more clarification on the issue of the license (url, ...). I thought the use of the library (ERDAS_ECWJP2_SDK-5.0) was open for viewing? And, in addition, qgis-server must use the same gdal librarie that qgis desktop (QGIS desktop and server are all 2 installed on my computer (ubuntu 12.10). This is what I do not understand. Thank you
    – zian974
    Commented Nov 6, 2013 at 5:10
  • related question with answer: gis.stackexchange.com/questions/76576/…
    – underdark
    Commented Nov 6, 2013 at 16:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.