Opened 13 years ago

Last modified 13 years ago

#3691 new defect

swf getshape and getresultshape

Reported by: assefa Owned by: assefa
Priority: normal Milestone: 5.6.6 release
Component: Output-SWF Version: 5.6
Severity: normal Keywords:
Cc: laurent.baey@…

Description

Reported on the mailing list:

Hello

I upgraded from 5.2 to 5.6.6.

When drawing the labels with the SWF-MULTIPLE driver, I get the error : httpd2-prefork: mappostgis.c:1882: msPostGISLayerResultsGetShape: Assertion `layer->layerinfo != ((void *)0)' failed.

If I get it right, we're trying to get info from Postgis, but the layer is closed. Therefore, msPostGISLayerResultGetShape complains that layer->layerinfo is null.

It happens when the msDrawStartShapeUsingIdxSWF function is called in msDrawLabelCacheSWF.

By adding a msDebug call, I can confirm in the ms_error log the layer is closed : [Tue Feb 15 19:01:04 2011].858201 msPostGISReadShape: [type] "village" [Tue Feb 15 19:01:04 2011].858206 msPostGISReadShape: [name] "Kesztölc" [Tue Feb 15 19:01:04 2011].858280 msPostGISLayerNextShape called. [Tue Feb 15 19:01:04 2011].858290 msPostGISLayerFreeItemInfo called. [Tue Feb 15 19:01:04 2011].858297 msPostGISLayerClose called: the_geom FROM hun_places [Tue Feb 15 19:01:04 2011].858308 msConnPoolRelease(HUN_villes,user=xxxx password=xxxx dbname=xxxx host=localhost port=5432,0x8089a0d8) [Tue Feb 15 19:01:04 2011].858317 msConnPoolClose(user=xxxx password=xxxx dbname=xxxx host=xxxx port=5432,0x8089a0d8) [Tue Feb 15 19:01:04 2011].858420 msDrawMap(): Layer 3 (HUN_villes), 0.044s [Tue Feb 15 19:01:04 2011].858442 calling msDrawStartShapeUsingIdxSWF (bLayerOpen = 0)

Is there another problem I didn't catch ? Has something changed since mapserver 5.2 concerning postgis layer manipulation, but hasn't been commited in mapswf.c for labelcache drawing ?

Thank you for help

Laurent

Attachments (3)

mapswf_3619.patch (507 bytes ) - added by assefa 13 years ago.
mapswf_3619_2.patch (776 bytes ) - added by assefa 13 years ago.
mapswf_3619_3.patch (1.4 KB ) - added by assefa 13 years ago.

Download all attachments as: .zip

Change History (9)

by assefa, 13 years ago

Attachment: mapswf_3619.patch added

comment:1 by laurent, 13 years ago

Sorry, doesn't solve the issue. same error in in apache error_log : httpd2-prefork: mappostgis.c:1954: msPostGISLayerGetShape: Assertion `layer->layerinfo != ((void *)0)' failed. Do you have another idea ?

comment:2 by assefa, 13 years ago

adding a tmp patch that forces the layer to open just before the call to msDrawStartShapeUsingIdxSWF. If this does not work, I will need to reproduce it locally. I do not have postgis/swf set handy. If you have something very easy to reproduce this, send it to me (1 map/1layer/1shape that I can upload to postgis)

by assefa, 13 years ago

Attachment: mapswf_3619_2.patch added

comment:3 by laurent, 13 years ago

This last patch is for mapwfs.c, I think there's a mistake somewhere.

I've tried the same mapfile, but with a shapefile source, obtained with pgsql2shp from the same table, it produces the error : [Thu Feb 17 16:19:11 2011].278109 msLayerGetShape(): Shapefile error. Shapefile layer has not been opened. [Thu Feb 17 16:19:11 2011].278123 msDrawStartShapeUsingIdxSWF(): General error message. Cannot find shape for shapeidx:140 It's repeated as much as there are points with labels to draw in the extent.

It seems that with the shapefile engine, it returns MS_FAILURE and continue, but with the postgis engine, assert() make the program exit.

by assefa, 13 years ago

Attachment: mapswf_3619_3.patch added

comment:4 by assefa, 13 years ago

sorry. I have attached the correct patch. With this patch, I was able to do a draw of a postgis point layer with text only after setting the LABELCACHE OFF on the layer. I am looking into why the labels are not draw when the LABELCACHE is ON

comment:5 by laurent, 13 years ago

I tried the last patch : working good. There's a new postgis request for each item to draw, it might take some time with huge layers, but at least it works. Thank you.

comment:6 by assefa, 13 years ago

Milestone: 5.6.6 release
Note: See TracTickets for help on using tickets.