[PD] TouchOSC makes Pd crash, on UbuntuStudio, not in Ubuntu

Matthias Kronlachner m.kronlachner at gmail.com
Mon Sep 16 22:12:59 CEST 2013


Hi!

I experience this bug today as well.
Attached is a Pd-patch that simulates this crash caused by the message 
TouchOSC is sending if page is turned (although this can be changed in 
the TouchOSC editor!).

This is the gdb output:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x045f1c59 in routeOSC_list (x=0x5e5990, s=0x0, argc=0, argv=0x0) at 
routeOSC.c:410
410        if (argv[0].a_type == A_SYMBOL) routeOSC_doanything(x, 
argv[0].a_w.w_symbol, argc-1, &argv[1]);

I attached an easy fix for routeOSC.c


So either rebuild routeOSC with the fix or change the message TouchOSC 
is sending on page turn.
(This is done by deactivating the auto checkbox below Page, Name and OSC)


Matthias

On 9/16/13 7:46 PM, Martin Peach wrote:
> It sounds like you have two issues: one is that the new external 
> crashes Pd as soon as it is instantiated, the other is that some OSC 
> messages do the same thing when [routeOSC] is involved.
> For the second thing, just use
> [udpreceive]
> |
> [unpackOSC]
> |
> [print]
> and switch pages to see what raw message is being sent.
> For the first thing, make a new patch and put a [routeOSC] in it and 
> see what the console prints.
> But then again you don't seem to be able to start Pd at all from the 
> console. Is that correct?
>
> Martin
>
>
> On 2013-09-16 12:08, Mario Mey wrote:
>> Thanks, Martin. I compiled it and test it. Again, in UbuntuStudio
>> 12.04.3, it makes PureData crash. There's no message, it just crashs.
>>
>> Is anything I could do to help to avoid that? How could I debug it?
>>
>> In the other hand, I'm having troubles to launch Pd from console (to see
>> if any message is there)... it can't open my patch. So, I'm writting
>> another mail to list.
>>
>>
>> 2013/9/15 Martin Peach <martin.peach at sympatico.ca
>> <mailto:martin.peach at sympatico.ca>>
>>
>>     On 2013-09-15 16:12, Mario Mey wrote:
>>
>>         I just downloaded complete PureData from svn... but I want to
>>         compile
>>         only your externals. Is that possible? I think so... how?
>>
>>
>>      From trunk/externals type
>>     make mrpeach
>>     or
>>     make mrpeach_install
>>     (which doesn't actually install the files, it puts them in
>>     externals/build/lib/pd-extended/extra)
>>
>>     Martin
>>
>>
>>         Thank you.
>>
>>
>>         2013/9/15 Martin Peach <martin.peach at sympatico.ca
>>         <mailto:martin.peach at sympatico.ca>
>>         <mailto:martin.peach at sympatico.ca
>>         <mailto:martin.peach at sympatico.ca>>>
>>
>>
>>              On 2013-09-14 19:28, Mario Mey wrote:
>>
>>                  Martin Peach, I read somewhere that changing pages in
>>         TouchOSC
>>                  makes Pd
>>                  (or Pd-Ext) to crash. My Pd-Extended doesn't crash, but
>>         this
>>                  error is
>>                  shown: "* routeOSC: ignoring empty list…".
>>
>>
>>
>>              That doesn't happen here. There is no such message in the
>>         source code.
>>              Maybe you have an older version of routeOSC? The OSC
>>         specification
>>              allows empty messages, and [routeOSC] should output a bang
>>         if it
>>              routes such a message.
>>              Older versions of [routeOSC](before March 2012) didn't work
>>              properly, so you probably just need to find a more recent
>>         one or
>>              build it from svn.
>>
>> (http://sourceforge.net/p/__pure-data/svn/HEAD/tree/trunk/__externals/mrpeach/osc/
>>
>> <http://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/mrpeach/osc/>)
>>
>>
>>
>>              Martin
>>
>>
>>
>>                  Today, I've installed Ubuntu Studio 12.04.3 (with
>>         lowlatency
>>                  kernel). It
>>                  seemed that it was a good distro for my use... but
>>         switching
>>                  pages DOES
>>                  make Pd-Extended to crash. I reported-suggested this in
>>         this thread:
>>         http://hexler.net/forum/__viewthread/992/
>> <http://hexler.net/forum/viewthread/992/>, where I
>>         wrote some
>>
>>                  other info,
>>                  maybe usefull.
>>
>>                  The config where it doesn't crash:
>>
>>                  /Ubuntu 12.04, Kernel 3.2.0-49-generic, Pd-Extended
>>         0.43.4 (download
>>                  from PPA as the Pure Data page says), jackdmp 
>> 1.9.8...//
>>                  /
>>                  The other config:
>>
>>                  /Ubuntu Studio 12.04.3, Kernel 3.2.0-51-lowlatency,
>>         same Pd-Extended
>>                  version, Jack that came with UbuntuStudio (don't know
>>         wich version)/
>>
>>
>>                  Any other information that could be useful to fix this?
>>         Like I
>>                  wrote in
>>                  the thread, I suggested TouchOSC that it should send
>>         non-empty
>>                  lists.
>>                  But, TouchOSC is closed-code... so, there's no easy
>>         feedback.
>>
>>
>>
>>
>> _________________________________________________
>>         Pd-list at iem.at <mailto:Pd-list at iem.at> <mailto:Pd-list at iem.at
>>         <mailto:Pd-list at iem.at>> mailing list
>>                  UNSUBSCRIBE and account-management ->
>>         http://lists.puredata.info/__listinfo/pd-list
>> <http://lists.puredata.info/listinfo/pd-list>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> 
>> http://lists.puredata.info/listinfo/pd-list
>>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
Index: routeOSC.c
===================================================================
--- routeOSC.c	(revision 17204)
+++ routeOSC.c	(working copy)
@@ -407,13 +407,17 @@
 
 static void routeOSC_list(t_routeOSC *x, t_symbol *s, int argc, t_atom *argv)
 {
-    if (argv[0].a_type == A_SYMBOL) routeOSC_doanything(x, argv[0].a_w.w_symbol, argc-1, &argv[1]);
-    else
+    if (argc > 0)
     {
-        routeOSC_doanything(x, gensym("/"), argc, argv);
-        if (x->x_verbosity)
-            post("routeOSC_doanything(%p): message pattern is not a symbol, setting path to /", x);
+        if (argv[0].a_type == A_SYMBOL) routeOSC_doanything(x, argv[0].a_w.w_symbol, argc-1, &argv[1]);
+        else
+        {
+            routeOSC_doanything(x, gensym("/"), argc, argv);
+            if (x->x_verbosity)
+                post("routeOSC_doanything(%p): message pattern is not a symbol, setting path to /", x);
+        }
     }
+    
 }
 
 static char *NextSlashOrNull(char *p)
-------------- next part --------------
#N canvas 0 22 450 300 10;
#X obj 63 68 packOSC;
#X obj 63 90 unpackOSC;
#X obj 63 113 routeOSC /1;
#X msg 63 37 send /1;
#X obj 63 165 routeOSC /foo;
#X text 127 38 touchOSC sends this when page switched;
#X text 151 166 the empty /1 crashes pd;
#X msg 28 15 send /1/foo;
#X obj 3 144 print 1;
#X obj 63 187 print 2;
#X obj 182 117 print 3;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 2 0 8 0;
#X connect 2 1 10 0;
#X connect 3 0 0 0;
#X connect 4 0 9 0;
#X connect 7 0 0 0;


More information about the Pd-list mailing list