[postgis-users] Problem with multipolygon

Sebastian Bšöck sb at minimoog.org
Mon Nov 19 12:55:19 PST 2007


Hi again,

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000002
> 0x929b9831 in get_uint32 ()

for a full backtrace see the attachment. Hope it's helpful.

Regards,

Sebastian
-------------- next part --------------
(gdb) bt
#0  0x929b9831 in get_uint32 ()
#1  0x0188544b in lwgeom_inspect (serialized_form=0x102e2e0 "\006\006") at lwgeom_api.c:993
#2  0x0188a12e in lwmpoly_deserialize (srl=0x102e2e0 "\006\006") at lwmpoly.c:39
#3  0x0189a25d in LWGEOM_in (fcinfo=0x6) at lwgeom_inout.c:75
#4  0x002b03a1 in InputFunctionCall (flinfo=0xbfffdef8, str=0x102d4b4 "MULTIPOLYGON(((1 1,99 1,99 99,1 99,1 1)),((201 1,299 1,299 99,201 99,201 1)))", typioparam=16404, typmod=-1) at fmgr.c:1835
#5  0x002b0626 in OidInputFunctionCall (functionId=6, str=0x6 <Address 0x6 out of bounds>, typioparam=6, typmod=6) at fmgr.c:1939
#6  0x000bccc7 in stringTypeDatum (tp=0x102e2e1, string=0x6 <Address 0x6 out of bounds>, atttypmod=2) at parse_type.c:462
#7  0x000bfe04 in coerce_type (pstate=0x102d688, node=0x10691c8, inputTypeId=705, targetTypeId=16404, targetTypeMod=-1, ccontext=COERCION_ASSIGNMENT, cformat=COERCE_IMPLICIT_CAST) at parse_coerce.c:210
#8  0x000c063f in coerce_to_target_type (pstate=0x102d688, expr=0x10691c8, exprtype=705, targettype=16404, targettypmod=-1, ccontext=17208288, cformat=17207752) at parse_coerce.c:81
#9  0x000c14ef in transformAssignedExpr (pstate=0x102d688, expr=0x10691c8, colname=0x102d004 "netto", attrno=8, indirection=0x0, location=57) at parse_target.c:425
#10 0x00095430 in transformInsertRow (pstate=0x102d688, exprlist=<value temporarily unavailable, due to optimizations>, stmtcols=0x102cedc, icolumns=0x102cedc, attrnos=0x1068f80) at analyze.c:656
#11 0x00095d4b in transformInsertStmt (pstate=0x102d688, stmt=0x102d62c) at analyze.c:550
#12 0x0009690f in transformStmt (pstate=0x102d688, parseTree=0x102d62c) at analyze.c:174
#13 0x000984bf in parse_analyze (parseTree=0x6, sourceText=0x6 <Address 0x6 out of bounds>, paramTypes=0x6, numParams=6) at analyze.c:96
#14 0x001e409c in pg_analyze_and_rewrite (parsetree=0x102d62c, query_string=0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "..., paramTypes=0x0, numParams=16963208) at postgres.c:596
#15 0x001e48ac in exec_simple_query (query_string=0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "...) at postgres.c:899
#16 0x001e696b in PostgresMain (argc=4, argv=0x1003478, username=0x100344c "sb") at postgres.c:3529
#17 0x001ab6d8 in ServerLoop () at postmaster.c:3175
#18 0x001ac7db in PostmasterMain (argc=3, argv=0xa005c0) at postmaster.c:1026
#19 0x0015003b in main (argc=3, argv=0xa005c0) at main.c:188
(gdb) 


(gdb) bt full
#0  0x929b9831 in get_uint32 ()
No symbol table info available.
#1  0x0188544b in lwgeom_inspect (serialized_form=0x102e2e0 "\006\006") at lwgeom_api.c:993
	result = (LWGEOM_INSPECTED *) 0x1069464
	typefl = <value temporarily unavailable, due to optimizations>
	type = 6 '\006'
	sub_geoms = <value temporarily unavailable, due to optimizations>
	loc = (const uchar *) 0x102e2e5 "\003\001"
	t = <value temporarily unavailable, due to optimizations>
#2  0x0188a12e in lwmpoly_deserialize (srl=0x102e2e0 "\006\006") at lwmpoly.c:39
	result = <value temporarily unavailable, due to optimizations>
	insp = <value temporarily unavailable, due to optimizations>
	type = <value temporarily unavailable, due to optimizations>
	i = <value temporarily unavailable, due to optimizations>
