Opened 6 years ago

Closed 6 years ago

#3922 closed defect (fixed)

ST_AsMVTGeom() Crashes

Reported by: pramsey Owned by: pramsey
Priority: critical Milestone:
Component: postgis Version: master
Keywords: Cc: bjornhartnell, strk

Description

SELECT ST_AsMVTGeom(
st_geomfromtwkb('\x06000104a501d0a7db06dad0940120ee030660229604109c010ed6011246143e76201a22b401a601f001b801580ef40122d803ca01de0cf00e80049204ac02b602be0138ca08bc02d605d201d2013cb804a401be013c9c03cd028608c106f001c1018601c7011e970125f10207439b02850a76ff0415030d0725431973132f227768671a5f133f17290865e405ba0154ab030415348502cc038d120c37d326c706850896109f01e201350f6f0a1903930165830121412d052928651d2b0d0f1107170b490c33120f010f0813034f47f50259190181031b3713ed04d901bd01439b02639507c10201021062054c1d3c101e6a0c2000684e6a7c1a681f443d160f044f0f490f03020b08051c01080c0e18013a012801380e08005808522d3a4c1c062a0f0e192a190a3b22194803261c1376122ac201d8011a101c065a17a8011c303206460c164a18a4015c56620801162d1404a402c601262a143002421222290f7b581d0719011d0311002908250a25021d030f0111030f05a3014315050d05110383011b9d011f3309a70347170325058b03417515130361190b4e19b40105fe208810041314041018270705c0039d0416251a1213241b0ffd02f5029408d001990218110607100c070a0b0819031c263432302454322a1e262a101e2a521426101c0c10101210121e18341c321c2c1c26222230162a10320c280e3202080e26123e0a2c041a002805360002051e010807161b281b1e1312010213101b14150e0906130c331e3518250e250c230a1d0a110e091407140718031a0008031a03140112093a199a01199801052e04100a0c120a4a0c7e1e2406220c4e20b60236c8013014020c0510090a110e1b0e11140d18021c08261054261417080f082504a702ea012c58068801180e0f1477209301082f062f00271f0b4b17170311020d100b180d180b0c1502190019031f09512d9b01592a1f120d0c0f0a15126b0637060f100b16032c0a2a1410120c120a240014011a03160314001482010100810900311753478d0117218b02b3027a692223745b2a111e031e130403061902691aa50118752ea70158045818562cae0170202614200e2e208a012e6c4a154c33448b01242f34651e2b221d481f2017122334a1010a510f2b6d8d021d5f073304351233242bce01772a251c3106291b4b032110351c2324239c016f260f5c138a01074e14261422282844221c7a24779a022db90127450b174319b501019b015a61b00105782a4e2a7615741305313a14422a4a079c01519001c9019c013388017352291c371c4110497e26442a8a0108502a2e2e19100980011984010b0e01840136042e1a6a22781f32356813280104370a5b12a5012b533e0748244e3e54355c064a45880115289d01103904453e810127290b5103a70152174841680b10254814402a4e305e82017232581792010522512e2516370023380b9801125434584c2a3e5202042f4e390f2f0e050205001f0801380d00430515421744fd01311b16614c038001241a482c3e44061e0a3881012605244d0e2d5d291a192c5710759d01284b20150f752308530a7f198101113d145d1f13534727290a291f490f4b0215246b196929752d2f2581012675371d432f090c4d2c0d080b141f0a0034051401110735152921055940010a023c0c0c35030519270825382f104512753e014001ae013b041708356ced012a0f7c2d041d0415631507e501012f0a491327411d1b310811072947493d0843125f4b7b16'),    
'SRID=3347;POLYGON((3658201 658873,3658201 5958872.97428571,8958201.49428571 5958872.97428571,8958201.49428571 658873,3658201 658873))'::geometry,
4096, 
0, 
true
);

The crash occurs in the MakeValid portion of the code, but makevalid on the polygon alone is not sufficient, the rest of the mvtgeom process seems to be required too.

Change History (6)

comment:1 by pramsey, 6 years ago

Priority: mediumcritical

comment:2 by pramsey, 6 years ago

OK, crashes on trunk, but not on 2.4. Probably something to do w/ the in-place coordinate handling which I think is the only major change in trunk?

comment:3 by pramsey, 6 years ago

Resolution: fixed
Status: newclosed

In 16082:

Correctly handle in-place collapse of interior rings, closes #3922

comment:4 by pramsey, 6 years ago

In 16084:

Add regression test for mvtgeom (references #3922)

comment:5 by strk, 6 years ago

Resolution: fixed
Status: closedreopened

The test should only run when JSON is supported by build, please see https://gitlab.com/postgis/postgis/-/jobs/38304320

comment:6 by pramsey, 6 years ago

Resolution: fixed
Status: reopenedclosed

In 16085:

Move protobuf tests into protobuf guarded file (closes #3922)

Note: See TracTickets for help on using tickets.