On Wed, Jan 03, 2018 at 09:13:54PM -0500 I heard the voice of
Terran Melconian, and lo! it spake thus:
>
> For me, however, this code gets invoked TWICE. The second time
> around, the string has been modified by mkstemp already, so it now
> contains an invalid pattern, and the 2nd call to mkstemp fails with
> an Invalid Argument error.
Yes, this was fixed in trunk post 4.0.1; patched over in r597 and
better fixed with some other parse_m4 overhauls in r598. It may be
easy enough to just grab and ru ntrunk instead of the release; there's
not a ton of churn between.
> The second problem, however, was out of my depth. It's an assertion
> failure in otp.c. I turned on OTP debugging, and this is what I
> get:
>
> [...]
>
> I'm rather at a loss with this one, so I'm hoping you can help.
I'd guess it's probably an interaction with the multiple Screen's;
that's probably not a well-tested codepath nowadays. My guess[0] is
that what's happening is that nwins counts up the number of entries in
the OWL list, starting with bottomOwl. Then it counts down the number
of windows ctwm knows about by looping from Scr->FirstWindow forward.
And then it checks to see if the numbers match.
But Scr->FirstWindow would be the windows on this Screen. The
bottomOwl is the OWL's that the running ctwm knows about. And so you
count up from all the Screens, but then count down from just one,
leaving you with a result that ain't 0 or -1, so *kB*.
So, as that local bit of code stands, I'd say the assertion _is_ wrong
for multi-Screen incarnations, so just removing it isn't exactly
wrong. Might be worth looking more into what crashes later, whether
it's in OTP or elsewhere, to see if it's strictly related or
coincidental.
It may be that teaching OTP about multiple Screen's is the right path
forward though. Other people know the OTP code better than me, so
some double checks and alternate perspectives are in order.
[0] Bear in mind, though, that it's into Thursday as I write this, and
the sun was high on Tuesday when I woke up, so it's possibly that
guess was brought to me on the back of the small invisible green
elephant that's been telling jokes and keeping me company for the
past few hours :)
--
Matthew Fuller (MF4839) | [email protected]
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.