X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GV22ty/Xmbk4fg2t72s60oxtGOuBbUgu0BF5wNvpDSM=; b=UsrayI6oC7uoSjpL0pXxTXP6xKieHGDehYDk9sGquUZRsT58bJsPa0glOj4b/IKuZz mY1FlhYfC+LpKPWz6weMih0xxjksVz6iqYmHFHTTAC0XT88DLPVUJ4bGJlBlv49Rh5hO Wh0j3XrvEaQ1f9MG7cOHFRCA48h5z56IavY7/+RZjrscUrechheFvJRGQxESu4wV/3e5 F/YZxAxo3SODs9zCd8UZY6f+lWecRiMQpmbxB/ryVOtUjPLSSzGW0j1XfVKVBWathb3v Jz5oPxlOVqebpYBSZxSsmqiHJ+i9KXgy74A1RMuoqL6SxI5dbV82ww1DXWpVGxW275jt Bo1g== MIME-Version: 1.0 X-Received: by 10.60.41.161 with SMTP id g1mr17039142oel.41.1375276605113; Wed, 31 Jul 2013 06:16:45 -0700 (PDT) In-Reply-To: <51F8ED04.1060404@jump-ing.de> References: <51F8E39A DOT 2000705 AT jump-ing DOT de> <51F8ED04 DOT 1060404 AT jump-ing DOT de> Date: Wed, 31 Jul 2013 17:16:45 +0400 Message-ID: Subject: Re: [geda-user] Core dump when loading vendor resoure by actions. From: =?KOI8-R?B?4czFy9PFyiDowdLYy8/X08vJyg==?= To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=089e0149c1e4840e4d04e2ce89d6 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --089e0149c1e4840e4d04e2ce89d6 Content-Type: text/plain; charset=ISO-8859-1 Yes. This is bug. I also asked about this, but not recieved answer :( 2013/7/31 Markus Hitter > Am 31.07.2013 12:14, schrieb Markus Hitter: > > Hello all, >> >> for automatic G-code preparation I'd like to apply a vendor resource >> file by actions like this: >> >> # Apply vendor drill mapping. >> # See http://pcb.geda-project.org/**pcb-cvs/pcb.html#Vendor-drill-** >> mapping >> echo "units = mm" > vendor.res >> echo "drillmap = {" >> vendor.res >> echo " round = nearest" >> vendor.res >> echo " 0.75" >> vendor.res >> echo " 1.0" >> vendor.res >> echo "}" >> vendor.res >> >> "${PCB}" --action-string " >> LoadFrom(Layout, input.pcb) >> LoadVendorFrom(vendor.res) >> #SaveTo(Layout) >> #Quit() >> " >> >> However, when running this script, pcb core dumps. I can load the very >> same file from the menu just fine. >> >> Anybody seen this problem? >> > > Backtrace is like this: > > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff50f7bbd in getc () from /lib/x86_64-linux-gnu/libc.so.**6 > (gdb) bt > #0 0x00007ffff50f7bbd in getc () from /lib/x86_64-linux-gnu/libc.so.**6 > #1 0x000000000048d5c5 in res_parse_getchars (buf=0x87e9c0 "", > max_size=) at res_parse.y:85 > #2 0x000000000048ea4e in yy_get_next_buffer () at res_lex.c:1111 > #3 reslex () at res_lex.c:953 > #4 0x000000000048dccc in resparse () at res_parse.c:1323 > #5 0x000000000048df96 in resource_parse (filename=filename AT entry=0x0, > strings=strings AT entry=0x771280 ) > at res_parse.y:132 > #6 0x00000000004cde27 in ghid_load_menus () at > hid/gtk/gui-top-window.c:2105 > #7 ghid_build_pcb_top_window () at hid/gtk/gui-top-window.c:1292 > #8 ghid_create_pcb_widgets () at hid/gtk/gui-top-window.c:1576 > #9 0x00000000004cefa6 in ghid_do_export (options=) at > hid/gtk/gui-top-window.c:1801 > #10 0x0000000000426a87 in main (argc=1, argv=0x7fffffffe008) at main.c:2072 > > Let me guess: the resource parser bails out because something else was > parsed before and some global variables of the parsing mechanism are > non-default. > > > > Markus > > -- > - - - - - - - - - - - - - - - - - - - > Dipl. Ing. (FH) Markus Hitter > http://www.jump-ing.de/ > --089e0149c1e4840e4d04e2ce89d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Yes. This is bug.
I also asked about this, b= ut not recieved answer :(


2013/7/31 Markus Hitter <mah AT jump-ing DOT de>
Am 31.07.2013 12:14, schrieb Markus Hitter:<= div class=3D"im">
Hello all,

for automatic G-code preparation I'd like to apply a vendor resource file by actions like this:

# Apply vendor drill mapping.
# See http://pcb.geda-project.org/pcb-cvs/pcb.h= tml#Vendor-drill-mapping
echo "units =3D mm" =A0 =A0 =A0 =A0 =A0 =A0> vendor.res
echo "drillmap =3D {" =A0 =A0 =A0 =A0 >> vendor.res
echo " =A0round =3D nearest" =A0 =A0>> vendor.res
echo " =A00.75" =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> vendor.res echo " =A01.0" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0>> vendor.res=
echo "}" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0>> vendor.r= es

"${PCB}" --action-string "
=A0 =A0LoadFrom(Layout, input.pcb)
=A0 =A0LoadVendorFrom(vendor.res)
=A0 =A0#SaveTo(Layout)
=A0 =A0#Quit()
=A0 =A0"

However, when running this script, pcb core dumps. I can load the very
same file from the menu just fine.

Anybody seen this problem?

Backtrace is like this:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff50f7bbd in getc () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt
#0 =A00x00007ffff50f7bbd in getc () from /lib/x86_64-linux-gnu/libc.so.<= /u>6
#1 =A00x000000000048d5c5 in res_parse_getchars (buf=3D0x87e9c0 ""= , max_size=3D<optimized out>) at res_parse.y:85
#2 =A00x000000000048ea4e in yy_get_next_buffer () at res_lex.c:1111
#3 =A0reslex () at res_lex.c:953
#4 =A00x000000000048dccc in resparse () at res_parse.c:1323
#5 =A00x000000000048df96 in resource_parse (filename=3Dfilename AT entry=3D0x0= , strings=3Dstrings AT entry=3D0x771280 <gpcb_menu_default>)
=A0 =A0 at res_parse.y:132
#6 =A00x00000000004cde27 in ghid_load_menus () at hid/gtk/gui-top-window.c:= 2105
#7 =A0ghid_build_pcb_top_window () at hid/gtk/gui-top-window.c:1292
#8 =A0ghid_create_pcb_widgets () at hid/gtk/gui-top-window.c:1576
#9 =A00x00000000004cefa6 in ghid_do_export (options=3D<optimized out>= ) at hid/gtk/gui-top-window.c:1801
#10 0x0000000000426a87 in main (argc=3D1, argv=3D0x7fffffffe008) at main.c:= 2072

Let me guess: the resource parser bails out because something else was pars= ed before and some global variables of the parsing mechanism are non-defaul= t.



Markus

--
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.d= e/

--089e0149c1e4840e4d04e2ce89d6--