[Gridflow-dev] [bug] segfault in gfmemcopy (with dim[6561, 6561, 3])

ClaudiusMaximus gloriousclaudiusmaximus at yahoo.co.uk
Fri Jul 29 15:50:37 EDT 2005


Hi,

I've been working with some dim[6561,6561,3] grids, and sometimes
Gridflow/Pd segfaults (even with pd -nogui with loadbang to trigger the
calculation, with no other programs running - I have 1GB ram and 1GB swap).

Surprisingly, a patch with [#store] and feedback worked fine at that
image size, but the attached patch segfaults consistently in gfmemcopy.

(I managed to work around the problem by segmenting the calculation into
9 grids of dim[2187,2187,3], which worked well, although it was rather
inconvenient having to stitch the images together by hand in Gimp.)


Claude

gdb backtrace:

#0  0xb79aec31 in gfmemcopy (out=0x0, in=0xb721bbb0 "", n=-1222526032)
    at main.c.fcs:484
#1  0xb7aaa3f6 in GridOp::grin_1<float> (this=0x81656c8, in=0x81c2de0,
    n=-1038745600) at grid.h.fcs:332
#2  0xb7a8314a in GridOp::grinw_1<float> (in=0x10, n=4096)
    at flow_objects.c.fcs:450
#3  0xb79a377c in GridInlet::flow<float> (this=0x81c2de0, mode=4,
n=4096, data=
      {p = 0xb721bbb0}) at grid.c.fcs:235
#4  0xb799f365 in GridOutlet::send_direct<float> (this=0x81cb910,
n=4096, data=
      {p = 0xb721bbb0}) at stl_vector.h:501
#5  0xb79a0e7e in GridOutlet::give<float> (this=0x81cb910, n=4096)
    at grid.c.fcs:420
#6  0xb7aa6951 in GridOp::grin_0<float> (this=0x815b3d0, in=0x81c5a28,
n=4096)
    at grid.h.fcs:372
#7  0xb7a8302a in GridOp::grinw_0<float> (in=0x10, n=4096)
    at flow_objects.c.fcs:411
#8  0xb79a3561 in GridInlet::flow<float> (this=0x81c5a28, mode=6,
n=4096, data=
      {p = 0xb721bbb0}) at grid.h.fcs:886
#9  0xb79a0fc4 in GridOutlet::give<float> (this=0x81cb178, n=4096)
    at stl_vector.h:501
#10 0xb7aa6951 in GridOp::grin_0<float> (this=0x81be2b0, in=0x818fe40,
n=4096)
    at grid.h.fcs:372
#11 0xb7a8302a in GridOp::grinw_0<float> (in=0x10, n=4096)
    at flow_objects.c.fcs:411
#12 0xb79a3561 in GridInlet::flow<float> (this=0x818fe40, mode=6,
n=4096, data=
      {p = 0xb721bbb0}) at grid.h.fcs:886
#13 0xb79a0fc4 in GridOutlet::give<float> (this=0x81911d0, n=4096)
    at stl_vector.h:501
#14 0xb7aa6951 in GridOp::grin_0<float> (this=0x81d1640, in=0x81cd1a0,
n=4096)
    at grid.h.fcs:372
#15 0xb7a8302a in GridOp::grinw_0<float> (in=0x10, n=4096)
    at flow_objects.c.fcs:411
#16 0xb79a377c in GridInlet::flow<float> (this=0x81cd1a0, mode=4,
n=4096, data=
      {p = 0xbfff8c40}) at grid.c.fcs:235
#17 0xb799f365 in GridOutlet::send_direct<float> (this=0x8158730,
n=4096, data=
      {p = 0xbfff8c40}) at stl_vector.h:501
#18 0xb79aad02 in send<float32> (this=0x8158730, n=4096, data={p =
0x8158730})
    at grid.c.fcs:395
#19 0xb79a8f22 in send<int32> (this=0x8158730, n=4096, data={p = 0x820dcb8})
    at grid.c.fcs:388
#20 0xb7a84dc9 in GridCast::grin_0<int> (this=0x8172490, in=0x10, n=16)
    at grid.h.fcs:372
#21 0xb7a8293a in GridCast::grinw_0<int> (in=0x10, n=4096)
    at flow_objects.c.fcs:70
#22 0xb79a21dc in GridInlet::flow<int> (this=0x81a6140, mode=4, n=4096,
data=
      {p = 0x8209cb8}) at grid.c.fcs:235
#23 0xb799ef45 in GridOutlet::send_direct<int> (this=0x81e7968, n=4096,
data=
      {p = 0x8209cb8}) at stl_vector.h:501