#3  0x0189a25d in LWGEOM_in (fcinfo=0x6) at lwgeom_inout.c:75
	serialized_lwgeom = <value temporarily unavailable, due to optimizations>
	lwgeom = <value temporarily unavailable, due to optimizations>
	ret = <value temporarily unavailable, due to optimizations>
#4  0x002b03a1 in InputFunctionCall (flinfo=0xbfffdef8, str=0x102d4b4 "MULTIPOLYGON(((1 1,99 1,99 99,1 99,1 1)),((201 1,299 1,299 99,201 99,201 1)))", typioparam=16404, typmod=-1) at fmgr.c:1835
	fcinfo = {
  flinfo = 0xbfffdef8, 
  context = 0x0, 
  resultinfo = 0x0, 
  isnull = 0 '\0', 
  nargs = 3, 
  arg = {16962740, 16404, 4294967295, 16406, 3221216735, 26086688, 10490560, 3221216632, 2413870725, 10490560, 26086688, 0, 2414017536, 3221216572, 26078972, 0, 2228919869, 1597, 25195964, 1464622959, 1297040711, 0, 3221216576, 0, 0, 1195503984, 17208224, 17208212, 0, 262142, 17118132, 17119660, 2835159, 17119668, 3221216920, 4, 0, 16406, 0, 0, 0, 0, 0, 17116776, 4, 0, 2459318912, 0, 2932532, 0, 0, 0, 0, 0, 0, 0, 16806480, 0, 0, 0, 2721249, 25195956, 3771055, 3221216760, 2721370, 16808628, 25195996, 2228919869, 0, 0, 25175020, 9878056, 2810219, 16406, 1991, 3221216952, 2810816, 25195996, 25196000, 0, 0, 0, 10031640, 0, 0, 0, 3221216832, 0, 3789760, 3221216920, 0, 2344784, 0, 3221217016, 16406, 2344784, 25195996, 25178092, 25797168, 16805500}, 
  argnull = "\000\000\000\000\024@", '\0' <repeats 54 times>, "\026@", '\0' <repeats 14 times>, "k?*\0009?*\000????ȑ\006\001????[?*"
}
	result = 17207752
	__func__ = "InputFunctionCall"
#5  0x002b0626 in OidInputFunctionCall (functionId=6, str=0x6 <Address 0x6 out of bounds>, typioparam=6, typmod=6) at fmgr.c:1939
	flinfo = {
  fn_addr = 0x189a230 <LWGEOM_in>, 
  fn_oid = 16406, 
  fn_nargs = 1, 
  fn_strict = 1 '\001', 
  fn_retset = 0 '\0', 
  fn_extra = 0x0, 
  fn_mcxt = 0x1007138, 
  fn_expr = 0x0
}
#6  0x000bccc7 in stringTypeDatum (tp=0x102e2e1, string=0x6 <Address 0x6 out of bounds>, atttypmod=2) at parse_type.c:462
	typinput = 16406
	typioparam = <value temporarily unavailable, due to optimizations>
#7  0x000bfe04 in coerce_type (pstate=0x102d688, node=0x10691c8, inputTypeId=705, targetTypeId=16404, targetTypeMod=-1, ccontext=COERCION_ASSIGNMENT, cformat=COERCE_IMPLICIT_CAST) at parse_coerce.c:210
	newcon = (Const *) 0x10693e0
	baseTypeId = 16404
	baseTypeMod = -1
	targetType = (Type) 0x991238
	result = <value temporarily unavailable, due to optimizations>
	pathtype = <value temporarily unavailable, due to optimizations>
	funcId = <value temporarily unavailable, due to optimizations>
	__func__ = "coerce_type"
#8  0x000c063f in coerce_to_target_type (pstate=0x102d688, expr=0x10691c8, exprtype=705, targettype=16404, targettypmod=-1, ccontext=17208288, cformat=17207752) at parse_coerce.c:81
	result = (Node *) 0x6
#9  0x000c14ef in transformAssignedExpr (pstate=0x102d688, expr=0x10691c8, colname=0x102d004 "netto", attrno=8, indirection=0x0, location=57) at parse_target.c:425
	type_id = 705
	attrtype = 16404
	attrtypmod = -1
	rd = <value temporarily unavailable, due to optimizations>
	__func__ = "transformAssignedExpr"
#10 0x00095430 in transformInsertRow (pstate=0x102d688, exprlist=<value temporarily unavailable, due to optimizations>, stmtcols=0x102cedc, icolumns=0x102cedc, attrnos=0x1068f80) at analyze.c:656
	expr = (Expr *) 0x6
	col = (ResTarget *) 0x102d018
	result = (List *) 0x106925c
	lc = (ListCell *) 0x10691f4
	icols = (ListCell *) 0x102d044
	attnos = (ListCell *) 0x1068fd8
	__func__ = "transformInsertRow"
