Ticket #2695 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

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

Change History

Changed 5 years ago by dmorissette

  • cc sdlime, tbonfort added
  • owner changed from mapserverbugs to sdlime
  • component changed from MapScript-PHP to MapServer C Library
  • milestone set to 5.4 release

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?

Changed 5 years ago by dmorissette

  • cc dmorissette added

Changed 5 years ago by lithiumdex

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.

Changed 5 years ago by dmorissette

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

Changed 5 years ago by sdlime

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

Steve

Changed 5 years ago by lithiumdex

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

Changed 5 years ago by nmandery

exampledata for reproducing the bug

Changed 5 years ago by nmandery

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

Changed 5 years ago by nmandery

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

Nico

Changed 5 years ago by nmandery

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

Changed 5 years ago by nmandery

Quick workaround foor #2695

Changed 5 years ago by tbonfort

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 5.4 release to 5.2.1 release

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.