Mailing list archives : pcb-rnd

ID:5664
From:pc...@cuvoodoo.info
Date:Wed, 18 May 2022 16:39:40 +0200
Subject:[pcb-rnd] bug report: DRC function causing assert
replies: 5665 from rn...@igor2.repo.hu
 
--jUgaN9Wl+plaqCBQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
 
not sure if this is really a bug, since it's caused by an assert, but developing/running a bogus function in a DRC can cause pcb-rnd to quit.
instead an error should be thrown.
 
to reproduce the error:
- start pcb-rnd with empty board
- import attached drc (file -> preferences -> sizes & drc -< drc query -> import)
- select outline_closed rule
- on the first run the message log shows the error "Compilation error." (I see this also happen on valid rules while editing them)
- on the second run, pcb-rnd quits
 
backtrace is attached.
 
--jUgaN9Wl+plaqCBQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="outline_closed.tdx"
 
tEDAx v1
 
begin drc_query_rule v1 outline_closed
	type outline
	title outline not connected
	desc check if all routed outline endpoints are connected
 
	query function count_end1(OBJ)
	query let OUTLINE ((@.layer.type == BOUNDARY) && (@.layer.purpose ~ "route"))
	query let NET ((OUTLINE.IID != OBJ.IID) && (OUTLINE.netseg.id == OBJ.netseg.id))
	query let END (((NET.x1 == OBJ.x1) && (NET.y1 == OBJ.y1)) || ((NET.x2 == OBJ.x1) && (NET.y2 == OBJ.y1)))
	query return llen(list(END))
 
	query rule outline_closed
	query let OUTLINE ((@.layer.type == BOUNDARY) && (@.layer.purpose ~ "route"))
	query assert (count_end1(OUTLINE) == 0) thus violation(DRCGRP1, OUTLINE1 DRCTEXT, "outline not connected")
end drc_query_rule
 
--jUgaN9Wl+plaqCBQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="outline_closed.log"
 
qry_error: syntax error, unexpected T_CONST, expecting T_STR
[New Thread 0x7fffd17fa640 (LWP 150599)]
pcb-rnd: query_y.y:200: qry_parse: Assertion `user_funcs == NULL' failed.
 
Thread 1 "pcb-rnd" received signal SIGABRT, Aborted.
0x00007ffff77d536c in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff77d536c in  () at /usr/lib/libc.so.6
#1  0x00007ffff7785838 in raise () at /usr/lib/libc.so.6
#2  0x00007ffff776f535 in abort () at /usr/lib/libc.so.6
#3  0x00007ffff776f45c in  () at /usr/lib/libc.so.6
#4  0x00007ffff777e366 in  () at /usr/lib/libc.so.6
#5  0x0000555555b94916 in qry_parse (prg_out=0x7fffffffcc68) at /home/kevredon/tmp/pcb-rnd/src/query_y.y:200
#6  0x0000555555b88d5c in pcb_qry_run_script
    (ec=0x7fffffffcdc0, pcb=0x55555601ab00, script=0x555556cb3980 "function count_end1(OBJ)\nlet OUTLINE ((@.layer.type == BOUNDARY) && (@.layer.purpose ~ \"route\"))\nlet NET ((OUTLINE.IID != OBJ.IID) && (OUTLINE.netseg.id == OBJ.netseg.id))\nlet END (((NET.x1 == OBJ.x1)"..., scope=0x0, cb=0x5555558c8049 <drc_qry_exec_cb>, user_ctx=0x7fffffffcd00)
    at ../src_plugins/query/query_act.c:189
#7  0x00005555558c85c7 in drc_qry_exec
    (ec=0x7fffffffcdc0, pcb=0x55555601ab00, lst=0x555556b3b7b0, name=0x555556d32fa0 "outline_closed", type=0x555556cbc540 "outline", title=0x555556cbdad0 "outline not connected", desc=0x555556cbbfc0 "check if all routed outline endpoints are connected", query=0x555556cb3980 "function count_end1(OBJ)\nlet OUTLINE ((@.layer.type == BOUNDARY) && (@.layer.purpose ~ \"route\"))\nlet NET ((OUTLINE.IID != OBJ.IID) && (OUTLINE.netseg.id == OBJ.netseg.id))\nlet END (((NET.x1 == OBJ.x1)"...) at ../src_plugins/drc_query/drc_query.c:209
#8  0x00005555558dc009 in rlist_btn_run_cb
    (hid_ctx=0x555556b528b0, caller_data=0x555555df8400 <drc_rlist_ctx>, attr_inp=0x555556cd53e8)
    at ../src_plugins/drc_query/dlg.c:652
#9  0x00007ffff7ee1781 in button_changed_cb (button=0x555556cc9700, dst=0x555556cd53e8)
    at ./librnd/plugins/lib_gtk_common/dlg_attribute.c:161
#10 0x00007ffff6dedf8f in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff6e09ba8 in  () at /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff6e0b5c7 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff6e0b824 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff7373596 in  () at /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff6dedf8f in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff6e097ef in  () at /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff6e0b5c7 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff6e0b824 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff737246a in  () at /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007ffff74210a8 in  () at /usr/lib/libgtk-x11-2.0.so.0
#21 0x00007ffff6dedf8f in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff6e0957e in  () at /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff6e0afb8 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#24 0x00007ffff6e0b824 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#25 0x00007ffff7546275 in  () at /usr/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff741f6d6 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#27 0x00007ffff741fb4b in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#28 0x00007ffff728e3be in  () at /usr/lib/libgdk-x11-2.0.so.0
#29 0x00007ffff6cf1163 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#30 0x00007ffff6d479e9 in  () at /usr/lib/libglib-2.0.so.0
#31 0x00007ffff6cf06a3 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#32 0x00007ffff741e9fe in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#33 0x00007ffff7ef5f7c in rnd_gtkg_do_export (hid=0x7ffff7fa6e00 <gtk2_gl_hid>, options=0x0)
    at ../src/librnd/plugins/lib_gtk2_common/glue_hid.c:21
#34 0x00007ffff7f350ed in rnd_mainloop_interactive (ga=0x7fffffffdfb0, hidlib=0x55555601ab00)
    at ../src/librnd/core/hid_init.c:1002
#35 0x000055555564d6d4 in main (argc=1, argv=0x7fffffffe1b8) at main.c:660
 
 
--jUgaN9Wl+plaqCBQ--
 

Reply subtree:
5664 [pcb-rnd] bug report: DRC function causing assert from pc...@cuvoodoo.info
  5665 Re: [pcb-rnd] bug report: DRC function causing assert from rn...@igor2.repo.hu