[PD-dev] [ pure-data-Bugs-1359216 ] print character 123 freezes gui

SourceForge.net noreply at sourceforge.net
Thu Nov 17 20:14:31 CET 2005


Bugs item #1359216, was opened at 2005-11-17 11:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1359216&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: print character 123 freezes gui

Initial Comment:
On WinXP and Miller's pd039_test7 typing '{' (ascii
123) after print in an object box hangs the gui,
apparently because the tcl is waiting for a closing '}'
before proceeding.

In the source code, dopost() in s_print.c, it looks
like four characters are  escaped: '\', '{', '}', and ';'.
But if they are escaped they should not freeze the gui...

static void dopost(const char *s)
{
...
           if (c == '\' || c == '{' || c == '}' || c
== ';') <- if  it's a dangerous character for tcl
               upbuf[ptout++] = '\'; <- add a
backslash before the  dangerous character
           upbuf[ptout] = s[ptin]; <- then put the
character
...
       sys_vgui("pdtk_post {%s}\n", upbuf); <- then
send it to tcl  interpreter

If I try entering them in a print box I get different
results. '\' and  '}' are rejected:
\}: dropped
\: dropped
';' is accepted
'{' freezes the gui.

In g_editor.c:

void canvas_key(t_canvas *x, t_symbol *s, int ac,
t_atom *av)
{

...
   if (keynum == '\' || keynum == '{' || keynum ==
'}') <-a dangerous  character
   {
       post("%c: dropped", (int)keynum); <-should be
dropped, but for  '{' this doesn't get printed
       return;
   }
...dopost() is called from post() so '{' is causing
trouble even when  it is escaped with a backslash.

Submitted by Martin Peach
martinrp at vax2.condordia.ca


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1359216&group_id=55736




More information about the Pd-dev mailing list