Skip to content

[Bug]: Fatal error when fetching WMS GetFeatureInfo with big geometry #5650

@nworr

Description

@nworr

What is the bug? (in English)

When a feature has a big geometry, the getFeatureInfo request perfomed by lizmap can lead to a fatal error if the geometry is really big (see log below)

The error seem to be initated because the geometry is asked when performing

$rep .= $this->gfiXmlToHtml($data);

Steps to reproduce the issue

I see the log outpu but can find the initial geometry :(

Versions, safeguards, check summary etc

LWC Version 3.8.7 - commit bee4379
QGIS Serveur 3.34.14

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

whatever

Browsers

Firefox

Browsers version

whatever

Relevant log output

2025-04-17 17:56:54     23.90.235.38    lizmapadmin     An error has been raised when loading getFeatureInfoHtml:\nbbox=291866.508537%2C6755887.039092%2C293540.001468%2C6756640.44
<?xml version="1.0" encoding="UTF-8"?>
<GetFeatureInfoResponse>
 <Layer name="region">
  <Feature id="8">      
   <Attribute value="8" name="id"/>             
   <Attribute value="BRETAGNE" name="nom_m"/>
   <Attribute value="Bretagne" name="nom"/>
   <Attribute value="53" name="insee_reg"/>           
   <BoundingBox CRS="EPSG:2154" minx="283079.3" maxy="6778895.5" maxx="323537" miny="6747648.3"/>
   <Attribute value="MultiPolygon (((174782.10000012 6757589.40000129, 174776.20000012 6757582.30000129, 174772.30000012 6757580.4000013, 

[I Truncate this part a lot , a file with the original single line is 13 MB]

  348654.50000006 6844182.30000101, 348687.10000006 6844189.50000101)))" type="derived" name="geometry"/>
  </Feature>
 </Layer>
</GetFeatureInfoResponse>
\nFatal Error 40: Line: 24 Column: 21 AttValue length too long\nFatal Error 65: Line: 24 Column: 21 attributes construct error\nFatal Error 73: Line: 24 Column: 21 Couldn't find end of Start Tag Attribute line 24\nError 2: Line: 26 Column: 2 xmlSAX2Characters: huge text node\nFatal Error 5: Line: 26 Column: 2 Extra content at the end of the document
2025-04-17 18:03:30	23.90.235.38	lizmapadmin	An HTTP request ended with an error, please check the main error log. HTTP code 504.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions