Previously, the Pd gui did this itself (mostly by forcing windows always on the main screen) but we changed to to ask Tk to do it. It now looks like the new versions of Tk on macOS aren't quite successful and there is a bug. These seemed to work fine for me when I was working on it for Pd 0.48 but maybe Mojave behaves differently?
From: Michael Straeubig <straeubig@gmail.com>To: pd-list@lists.iem.atSubject: [PD] pd crashing with patches saved on a 2-monitor setup (plus workaround)Message-ID: <CAHkHHym27M0-iQWQeKajfwwBqJ=syJUiJxhsU9qP+ybFG0Gf=Q@mail.gmail.com>Content-Type: text/plain; charset="utf-8"Hi,I thought this might be helpful if someone runs into similar problems.I have a number a small patches I made in August 2014 with the pd versionat that time. Now I tried to open those patches on my current setup (Mac OS10.14.1 Mojave, pd 0.49-1.64 bit). Most of those patches crashed onstartup. Same result with the 32bit version and with pd 0.48-1 as well. Pd0.47 and earlier do not run on Mojave, so I couldn't test. I was sure thesepatches worked in the past...This is the crash log.Application Specific Information:*** Terminating app due to uncaught exception'NSInternalInconsistencyException', reason: 'Invalid parameter notsatisfying: CGRectContainsRect(CGRectMake((CGFloat)INT_MIN,(CGFloat)INT_MIN, (CGFloat)INT_MAX - (CGFloat)INT_MIN, (CGFloat)INT_MAX -(CGFloat)INT_MIN), frame)'abort() calledterminating with uncaught exception of type NSExceptionThe first line of one of the offending patches:#N canvas 681 -998 1010 411 10;The negative value piqued my interest. It comes from a setup with twomonitors where monitor 2 is on top (north) of monitor 1. Whenever a patchis saved while on monitor 2, this value is negative and newer pd's crashopening the patch next time. More experimentation: creating a new patch andsaving while it is on monitor 2 produces the same result.Workaround: opening the patch with an editor and changing the value to apositive number lets pd open the patch normally.Best,M