[PD-dev] "Consistency check failed: drawline" on linux, segfault on OSX.

B. Bogart ben at ekran.org
Tue Sep 21 19:21:12 CEST 2004


Hey all,

I'm trying to debug a few crashes I've been having on OSX but as I get closer to 
the cause I'm getting less and less understanding of why it is happening!

I'm attaching two abstractions: entry-gop-crash.pd and entry-gop-nocrash.pd

They require nothing but the "entry" external from CVS/externals/bbogart.

If you create a new patch and use these abstractions (on OSX) everything works 
fine. If you delete the "nocrash" abstraction everything works fine. If you 
delete the "crash" abstraction PD segfaults. I've included the traces for two of 
the different segfaults I get when deleting this abstraction at the end of the 
message.

On linux deleting neither abstraction crashes. Deleting "crash" does print to 
the console:

Consistency check failed: drawline
Consistency check failed: drawline

Deleting "nocrash" prints nothing and deletes cleanly.

So onto the difference between these two patches.

Opening the patches yeilds very little, they both have the same objects 
connected in the same way. The only difference is the order in which they are 
connected:

entry-gop-nocrash:
#N canvas 659 155 543 512 10;
#X obj 68 296 s \$0-text;
#X msg 89 127 clear;
#X obj 53 184 entry 124 75 white black;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X coords 0 0 1 1 130 142 1;

entry-gop-crash:
#N canvas 659 155 543 512 10;
#X obj 53 184 entry 124 75 white black;
#X obj 67 294 s \$0-text;
#X msg 110 150 clear;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
#X coords 0 0 1 1 130 142 1;

I'm using PD 0.37.1 TEST6 on linux and 0.37.1 on OSX.

I think that is all the information I have on this issue. I've fixed some of my 
abstractions by cut/pasting the entry and/or popup boxes (which also causes 
problems) and then reconnecting. I do really have no idea why this is happening 
and would love to avoid it in the future!

Thanks all for your time.
Ben Bogart

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x00033944 in obj_ninlets (x=0x437e00) at m_obj.c:505
505         for (i = x->ob_inlet, n = 0; i; i = i->i_next) n++;
(gdb) where
#0  0x00033944 in obj_ninlets (x=0x437e00) at m_obj.c:505
#1  0x00002f18 in linetraverser_next (t=0xbffff4c0) at g_canvas.c:305
#2  0x00004510 in canvas_deletelinesfor (x=0x437850, text=0x438120) at 
g_canvas.c:907
#3  0x00005c10 in glist_delete (x=0x437850, y=0x438120) at g_graph.c:93
#4  0x000080a8 in graph_delete (z=0x438120, glist=0xbffff4d0) at g_graph.c:945
#5  0x00005c10 in glist_delete (x=0x437850, y=0x438120) at g_graph.c:93
#6  0x0001d340 in canvas_doclear (x=0x435550) at g_editor.c:1850
#7  0x0001c37c in canvas_key (x=0x435550, s=0xbffff4d0, ac=-1073744680, 
av=0x6bf48) at g_editor.c:1468
#8  0x00032738 in pd_typedmess (x=0x8, s=0x437e00, argc=211400, argv=0xbffff338) 
at m_class.c:740
#9  0x00032738 in pd_typedmess (x=0x8, s=0x437e00, argc=211400, argv=0xbffff338) 
at m_class.c:740
#10 0x000356ac in binbuf_eval (x=0x0, target=0x437200, argc=442184, argv=0x0) at 
m_binbuf.c:578
#11 0x0003a6d0 in socketreceiver_read (x=0x6bf48, fd=8) at s_inter.c:379
#12 0x0003a1e8 in sys_domicrosleep (microsec=0, pollem=-1073744688) at s_inter.c:216
#13 0x00038ab4 in m_scheduler () at m_sched.c:472
#14 0x00002464 in _start (argc=462556, argv=0x0, envp=0x0) at 
/SourceCache/Csu/Csu-47/crt.c:267
#15 0x8fe1a700 in __dyld__dyld_start ()
(gdb)

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x00019104 in gobj_getrect (x=0x43caf0, glist=0x43ca50, x1=0xbffff4f4, 
y1=0xbffff4f8, x2=0xbffff4fc, y2=0xbffff500) at g_editor.c:34
34          if (x->g_pd->c_wb && x->g_pd->c_wb->w_getrectfn)
(gdb) where
#0  0x00019104 in gobj_getrect (x=0x43caf0, glist=0x43ca50, x1=0xbffff4f4, 
y1=0xbffff4f8, x2=0xbffff4fc, y2=0xbffff500) at g_editor.c:34
#1  0x00002f84 in linetraverser_next (t=0xbffff4c0) at g_canvas.c:311
#2  0x00004510 in canvas_deletelinesfor (x=0x43ca50, text=0x152b280) at 
g_canvas.c:907
#3  0x00005c10 in glist_delete (x=0x43ca50, y=0x152b280) at g_graph.c:93
#4  0x000080a8 in graph_delete (z=0x152b280, glist=0x43ca50) at g_graph.c:945
#5  0x00005c10 in glist_delete (x=0x43ca50, y=0x152b280) at g_graph.c:93
#6  0x0001d340 in canvas_doclear (x=0x40b7d0) at g_editor.c:1850
#7  0x0001c37c in canvas_key (x=0x40b7d0, s=0x43ca50, ac=-1073744652, 
av=0x6bf48) at g_editor.c:1468
#8  0x00032738 in pd_typedmess (x=0x8, s=0x43caf0, argc=-1073744640, 
argv=0xbffff4fc) at m_class.c:740
#9  0x00032738 in pd_typedmess (x=0x8, s=0x43caf0, argc=-1073744640, 
argv=0xbffff4fc) at m_class.c:740
#10 0x000356ac in binbuf_eval (x=0x43caf0, target=0x444320, argc=442184, 
argv=0x0) at m_binbuf.c:578
#11 0x0003a6d0 in socketreceiver_read (x=0x6bf48, fd=8) at s_inter.c:379
#12 0x0003a1e8 in sys_domicrosleep (microsec=4442864, pollem=4442704) at 
s_inter.c:216
#13 0x00038ab4 in m_scheduler () at m_sched.c:472
#14 0x00002464 in _start (argc=462556, argv=0x0, envp=0x0) at 
/SourceCache/Csu/Csu-47/crt.c:267
#15 0x8fe1a700 in __dyld__dyld_start ()

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: entry-gop-crash.pd
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20040921/cd6b41e4/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: entry-gop-nocrash.pd
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20040921/cd6b41e4/attachment.txt>


More information about the Pd-dev mailing list