#24 0xb79990a9 in GridOutlet::flush (this=0x81e7968) at grid.h.fcs:371
#25 0xb79a9156 in send<int32> (this=0x81e7968, n=128, data={p = 0x1080})
    at grid.c.fcs:393
#26 0xb7ac3ba5 in GridFor::trigger<int> (this=0x8158ed0, bogus=0)
    at grid.h.fcs:372
#27 0xb7a7eae7 in GridFor::_0_bang (this=0x8158ed0, argc=0, argv=0xbfffdaa8)
    at grid.h.fcs:372
#28 0xb7a7e8af in GridFor::_0_bang_wrap (argc=0, argv=0xbfffdaa8,
    rself=3076233168) at flow_objects.c.fcs:786
#29 0xb7cec7a6 in rb_throw () from /usr/lib/libruby18.so.1.8
#30 0xb7cde362 in rb_with_disable_interrupt () from
/usr/lib/libruby18.so.1.8
#31 0xb7cdebe2 in rb_with_disable_interrupt () from
/usr/lib/libruby18.so.1.8
#32 0xb7cdf11d in rb_funcall2 () from /usr/lib/libruby18.so.1.8
#33 0xb79afa76 in send_in_2 (h=0xbfffd7e0) at main.c.fcs:176
#34 0xb7cddc79 in rb_ensure () from /usr/lib/libruby18.so.1.8
#35 0xb79ac3ea in FObject::send_in (this=0x3ff0, argc=16, argv=0x10)
    at main.c.fcs:185
#36 0xb79ac2ad in FObject::send_in_wrap (argc=2, argv=0xbfffdaa0,
    rself=3076233168) at main.c.fcs:183
#37 0xb7cec7a6 in rb_throw () from /usr/lib/libruby18.so.1.8
#38 0xb7cde362 in rb_with_disable_interrupt () from
/usr/lib/libruby18.so.1.8
#39 0xb7cdebe2 in rb_with_disable_interrupt () from
/usr/lib/libruby18.so.1.8
#40 0xb7cdf11d in rb_funcall2 () from /usr/lib/libruby18.so.1.8
#41 0xb7fe759a in BFObject_method_missing_1 (fm=0xbfffdcc0)
    at puredata.c.fcs:226
#42 0xb7cdd9ea in rb_rescue2 () from /usr/lib/libruby18.so.1.8
#43 0xb7fe7c47 in BFObject_method_missing0 (self=0x3ff0, s=0x10, argc=16,
    argv=0x10) at puredata.c.fcs:247
#44 0x0809b8fb in pd_defaultbang (x=0x3ff0) at m_class.c:37
#45 0x0809a0cf in pd_bang (x=0x10) at m_pd.c:269
#46 0x0809c43b in outlet_bang (x=0x3ff0) at m_obj.c:344
#47 0x08083b48 in bng_click (x=0x815bf60, xpos=39, ypos=5, shift=0, ctrl=0,
    alt=0) at g_bang.c:294
#48 0x08083c09 in bng_newclick (z=0x10, glist=0x81d4e40, xpix=39, ypix=5,
    shift=0, alt=0, dbl=0, doit=1) at g_bang.c:343
#49 0x08078de9 in canvas_doclick (x=0x81d4e40, xpos=39, ypos=5, which=1,
    mod=16, doit=1) at g_editor.c:750
#50 0x0807d46b in canvas_mousedown (x=0x10, xpos=0, ypos=0, which=0, mod=0)
    at g_editor.c:1179
#51 0x0809aefd in pd_typedmess (x=0x81d4e40, s=0xc2160000, argc=136138304,
    argv=0x421c0000) at m_class.c:728
#52 0x0809adc6 in pd_typedmess (x=0x81c4b88, s=0xc2160000, argc=4,
    argv=0x80f6328) at m_class.c:749
#53 0x0809e234 in binbuf_eval (x=0x10, target=0x81c4b88, argc=0, argv=0x0)
    at m_binbuf.c:581
#54 0x080a66a0 in socketreceiver_read (x=0x8112150, fd=0) at s_inter.c:510
#55 0x080a82cf in sys_domicrosleep (microsec=16, pollem=1) at s_inter.c:170
#56 0x080a7f0e in sys_pollgui () at s_inter.c:788
#57 0x080a2e98 in m_scheduler () at m_sched.c:459
#58 0x080acdbb in main (argc=16, argv=0x10) at s_entry.c:27


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: BUG--gfmemcopy.pd
Url: http://ns.artengine.ca/pipermail/gridflow-dev/attachments/20050729/15eb1337/BUG--gfmemcopy.cc


More information about the Gridflow-dev mailing list