<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>@Christof,<br>
      <br>
      I think Joao is needing the *macOS* pdmax.<br>
      <br>
      @Joao,<br>
      <br>
      Everything that Christof said applies if you follow the macOS
      part:<br>
      <br>
      <a class="moz-txt-link-freetext" href="https://github.com/pure-data/pure-data/blob/master/INSTALL.txt">https://github.com/pure-data/pure-data/blob/master/INSTALL.txt</a><br>
      <br>
      you just need to install xcode with this command on a terminal:<br>
      <br>
          xcode-select --install<br>
          <br>
      macOS debugger is included and its called (and invoked with)
      "lldb".<br>
      <br>
      I used it one or two times only. I'm not a mac user.</p>
    <p><br>
    </p>
    <p>--<br>
    </p>
    <pre class="moz-signature" cols="72">Mensaje telepatico asistido por maquinas.</pre>
    <div class="moz-cite-prefix">On 11/17/2021 10:32 AM, Christof Ressi
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:aa69fa55-7758-2084-ed2e-e5406781446c@christofressi.com">
      
      <p>You would have to build the pdmax external from source with
        debug symbols to get meaningful information in the debugger.
        This means you would need to setup Msys2, as described in the
        "Windows" section in <a class="moz-txt-link-freetext" href="https://github.com/pure-data/pure-data/blob/master/INSTALL.txt" moz-do-not-send="true">https://github.com/pure-data/pure-data/blob/master/INSTALL.txt</a>.</p>
      <p>Actually, if the aim is to only get a stacktrace, it is not
        necessary to install a graphical frontend for GDB, you can also
        run GDB from the command line.<br>
      </p>
      <p>I you never compiled somthing from source it can be a bit
        overwhelming at first, but it's a valuable skill to have. There
        are a few Windows people on the list who can help you out
        (including myself).</p>
      <p>So I would say it's not trivial, but also not impossible :-)</p>
      <p>---<br>
      </p>
      <p>That's what I'm doing to debug subprocesses (I also needed to
        do this with [vstplugin~] a few times):<br>
      </p>
      <p>1) run Pd with DSP off and start the subprocess (here: [pd~
        start()</p>
      <p>2) find the PID of the subprocess, e.g. with "tasklist | grep
        <name>" or with ProcessExplorer</p>
      <p>3) attach to the subprocess; terminal:
        <a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/14370972/how-to-attach-a-process-in-gdb" moz-do-not-send="true">https://stackoverflow.com/questions/14370972/how-to-attach-a-process-in-gdb</a>;
        Qt Creator: "Start Debuggin" -> "Attach to Running
        Application"</p>
      <p>4) turn on DSP and wait for the subprocess to crash<br>
      </p>
      <p>If the subprocess crashes immediately even with DSP turned off,
        things are a bit harder.</p>
      <p>---</p>
      <p>If you can build pdmax with Visual Studio (I don't know if this
        is supported?) then things are even easier because VS has a very
        good built-in graphical debugger that can also attach to running
        applications.<br>
      </p>
      <p>Christof<br>
      </p>
      <div class="moz-cite-prefix">On 17.11.2021 14:04, João Pais wrote:<br>
      </div>
      <blockquote type="cite" cite="mid:CAN46m5ptZ9t=SJzm9MjPAzK8dxkK21+dooyTgop-Esd0WJaYfQ@mail.gmail.com">
        <div dir="ltr">is that something a "normal user" like me
          (someone that only uses the surface of the software) can do,
          or it has to do with C or any other custom compiled/prepared
          versions?</div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, 17 Nov 2021 at
            01:06, Christof Ressi <<a href="mailto:info@christofressi.com" moz-do-not-send="true" class="moz-txt-link-freetext">info@christofressi.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">You can attach GDB to a
            running or even a not-yet-running application. <br>
            When that application crashes, you get a backtrace. That's
            how I found <br>
            the crash in the [pd~] subprocess.<br>
            <br>
            Personally, I use Qt Creator because it has a nice graphical
            front-end <br>
            for GDB where I can easily step through functions while
            looking at the <br>
            code, watch local variables, etc.<br>
            <br>
            Christof<br>
            <br>
            On 17.11.2021 00:49, Miller Puckette via Pd-list wrote:<br>
            > If by any chance you're using pd 0.52 (test version)
            then I think<br>
            > it can crash when used as a subprocess (this should be
            fixed for the next<br>
            > test release).  If you're using Pd 0.51-4 the problem
            is something else.<br>
            ><br>
            > The "broken pipe" message means the subprocess died
            suddenly for some reason.<br>
            > But I can't think of an easy way to figure out what
            killed it.<br>
            ><br>
            > cheers<br>
            > Miller<br>
            ><br>
            > On Sat, Nov 06, 2021 at 08:45:28PM +0100, João Pais
            wrote:<br>
            >> Hello list,<br>
            >><br>
            >> I have a max patch with pd inside through the pd~
            object. But I'm getting<br>
            >> the "broken pipe" error in some cases in a mac,
            such as:<br>
            >><br>
            >> - in a compiled standalone it usually works<br>
            >><br>
            >> - in the original patch it doesn't<br>
            >><br>
            >> - both patches were made in the same system, with
            the latest pdmax and pd<br>
            >> versions were used. I'm not sure anymore which max
            version or macos system<br>
            >> was used to compile the standalone, if that's
            important (it was either max 7<br>
            >> or 8).<br>
            >><br>
            >> I don't have access to a mac myself, but the system
            where it was tested was<br>
            >> a 11.6, with Max 8. It seems to me that in some
            systems it works, and in<br>
            >> other it doesn't - but I don't have enough hard
            data to prove it.<br>
            >><br>
            >> Best,<br>
            >><br>
            >> Joao<br>
            >><br>
            >><br>
            >><br>
            >><br>
            >> _______________________________________________<br>
            >> <a href="mailto:Pd-list@lists.iem.at" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">Pd-list@lists.iem.at</a>
            mailing list<br>
            >> UNSUBSCRIBE and account-management -> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=sR96adpeL4KB76yEfQG-D8WqWrtlw2sW2qCwz_nEjLiuLt0KgKMIh-Lc-HCrSJcC&s=K9LPmjo4sdbRhF9wuUqbYoL5l1WxeUKav5yEeAse22o&e=" rel="noreferrer" target="_blank" moz-do-not-send="true">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=sR96adpeL4KB76yEfQG-D8WqWrtlw2sW2qCwz_nEjLiuLt0KgKMIh-Lc-HCrSJcC&s=K9LPmjo4sdbRhF9wuUqbYoL5l1WxeUKav5yEeAse22o&e=</a><br>
            <br>
            <br>
            <br>
            _______________________________________________<br>
            <a href="mailto:Pd-list@lists.iem.at" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">Pd-list@lists.iem.at</a>
            mailing list<br>
            UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.puredata.info/listinfo/pd-list</a><br>
          </blockquote>
        </div>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
  </body>
</html>