Program received signal SIGSEGV, Segmentation fault. sphere_distance (s=0x8eda188, e=0x65726774) at lwgeodetic.c:758 758 double d_lon = e->lon - s->lon; (gdb) bt #0 sphere_distance (s=0x8eda188, e=0x65726774) at lwgeodetic.c:758 #1 0x0019ed04 in circ_node_min_distance (n1=0x8eda188, n2=0x65726774, threshold=1.5696101447650194e-19, min_dist=0xbfc25098, max_dist=0xbfc25090, closest1=0xbfc25080, closest2=0xbfc25070) at lwgeodetic_tree.c:458 #2 circ_tree_distance_tree_internal (n1=0x8eda188, n2=0x65726774, threshold=1.5696101447650194e-19, min_dist=0xbfc25098, max_dist=0xbfc25090, closest1=0xbfc25080, closest2=0xbfc25070) at lwgeodetic_tree.c:505 #3 0x0019f65c in circ_tree_distance_tree (n1=0x8eda188, n2=0x65726774, spheroid=0xbfc25158, threshold=9.9999999999999998e-13) at lwgeodetic_tree.c:483 #4 0x00173c04 in geography_distance_cache (fcinfo=0x8ee0f84, g1=0x8ed64d8, g2=0x8ee5c30, s=0xbfc25158, distance=0xbfc25130) at geography_measurement_trees.c:198 #5 0x00171cd8 in geography_distance (fcinfo=0x8ee0f84) at geography_measurement.c:147 #6 0x081b6ff8 in ExecMakeFunctionResultNoSets (fcache=0x8ee0f48, econtext=0x8ed8270, isNull=0xbfc2528f "", isDone=0x0) at execQual.c:1890 #7 0x001200fb in exec_eval_simple_expr (estate=0xbfc2559c, expr=0x8ebbce8, isNull=0xbfc2528f "", rettype=0xbfc25288) at pl_exec.c:4890 #8 exec_eval_expr (estate=0xbfc2559c, expr=0x8ebbce8, isNull=0xbfc2528f "", rettype=0xbfc25288) at pl_exec.c:4476 #9 0x00121ba6 in exec_assign_expr (estate=0xbfc2559c, target=0x8ed6328, expr=0x8ebbce8) at pl_exec.c:3675 #10 0x001236c2 in exec_stmt_assign (estate=, stmts=) at pl_exec.c:1397 #11 exec_stmt (estate=, stmts=) at pl_exec.c:1285 #12 exec_stmts (estate=, stmts=) at pl_exec.c:1248 #13 0x00123c62 in exec_stmt_fori (estate=, stmts=) at pl_exec.c:1797 #14 exec_stmt (estate=, stmts=) at pl_exec.c:1313 #15 exec_stmts (estate=, stmts=) at pl_exec.c:1248 #16 0x0012669a in exec_stmt_block (estate=0xbfc2559c, block=0x8ebbe78) at pl_exec.c:1186 #17 0x001270f3 in plpgsql_exec_function (func=0x8ea77f8, fcinfo=0x8ece27c) at pl_exec.c:324 #18 0x0011ac74 in plpgsql_call_handler (fcinfo=0x8ece27c) at pl_handler.c:122 #19 0x081b8500 in ExecMakeFunctionResult (fcache=0x8ece240, econtext=0x8ece648, isNull=0xbfc2581f "\bH\236\340\b$", isDone=0x0) at execQual.c:1824 #20 0x081b9554 in ExecEvalExprSwitchContext (expression=0x8ece240, econtext=0x8ece648, isNull=0xbfc2581f "\bH\236\340\b$", isDone=0x0) at execQual.c:4179 #21 0x08227807 in evaluate_expr (expr=, result_type=23, result_typmod=-1, result_collation=0) at clauses.c:4212 #22 0x08229869 in evaluate_function (funcid=798567, result_type=23, result_typmod=-1, result_collid=0, input_collid=0, args=0xbfc25938, has_named_args=0 '\000', allow_inline=1 '\001', context=0xbfc25afc) at clauses.c:3774 #23 simplify_function (funcid=798567, result_type=23, result_typmod=-1, result_collid=0, input_collid=0, args=0xbfc25938, has_named_args=0 '\000', allow_inline=1 '\001', context=0xbfc25afc) at clauses.c:3432 #24 0x08229cea in eval_const_expressions_mutator (node=0x8e8ea70, context=0xbfc25afc) at clauses.c:2191 #25 0x081e4371 in expression_tree_mutator (node=0x8e8ebd8, mutator=0x8229a50 , context=0xbfc25afc) at nodeFuncs.c:2194 #26 0x08229b4d in eval_const_expressions_mutator (node=0x8e8ebd8, context=0xbfc25afc) at clauses.c:3101 #27 0x081e4a2e in expression_tree_mutator (node=0x8e8e9d0, mutator=0x8229a50 , context=0xbfc25afc) at nodeFuncs.c:2442 #28 0x08229b4d in eval_const_expressions_mutator (node=0x8e8e9d0, context=0xbfc25afc) at clauses.c:3101 #29 0x0822b76d in eval_const_expressions (root=0x8e8ec78, node=0x8e8e9d0) at clauses.c:2074 #30 0x0821a3b3 in preprocess_expression (root=0x8e8ec78, expr=, kind=1) at planner.c:632 #31 0x0821d2cf in subquery_planner (glob=0x8e8eab8, parse=0x8e8e948, parent_root=0x0, hasRecursion=0 '\000', tuple_fraction=0, subroot=0xbfc25cac) at planner.c:422 #32 0x0821da64 in standard_planner (parse=0x8e8e948, cursorOptions=0, boundParams=0x0) at planner.c:202 #33 0x0827f621 in pg_plan_query (querytree=0x8e8e948, cursorOptions=0, boundParams=0x0) at postgres.c:725 #34 0x0827f6f3 in pg_plan_queries (querytrees=0x8e8ec60, cursorOptions=0, boundParams=0x0) at postgres.c:784 #35 0x08280171 in exec_simple_query (argc=2, argv=0x8e34b98, username=0x8e2d038 "em") at postgres.c:949 #36 PostgresMain (argc=2, argv=0x8e34b98, username=0x8e2d038 "em") at postgres.c:3968 #37 0x08241c90 in BackendRun () at postmaster.c:3611 #38 BackendStartup () at postmaster.c:3296 #39 ServerLoop () at postmaster.c:1460 #40 0x08242727 in PostmasterMain (argc=3, argv=0x8e09318) at postmaster.c:1121 #41 0x081e2858 in main (argc=3, argv=0x8e09318) at main.c:199