id summary reporter owner description type status priority milestone component version resolution keywords cc 3416 topology: crash when loading topogeometry (regression) rulus pramsey "Recent versions of the 2.2 branch fail to load (some?) topogeometries; using the toTopoGeom function leads to a database crash. Using gdb I got this backtrace: {{{ Program received signal SIGSEGV, Segmentation fault. _box2d_to_hexwkb (bbox=bbox@entry=0x99, srid=31370) at postgis_topology.c:126 126 p.x = bbox->xmin; (gdb) bt #0 _box2d_to_hexwkb (bbox=bbox@entry=0x99, srid=31370) at postgis_topology.c:126 #1 0x00007efe26269757 in cb_getEdgeByFace (topo=0x55e7c0fa68d0, ids=0x7ffd4e19c098, numelems=0x7ffd4e19c0a4, fields=153, box=0x99) at postgis_topology.c:914 #2 0x00007efe2792f115 in ?? () from /usr/lib/liblwgeom-2.2.so.2 #3 0x00007efe279307bf in ?? () from /usr/lib/liblwgeom-2.2.so.2 #4 0x00007efe27935e88 in lwt_AddLine () from /usr/lib/liblwgeom-2.2.so.2 #5 0x00007efe27936642 in lwt_AddPolygon () from /usr/lib/liblwgeom-2.2.so.2 #6 0x00007efe2626fbc5 in TopoGeo_AddPolygon (fcinfo=0x55e7c0f9f7e0) at postgis_topology.c:4426 #7 0x000055e7c022e496 in ?? () #8 0x000055e7c0230e6d in ExecProject () #9 0x000055e7c0243568 in ExecResult () #10 0x000055e7c0229d18 in ExecProcNode () #11 0x000055e7c0226f5e in standard_ExecutorRun () #12 0x000055e7c0321247 in ?? () #13 0x000055e7c0322bc0 in PortalRunFetch () #14 0x000055e7c024b6bd in ?? () #15 0x00007efe3b597b6b in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #16 0x00007efe3b5943f3 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #17 0x00007efe3b597bf1 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #18 0x00007efe3b5943f3 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #19 0x00007efe3b596aad in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #20 0x00007efe3b596cd2 in plpgsql_exec_function () from /usr/lib/postgresql/9.4/lib/plpgsql.so #21 0x00007efe3b58bd49 in plpgsql_call_handler () from /usr/lib/postgresql/9.4/lib/plpgsql.so #22 0x000055e7c022ae83 in ?? () #23 0x00007efe3b590cb4 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #24 0x00007efe3b5922c9 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #25 0x00007efe3b594731 in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #26 0x00007efe3b596aad in ?? () from /usr/lib/postgresql/9.4/lib/plpgsql.so #27 0x00007efe3b596cd2 in plpgsql_exec_function () from /usr/lib/postgresql/9.4/lib/plpgsql.so #28 0x00007efe3b58bd49 in plpgsql_call_handler () from /usr/lib/postgresql/9.4/lib/plpgsql.so #29 0x000055e7c022ae83 in ?? () #30 0x000055e7c0230e6d in ExecProject () #31 0x000055e7c0231281 in ExecScan () #32 0x000055e7c0229cc8 in ExecProcNode () #33 0x000055e7c0231228 in ExecScan () #34 0x000055e7c0229c78 in ExecProcNode () #35 0x000055e7c02409b9 in ExecModifyTable () #36 0x000055e7c0229d08 in ExecProcNode () #37 0x000055e7c0226f5e in standard_ExecutorRun () #38 0x000055e7c03218c8 in ?? () #39 0x000055e7c0321b00 in ?? () #40 0x000055e7c0322734 in PortalRun () #41 0x000055e7c031f4e3 in PostgresMain () #42 0x000055e7c00e8773 in ?? () #43 0x000055e7c02c950a in PostmasterMain () #44 0x000055e7c00e990c in main () }}} The issue is introduced in r14226 (found using git bisect), which relates to ticket #3321. Last working version in the 2.2 branch is: PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 5.2.1-23) 5.2.1 20151028, 64-bit ""POSTGIS=""2.2.1dev r14218"" GEOS=""3.5.0-CAPI-1.9.0 r4084"" PROJ=""Rel. 4.9.2, 08 September 2015"" GDAL=""GDAL 2.0.1, released 2015/09/15"" LIBXML=""2.9.3"" LIBJSON=""0.11.99"" TOPOLOGY RASTER" defect closed blocker PostGIS 2.2.1 postgis 2.2.x fixed