Opened 16 years ago

Closed 16 years ago

#2695 closed defect (fixed)

LABEL: ANGLE FOLLOW + Large number of labels = Hangup

Reported by: lithiumdex Owned by: sdlime
Priority: normal Milestone: 5.2.1 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: sdlime, tbonfort, dmorissette

Description

For example;

Rendering of one zoom level might take 20 seconds The next one in, the only change being the number of labels, it would go indefinatley (until killed by apache, 5+ mins) Switching ANGLE FOLLOW to ANGLE AUTO this zoom level would render in roughly the same time as the one before it (i.e. 20-30 seconds)

Using PHP Mapscript/kaMap /w MapServer 5.0.3, on a server running Centos 5.

Attachments (2)

bugroads.tar.gz (110.9 KB ) - added by nmandery 16 years ago.
exampledata for reproducing the bug
ms_bug2695_workaround.patch (667 bytes ) - added by nmandery 16 years ago.
Quick workaround foor #2695

Download all attachments as: .zip

Change History (12)

comment:1 by dmorissette, 16 years ago

Cc: sdlime tbonfort added
Component: MapScript-PHPMapServer C Library
Milestone: 5.4 release
Owner: changed from mapserverbugs to sdlime

I doubt this is specific to PHP MapScript, that's just the way labelling works: automated label positioning can take time with too many labels, there is not much we can do about this unless someone has time to invest in fine tuning the algorithms.

Christopher, if you believe it's not just taking time but it actually goes into an infinite loop then please submit a complete testcase to reproduce (mapfile + testdata).

Adding Steve and Thomas to CC... what do you think?

comment:2 by dmorissette, 16 years ago

Cc: dmorissette added

comment:3 by lithiumdex, 16 years ago

The hangup has occurred in places with less potential labels than places where it didn't hang up.

I.e. (Hang: Halifax NS, none: Philadelphia PA, hang: Washington DC)

Unfortunately I am not allowed to release any part of the Map file, or allow outsiders to view the map as of now.

comment:4 by dmorissette, 16 years ago

Hard/impossible to do anything without a way to reproduce...

comment:5 by sdlime, 16 years ago

Agreed on the test case. BTW is this using GD or AGG for rendering? Are the results consistent between them?

Steve

comment:6 by lithiumdex, 16 years ago

I'm using AGG rendering, a GD version of this did not produce the error, however the road network data is different.

by nmandery, 16 years ago

Attachment: bugroads.tar.gz added

exampledata for reproducing the bug

comment:7 by nmandery, 16 years ago

It seems to me i got the same bug as described by lithiumdex, although there are not so much labels in my case. I attached an archive (bugroads.tar.gz) with all the neccesariy data to reproduce the bug. The bug seems to be dependant of the scale, at least it only occurs one some mapscales - see the request_url.txt file for a request which causes the error.

I am using version 5.2 of Mapserver.

Nico

comment:8 by nmandery, 16 years ago

Forgot on thing: The ANGLE Follow statement which causes the trouble is in line 88 of the mapfile.

Nico

comment:9 by nmandery, 16 years ago

I think i found the issue. The problem seems to be caused in the msDrawTextLineAGG funtion of mapagg.c. Instead of coordinates for drawing a glyph NaN-values are occasionaly returned. I attached a quick patch for the SVN-version om mapserver to abort rendering of a label in such a case, but this is only a temporary workaround. Maybe someone with more experience can look further into this issue.

Nico

by nmandery, 16 years ago

Attachment: ms_bug2695_workaround.patch added

Quick workaround foor #2695

comment:10 by tbonfort, 16 years ago

Milestone: 5.4 release5.2.1 release
Resolution: fixed
Status: newclosed

that one was a pain to debug !

nmandery: your shapefile has some features where there were duplicate points. we usually account for this, except if the last point was a duplicate. the duplicate points were causing the angle follow placement code to produce NaNs, thus the problem.

fixed in trunk in r7956 fixed in 5.2 branch in r7957

Note: See TracTickets for help on using tickets.