[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-bug: Core dump in pcb:M_POLYAREA_intersect()



Hi,

Here is a core-dump that occurs from pcb in M_POLYAREA_intersect(). It happened while I was making a selection rectangle. In the call to RectPoly() from r_NoHolesPolygonDicer(), p->xmin > (p->next->xmin+p->next->xmax)/2 and poly_AndSubtract_free() does not install a contour in poly2.

Regards,

Rob Jenssen



gdb71 pcb pcb.core

GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd8.1".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/pcb...done.
[New Thread 100157]
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libdbus-1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libdbus-1.so.3
Reading symbols from /usr/local/lib/libXrender.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXrender.so.1
Reading symbols from /usr/local/lib/libglib-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.0
Reading symbols from /usr/local/lib/libgtk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libgdk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libatk-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libatk-1.0.so.0
Reading symbols from /usr/local/lib/libgdk_pixbuf-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/local/lib/libpangocairo-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpangocairo-1.0.so.0
Reading symbols from /usr/local/lib/libXext.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXext.so.6
Reading symbols from /usr/local/lib/libXinerama.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXinerama.so.1
Reading symbols from /usr/local/lib/libXi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXi.so.6
Reading symbols from /usr/local/lib/libXrandr.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXrandr.so.2
Reading symbols from /usr/local/lib/libXcursor.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXcursor.so.1
Reading symbols from /usr/local/lib/libXcomposite.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXcomposite.so.1
Reading symbols from /usr/local/lib/libXdamage.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXdamage.so.1
Reading symbols from /usr/local/lib/libpangoft2-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/local/lib/libgio-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgio-2.0.so.0
Reading symbols from /usr/local/lib/libXfixes.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXfixes.so.3
Reading symbols from /usr/local/lib/libcairo.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libcairo.so.2
Reading symbols from /usr/local/lib/libX11.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libX11.so.6
Reading symbols from /usr/local/lib/libpango-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpango-1.0.so.0
Reading symbols from /usr/local/lib/libfreetype.so.9...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libfontconfig.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libgobject-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgobject-2.0.so.0
Reading symbols from /usr/local/lib/libgmodule-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgmodule-2.0.so.0
Reading symbols from /usr/local/lib/libgthread-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgthread-2.0.so.0
Reading symbols from /usr/local/lib/libgd.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgd.so.4
Reading symbols from /usr/local/lib/libintl.so.9...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libicui18n.so.38...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libicui18n.so.38
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/local/lib/libpcre.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /usr/local/lib/libpixman-1.so.9...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpixman-1.so.9
Reading symbols from /usr/local/lib/libpng.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpng.so.6
Reading symbols from /usr/local/lib/libxcb-render-util.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb-render-util.so.0
Reading symbols from /usr/local/lib/libxcb-render.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb-render.so.0
Reading symbols from /usr/local/lib/libxcb.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxcb.so.2
Reading symbols from /usr/local/lib/libXau.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXau.so.6
Reading symbols from /usr/local/lib/libXdmcp.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libXdmcp.so.6
Reading symbols from /usr/local/lib/libpthread-stubs.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpthread-stubs.so.0
Reading symbols from /usr/lib/librpcsvc.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librpcsvc.so.5
Reading symbols from /lib/libz.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /usr/local/lib/libexpat.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/local/lib/libjpeg.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libjpeg.so.11
Reading symbols from /usr/local/lib/libicuuc.so.38...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libicuuc.so.38
Reading symbols from /usr/local/lib/libicudata.so.38...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libicudata.so.38
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so Reading symbols from /usr/local/lib/gtk-2.0/2.10.0/engines/libclearlooks.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/gtk-2.0/2.10.0/engines/libclearlooks.so
Reading symbols from /usr/local/lib/pango/1.6.0/modules/pango-basic-fc.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/pango/1.6.0/modules/pango-basic-fc.so
Reading symbols from /usr/local/lib/gio/modules/libgvfsdbus.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/gio/modules/libgvfsdbus.so
Reading symbols from /usr/local/lib/libgvfscommon.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgvfscommon.so.0
Reading symbols from /lib/libutil.so.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.8
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
Core was generated by `pcb'.
Program terminated with signal 11, Segmentation fault.
#0 0x080d5557 in M_POLYAREA_intersect (e=0xbfbfcd74, afst=0x2a882330, bfst=0x2a8821b0, add=1) at polygon1.c:814
814		  if (a->contours->xmax >= b->contours->xmin &&
(gdb) l 804
799	}
800	
801	static void
802 M_POLYAREA_intersect (jmp_buf * e, POLYAREA * afst, POLYAREA * bfst, int add)
803	{
804	  POLYAREA *a = afst, *b = bfst;
805	  PLINE *curcA, *curcB;
806	  CVCList *the_list = NULL;
807	
808	  if (a == NULL || b == NULL)
(gdb) 809	    error (err_bad_parm);
810	  do
811	    {
812	      do
813		{
814		  if (a->contours->xmax >= b->contours->xmin &&
815		      a->contours->ymax >= b->contours->ymin &&
816		      a->contours->xmin <= b->contours->xmax &&
817		      a->contours->ymin <= b->contours->ymax)
818		    {
(gdb) p *b
$1 = {f = 0x2a8821b0, b = 0x2a8821b0, contours = 0x0}
(gdb) up
#1 0x080d6d64 in poly_AndSubtract_free (ai=0x2a882330, bi=0x2a8821b0, aandb=0xbfbfcdd8, aminusb=0xbfbfcdd4) at polygon1.c:1759
1759	      M_POLYAREA_intersect (&e, a, b, TRUE);
(gdb) #2 0x080d3a3f in r_NoHolesPolygonDicer (pa=0x2a882330, emit=0x81072a0 <fill_contour_cb>, user_data=0x2a582de0) at polygon.c:1653
1653	      poly_AndSubtract_free (pa, poly2, &left, &right);
(gdb) p *poly2
$2 = {f = 0x2a8821b0, b = 0x2a8821b0, contours = 0x0}
(gdb) l
1648	      POLYAREA *poly2, *left, *right;
1649	
1650 /* make a rectangle of the left region slicing through the middle of the first hole */
1651	      poly2 = RectPoly (p->xmin, (p->next->xmin + p->next->xmax) / 2,
1652	                        p->ymin, p->ymax);
1653	      poly_AndSubtract_free (pa, poly2, &left, &right);
1654	      if (left)
1655	        {
1656	          POLYAREA *cur, *next;
1657	          cur = left;
(gdb) p *p
$3 = {xmin = 188218, ymin = 270428, xmax = 237457, ymax = 322494, next = 0x2e985520, head = {next = 0x2e99e860, prev = 0x2e99ed40, shared = 0x0, Flags = {status = 0, mark = 0}, cvc_prev = 0x0, cvc_next = 0x0, point = {188218, 270428}}, Count = 41, area = 2470869742, tree = 0x2a840778, is_round = 0, cx = 0, cy = 0, radius = 0, Flags = {
    status = 0, orient = 1}}
(gdb) p *p->next
$4 = {xmin = 161797, ymin = 315250, xmax = 202251, ymax = 322494, next = 0x2e985580, head = {next = 0x2e99d4a0, prev = 0x2e99db40, shared = 0x0, Flags = {status = 0, mark = 0}, cvc_prev = 0x0, cvc_next = 0x0, point = {202250, 320000}}, Count = 55, area = 131513049, tree = 0x2a840760, is_round = 0, cx = 0, cy = 0, radius = 0, Flags = {
    status = 0, orient = 0}}
(gdb) p (p->next->xmin + p->next->xmax) / 2
$5 = 182024




_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug