<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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">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">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">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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>
  </body>
</html>