#11 0x00095d4b in transformInsertStmt (pstate=0x102d688, stmt=0x102d62c) at analyze.c:550
	qry = (Query *) 0x102d6d4
	selectStmt = <value temporarily unavailable, due to optimizations>
	exprList = (List *) 0x1069000
	sub_rtable = (List *) 0x0
	sub_relnamespace = (List *) 0x0
	sub_varnamespace = (List *) 0x0
	icolumns = (List *) 0x102cedc
	attrnos = (List *) 0x1068f80
	rte = <value temporarily unavailable, due to optimizations>
	rtr = <value temporarily unavailable, due to optimizations>
	icols = <value temporarily unavailable, due to optimizations>
	attnos = <value temporarily unavailable, due to optimizations>
	lc = <value temporarily unavailable, due to optimizations>
	__func__ = "transformInsertStmt"
#12 0x0009690f in transformStmt (pstate=0x102d688, parseTree=0x102d62c) at analyze.c:174
	result = <value temporarily unavailable, due to optimizations>
#13 0x000984bf in parse_analyze (parseTree=0x6, sourceText=0x6 <Address 0x6 out of bounds>, paramTypes=0x6, numParams=6) at analyze.c:96
	pstate = (ParseState *) 0x102d688
	query = <value temporarily unavailable, due to optimizations>
#14 0x001e409c in pg_analyze_and_rewrite (parsetree=0x102d62c, query_string=0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "..., paramTypes=0x0, numParams=16963208) at postgres.c:596
	query = <value temporarily unavailable, due to optimizations>
#15 0x001e48ac in exec_simple_query (query_string=0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "...) at postgres.c:899
	parsetree = (Node *) 0x102d62c
	portal = <value temporarily unavailable, due to optimizations>
	commandTag = 0x2f5170 "INSERT"
	completionTag = "+\000\006\000\000\000\034?\002\0015\001\000\000\000\000\000\000\a\000\000\000\000/;\0005\001\000\000\034?\002\001\003??\034?\002\001?\037\000\000??\024\000\000\000\000\0005\001\000\000\b???0?"
	querytree_list = <value temporarily unavailable, due to optimizations>
	plantree_list = <value temporarily unavailable, due to optimizations>
	receiver = (DestReceiver *) 0x102d688
	format = 20
	dest = DestRemote
	oldcontext = (MemoryContext) 0x10071c4
	parsetree_list = (List *) 0x102d66c
	parsetree_item = (ListCell *) 0x102d658
	save_log_statement_stats = 0 '\0'
	was_logged = 0 '\0'
	msec_str = "\024\000\034?\002\0015\001\000\000\037\000???\002\000\000\034?\024\000\027\000;\000??AG\024?"
	__func__ = "exec_simple_query"
#16 0x001e696b in PostgresMain (argc=4, argv=0x1003478, username=0x100344c "sb") at postgres.c:3529
	query_string = 0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "...
	flag = <value temporarily unavailable, due to optimizations>
	dbname = 0xa00cf0 "devel"
	userDoption = 0x0
	secure = 0 '\0'
	errs = 0
	debug_flag = -1
	guc_names = (List *) 0x0
	guc_values = (List *) 0x0
	ctx = PGC_SUSET
	gucsource = <value temporarily unavailable, due to optimizations>
	am_superuser = <value temporarily unavailable, due to optimizations>
	firstchar = <value temporarily unavailable, due to optimizations>
	stack_base = 0 '\0'
	input_message = {
  data = 0x102c41c "INSERT INTO stockwerke (name,gebaeude_id,block_id,brutto,netto) VALUES ('EG',currval('gebaeude_id_seq'::text),currval('bloecke_id_seq'::text),'MULTIPOLYGON(((0 0,100 0,100 100,0 100,0 0)),((200 0,300 "..., 
  len = 310, 
  maxlen = 1024, 
  cursor = 310
}
	local_sigjmp_buf = {895, -331709, 8064, 1987579, 4, 16802816, -1, -1073748620, -1073748472, -1073748976, 31, 658, 1989627, 524311, 31, 31, 0, -1835663305, 1}
	send_ready_for_query = 0 '\0'
	__func__ = "PostgresMain"
#17 0x001ab6d8 in ServerLoop () at postmaster.c:3175
	port = (Port *) Cannot access memory at address 0x0
(gdb)