howdy, [cyclone/comment] from latest available version in deken (0.2 beta-1) works on:
Pd Extended 0.42-5
Pd Vanilla 0.46-7 32 bits Pd Vanilla 0.46-7 64 bits
Pd Vanilla 0.47-0 64 bits
but it does not work on pd 0.47-0 32 bits - simply nothing (no comments) show up
Though I'm working on cyclone, I haven't touched this object yet, I was just testing them all in the new version to see if they load (maybe I'll find more issues?). Anyway, this seems to me more of an issue related to the new pd update than the code itself, potentially affecting other codes/objects. So I'm writing this list to see what we can find that changed in the new version that would collaborate to this.
code attached
I may have found the answer to this. Take a look at the following code.
==================================== comment.c, line 316:
if (!glist->gl_havewindow)
====================================
=================================================== Pd 0.47, g_canvas.h:
struct _glist { t_object gl_obj; /* header in case we're a glist */ t_gobj *gl_list; /* the actual data */ struct _gstub *gl_stub; /* safe pointer handler */ int gl_valid; /* incremented when pointers might be stale */ struct _glist *gl_owner; /* parent glist, supercanvas, or 0 if none */ int gl_pixwidth; /* width in pixels (on parent, if a graph) */ int gl_pixheight; t_float gl_x1; /* bounding rectangle in our own coordinates */ t_float gl_y1; t_float gl_x2; t_float gl_y2; int gl_screenx1; /* screen coordinates when toplevel */ int gl_screeny1; int gl_screenx2; int gl_screeny2; int gl_xmargin; /* origin for GOP rectangle */ int gl_ymargin; t_tick gl_xtick; /* ticks marking X values */ int gl_nxlabels; /* number of X coordinate labels */ t_symbol **gl_xlabel; /* ... an array to hold them */ t_float gl_xlabely; /* ... and their Y coordinates */ t_tick gl_ytick; /* same as above for Y ticks and labels */ int gl_nylabels; t_symbol **gl_ylabel; t_float gl_ylabelx; t_editor *gl_editor; /* editor structure when visible */ t_symbol *gl_name; /* symbol bound here */ int gl_font; /* nominal font size in points, e.g., 10 */
*/
changed */ unsigned int gl_loading:1; /* am now loading from file */ unsigned int gl_willvis:1; /* make me visible after loading */ unsigned int gl_edit:1; /* edit mode */ unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */ unsigned int gl_goprect:1; /* draw rectangle for graph-on-parent */ unsigned int gl_isgraph:1; /* show as graph on parent */ unsigned int gl_hidetext:1; /* hide object-name + args when doing graph on parent */ unsigned int gl_private:1; /* private flag used in x_scalar.c */ unsigned int gl_isclone:1; /* esists as part of a clone object */ }; ===========================================================
The new gl_zoom member comes before a few of the old members, so if you try to load the library in a version it wasn't compiled against, anything after gl_zoom will be garbage (not sure why it works in 0.47 64 bit, but it may be accessing some misaligned bytes that just happen to work out).
The fix will simply be to move the gl_zoom member to the end of the _glist declaration.
Matt
On Sun, May 22, 2016 at 12:23 PM, Alexandre Torres Porres porres@gmail.com wrote:
howdy, [cyclone/comment] from latest available version in deken (0.2 beta-1) works on:
Pd Extended 0.42-5
Pd Vanilla 0.46-7 32 bits Pd Vanilla 0.46-7 64 bits
Pd Vanilla 0.47-0 64 bits
but it does not work on pd 0.47-0 32 bits - simply nothing (no comments) show up
Though I'm working on cyclone, I haven't touched this object yet, I was just testing them all in the new version to see if they load (maybe I'll find more issues?). Anyway, this seems to me more of an issue related to the new pd update than the code itself, potentially affecting other codes/objects. So I'm writing this list to see what we can find that changed in the new version that would collaborate to this.
code attached
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
This may also fix the moonlib knob problem.
On Thu, Jun 30, 2016 at 8:57 PM, Matt Barber brbrofsvl@gmail.com wrote:
I may have found the answer to this. Take a look at the following code.
==================================== comment.c, line 316:
if (!glist->gl_havewindow)
====================================
=================================================== Pd 0.47, g_canvas.h:
struct _glist { t_object gl_obj; /* header in case we're a glist */ t_gobj *gl_list; /* the actual data */ struct _gstub *gl_stub; /* safe pointer handler */ int gl_valid; /* incremented when pointers might be stale */ struct _glist *gl_owner; /* parent glist, supercanvas, or 0 if none */ int gl_pixwidth; /* width in pixels (on parent, if a graph) */ int gl_pixheight; t_float gl_x1; /* bounding rectangle in our own coordinates */ t_float gl_y1; t_float gl_x2; t_float gl_y2; int gl_screenx1; /* screen coordinates when toplevel */ int gl_screeny1; int gl_screenx2; int gl_screeny2; int gl_xmargin; /* origin for GOP rectangle */ int gl_ymargin; t_tick gl_xtick; /* ticks marking X values */ int gl_nxlabels; /* number of X coordinate labels */ t_symbol **gl_xlabel; /* ... an array to hold them */ t_float gl_xlabely; /* ... and their Y coordinates */ t_tick gl_ytick; /* same as above for Y ticks and labels */ int gl_nylabels; t_symbol **gl_ylabel; t_float gl_ylabelx; t_editor *gl_editor; /* editor structure when visible */ t_symbol *gl_name; /* symbol bound here */ int gl_font; /* nominal font size in points, e.g., 10 */
- int gl_zoom; /* zoom factor (integer zoom-in only) */* struct _glist *gl_next; /* link in list of toplevels */ t_canvasenvironment *gl_env; /* root canvases and abstractions only
*/
- unsigned int gl_havewindow:1; /* true if we own a window */* unsigned int gl_mapped:1; /* true if, moreover, it's "mapped" */ unsigned int gl_dirty:1; /* (root canvas only:) patch has
changed */ unsigned int gl_loading:1; /* am now loading from file */ unsigned int gl_willvis:1; /* make me visible after loading */ unsigned int gl_edit:1; /* edit mode */ unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */ unsigned int gl_goprect:1; /* draw rectangle for graph-on-parent */ unsigned int gl_isgraph:1; /* show as graph on parent */ unsigned int gl_hidetext:1; /* hide object-name + args when doing graph on parent */ unsigned int gl_private:1; /* private flag used in x_scalar.c */ unsigned int gl_isclone:1; /* esists as part of a clone object */ }; ===========================================================
The new gl_zoom member comes before a few of the old members, so if you try to load the library in a version it wasn't compiled against, anything after gl_zoom will be garbage (not sure why it works in 0.47 64 bit, but it may be accessing some misaligned bytes that just happen to work out).
The fix will simply be to move the gl_zoom member to the end of the _glist declaration.
Matt
On Sun, May 22, 2016 at 12:23 PM, Alexandre Torres Porres < porres@gmail.com> wrote:
howdy, [cyclone/comment] from latest available version in deken (0.2 beta-1) works on:
Pd Extended 0.42-5
Pd Vanilla 0.46-7 32 bits Pd Vanilla 0.46-7 64 bits
Pd Vanilla 0.47-0 64 bits
but it does not work on pd 0.47-0 32 bits - simply nothing (no comments) show up
Though I'm working on cyclone, I haven't touched this object yet, I was just testing them all in the new version to see if they load (maybe I'll find more issues?). Anyway, this seems to me more of an issue related to the new pd update than the code itself, potentially affecting other codes/objects. So I'm writing this list to see what we can find that changed in the new version that would collaborate to this.
code attached
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 07/01/2016 04:34 AM, Matt Barber wrote:
This may also fix the moonlib knob problem.
which moonlib/knob problem? the only problem i'm aware of was that the "iemgui_all_colfromload" went missing in 0.47-0 (and made a re-appearance in 0.47-1). but this is unrelated to struct-members.
gfmsadr IOhannes
You're right, sorry. I was remembering this bit of code in moonlib/mknob.c, which accesses gl_isgraph:
/* GOP objects are unable to call findrtext triggering consistency
check error */ t_rtext *yyyy = NULL; if (!glist->gl_isgraph || glist_istoplevel(glist)) yyyy = glist_findrtext(canvas, (t_text *)&ob->ob_g); /* on GOP we cause segfault as apparently text_gettag() returns bogus data */ char *nlet_tag; if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus";
On Fri, Jul 1, 2016 at 5:11 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 07/01/2016 04:34 AM, Matt Barber wrote:
This may also fix the moonlib knob problem.
which moonlib/knob problem? the only problem i'm aware of was that the "iemgui_all_colfromload" went missing in 0.47-0 (and made a re-appearance in 0.47-1). but this is unrelated to struct-members.
gfmsadr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I grepped through a bunch of externals. Here's a list of what might be affected, arranged by the _glist struct members:
gl_next: iem/iemguts/src/findbrokenobjects.c:132: for (c = pd_getcanvaslist(); c; c = c->gl_next) { moonlib/absolutepath.c:73: if((!retcan)&&(can->gl_next)) retcan=getcanvas((t_glist *)can->gl_next,d0); moonlib/relativepath.c:73: if((!retcan)&&(can->gl_next)) retcan=getcanvas((t_glist *)can->gl_next,d0);
gl_env: moonlib/absolutepath.c:60: if((can->gl_env)&&(can->gl_env->ce_dollarzero==d0)) moonlib/absolutepath.c:94: //post("found $0 canvas : %x %d ",x->x_canvas, x->x_canvas->gl_env->ce_dollarzero ); moonlib/relativepath.c:60: if((can->gl_env)&&(can->gl_env->ce_dollarzero==d0)) moonlib/relativepath.c:92: //post("found $0 canvas : %x %d ",x->x_canvas, x->x_canvas->gl_env->ce_dollarzero ); pdp/opengl/system/pdp_3Dcontext_glx.c:43:typedef struct _gl_env pdp/opengl/system/pdp_3Dcontext_glx.c:56:} t_gl_env; pdp/opengl/system/pdp_3Dcontext_glx.c:58:static t_gl_env pdp_glx_env; tof/src/tof.h:44: return (canvas->gl_env != 0);
gl_havewindow: grill/trunk/flext/source/flattr_ed.cpp:795: if(!gl->gl_isgraph || gl->gl_havewindow) { grill/trunk/flext/source/flattr_ed.cpp:828: if(!gl->gl_isgraph || gl->gl_havewindow) { miXed/cyclone/hammer/comment.c:343: if (!glist->gl_havewindow) miXed/cyclone/hammer/comment.c:491: if (glist->gl_havewindow) miXed/pddp/pddplink.c:95: if (glist_isvisible(glist) && glist->gl_havewindow) miXed/pddp/pddplink.c:120: if ((glist->gl_havewindow || x->x_isgopvisible) miXed/pddp/pddplink.c:130: if ((glist->gl_havewindow || x->x_isgopvisible) miXed/pddp/pddplink.c:192: if (glist->gl_havewindow || x->x_isgopvisible) miXed/toxy/pluswidget.c:142: if (glist_isvisible(glist) && glist->gl_havewindow) miXed/toxy/pluswidget.c:172: if (glist->gl_havewindow) miXed/toxy/pluswidget.c:183: if (glist->gl_havewindow) miXed/toxy/pluswidget.c:195: if (glist->gl_havewindow) miXed/toxy/widget.c:966: if (x->x_glist->gl_havewindow) /* LATER calculate on-parent coords */ miXed/toxy/widget.c:985: if (x->x_glist->gl_havewindow) /* LATER calculate on-parent coords */ pddp/helplink.c:99: if (glist_isvisible(glist) && glist->gl_havewindow) pddp/helplink.c:132: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/helplink.c:151: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/helplink.c:184: if (glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:99: if (glist_isvisible(glist) && glist->gl_havewindow) pddp/pddplink.c:152: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:180: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:249: if (glist->gl_havewindow || x->x_isgopvisible)
gl_mapped: miXed/shared/hammer/file.c:447: return (f->f_canvas->gl_mapped);
gl_loading: miXed/shared/hammer/file.c:452: return (f->f_canvas->gl_loading); miXed/shared/hammer/file.c:460: if (!cv->gl_loading) olafmatt/clone/clone.c:156: cv->gl_loading = 0;
gl_edit: bbogart/entry/entry.c:448: DEBUG(post("entry_click x:%d y:%d edit: %d", xpix, ypix, x->x_canvas->gl_edit);); bbogart/entry/entry.c:682: if( (x->x_glist->gl_edit) && (x->x_glist == x->x_canvas) ) ggee/gui/image.c:169: if ((glist_getcanvas(glist) != glist && !x->x_click) || (!glist->gl_edit && !x->x_click)) miXed/cyclone/hammer/comment.c:238: if (x->x_glist->gl_edit) miXed/shared/toxy/scriptlet.c:345: sprintf(obuf, "%d", cv->gl_edit); miXed/toxy/widget.c:935: int disable = (int)f && x->x_glist->gl_edit; tkwidgets/text.c:355: DEBUG(post("textwidget_click x:%d y:%d edit: %d", xpix, ypix, x->x_canvas->gl_edit););
gl_isgraph: grill/trunk/flext/source/flattr_ed.cpp:795: if(!gl->gl_isgraph || gl->gl_havewindow) { grill/trunk/flext/source/flattr_ed.cpp:828: if(!gl->gl_isgraph || gl->gl_havewindow) { moonlib/mknob.c:135: if (!glist->gl_isgraph || glist_istoplevel(glist)) moonlib/mknob.c:243: if (!glist->gl_isgraph || glist_istoplevel(glist))
On Fri, Jul 1, 2016 at 9:55 AM, Matt Barber brbrofsvl@gmail.com wrote:
You're right, sorry. I was remembering this bit of code in moonlib/mknob.c, which accesses gl_isgraph:
/* GOP objects are unable to call findrtext triggering consistency check error */ t_rtext *yyyy = NULL; if (!glist->gl_isgraph || glist_istoplevel(glist)) yyyy = glist_findrtext(canvas, (t_text *)&ob->ob_g); /* on GOP we cause segfault as apparently text_gettag() returns bogus data */ char *nlet_tag; if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus";
On Fri, Jul 1, 2016 at 5:11 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 07/01/2016 04:34 AM, Matt Barber wrote:
This may also fix the moonlib knob problem.
which moonlib/knob problem? the only problem i'm aware of was that the "iemgui_all_colfromload" went missing in 0.47-0 (and made a re-appearance in 0.47-1). but this is unrelated to struct-members.
gfmsadr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 2016-07-01 10:21 PM, Matt Barber wrote:
I grepped through a bunch of externals. Here's a list of what might be affected, arranged by the _glist struct members:
Not all of these are in the later versions of pd-extended. Some time ago I made a list of what is in Sourceforge and part of pd-extended, mainly to get an overview of the used build systems and dependencies.
Libraries prefixed with a '+' were part of the latest pd-extended, those with a '-' were discontinued. See https://puredata.info/dev/pd_webwiki/ExternalsInventory.
At least for the objects that depend on tof.h there is no problem with Pd 0.47.0 on Linux 32 bits. But these are not GUI objects.
Fred Jan
gl_next: iem/iemguts/src/findbrokenobjects.c:132: for (c = pd_getcanvaslist(); c; c = c->gl_next) { moonlib/absolutepath.c:73: if((!retcan)&&(can->gl_next)) retcan=getcanvas((t_glist *)can->gl_next,d0); moonlib/relativepath.c:73: if((!retcan)&&(can->gl_next)) retcan=getcanvas((t_glist *)can->gl_next,d0);
gl_env: moonlib/absolutepath.c:60: if((can->gl_env)&&(can->gl_env->ce_dollarzero==d0)) moonlib/absolutepath.c:94: //post("found $0 canvas : %x %d ",x->x_canvas, x->x_canvas->gl_env->ce_dollarzero ); moonlib/relativepath.c:60: if((can->gl_env)&&(can->gl_env->ce_dollarzero==d0)) moonlib/relativepath.c:92: //post("found $0 canvas : %x %d ",x->x_canvas, x->x_canvas->gl_env->ce_dollarzero ); pdp/opengl/system/pdp_3Dcontext_glx.c:43:typedef struct _gl_env pdp/opengl/system/pdp_3Dcontext_glx.c:56:} t_gl_env; pdp/opengl/system/pdp_3Dcontext_glx.c:58:static t_gl_env pdp_glx_env; tof/src/tof.h:44:return (canvas->gl_env != 0);
gl_havewindow: grill/trunk/flext/source/flattr_ed.cpp:795: if(!gl->gl_isgraph || gl->gl_havewindow) { grill/trunk/flext/source/flattr_ed.cpp:828: if(!gl->gl_isgraph || gl->gl_havewindow) { miXed/cyclone/hammer/comment.c:343: if (!glist->gl_havewindow) miXed/cyclone/hammer/comment.c:491:if (glist->gl_havewindow) miXed/pddp/pddplink.c:95: if (glist_isvisible(glist) && glist->gl_havewindow) miXed/pddp/pddplink.c:120: if ((glist->gl_havewindow || x->x_isgopvisible) miXed/pddp/pddplink.c:130: if ((glist->gl_havewindow || x->x_isgopvisible) miXed/pddp/pddplink.c:192: if (glist->gl_havewindow || x->x_isgopvisible) miXed/toxy/pluswidget.c:142: if (glist_isvisible(glist) && glist->gl_havewindow) miXed/toxy/pluswidget.c:172: if (glist->gl_havewindow) miXed/toxy/pluswidget.c:183: if (glist->gl_havewindow) miXed/toxy/pluswidget.c:195: if (glist->gl_havewindow) miXed/toxy/widget.c:966: if (x->x_glist->gl_havewindow) /* LATER calculate on-parent coords */ miXed/toxy/widget.c:985: if (x->x_glist->gl_havewindow) /* LATER calculate on-parent coords */ pddp/helplink.c:99: if (glist_isvisible(glist) && glist->gl_havewindow) pddp/helplink.c:132: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/helplink.c:151: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/helplink.c:184: if (glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:99: if (glist_isvisible(glist) && glist->gl_havewindow) pddp/pddplink.c:152: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:180: if ((glist->gl_havewindow || x->x_isgopvisible) pddp/pddplink.c:249: if (glist->gl_havewindow || x->x_isgopvisible)
gl_mapped: miXed/shared/hammer/file.c:447: return (f->f_canvas->gl_mapped);
gl_loading: miXed/shared/hammer/file.c:452: return (f->f_canvas->gl_loading); miXed/shared/hammer/file.c:460: if (!cv->gl_loading) olafmatt/clone/clone.c:156: cv->gl_loading = 0;
gl_edit: bbogart/entry/entry.c:448: DEBUG(post("entry_click x:%d y:%d edit: %d", xpix, ypix, x->x_canvas->gl_edit);); bbogart/entry/entry.c:682: if( (x->x_glist->gl_edit) && (x->x_glist == x->x_canvas) ) ggee/gui/image.c:169: if ((glist_getcanvas(glist) != glist && !x->x_click) || (!glist->gl_edit && !x->x_click)) miXed/cyclone/hammer/comment.c:238: if (x->x_glist->gl_edit) miXed/shared/toxy/scriptlet.c:345: sprintf(obuf, "%d", cv->gl_edit); miXed/toxy/widget.c:935: int disable = (int)f && x->x_glist->gl_edit; tkwidgets/text.c:355: DEBUG(post("textwidget_click x:%d y:%d edit: %d", xpix, ypix, x->x_canvas->gl_edit););
gl_isgraph: grill/trunk/flext/source/flattr_ed.cpp:795: if(!gl->gl_isgraph || gl->gl_havewindow) { grill/trunk/flext/source/flattr_ed.cpp:828: if(!gl->gl_isgraph || gl->gl_havewindow) { moonlib/mknob.c:135: if (!glist->gl_isgraph || glist_istoplevel(glist)) moonlib/mknob.c:243: if (!glist->gl_isgraph || glist_istoplevel(glist))
On Fri, Jul 1, 2016 at 9:55 AM, Matt Barber <brbrofsvl@gmail.com mailto:brbrofsvl@gmail.com> wrote:
You're right, sorry. I was remembering this bit of code in moonlib/mknob.c, which accesses gl_isgraph: |/* GOP objects are unable to call findrtext triggering consistency check error */ t_rtext *yyyy = NULL; if (!glist->gl_isgraph || glist_istoplevel(glist)) yyyy = glist_findrtext(canvas, (t_text *)&ob->ob_g); /* on GOP we cause segfault as apparently text_gettag() returns bogus data */ char *nlet_tag; if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus";| On Fri, Jul 1, 2016 at 5:11 AM, IOhannes m zmölnig <zmoelnig@iem.at <mailto:zmoelnig@iem.at>> wrote: On 07/01/2016 04:34 AM, Matt Barber wrote: > This may also fix the moonlib knob problem. which moonlib/knob problem? the only problem i'm aware of was that the "iemgui_all_colfromload" went missing in 0.47-0 (and made a re-appearance in 0.47-1). but this is unrelated to struct-members. gfmsadr IOhannes _______________________________________________ Pd-list@lists.iem.at <mailto:Pd-list@lists.iem.at> mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list