Short: EotL: set_prompt() causes check-refcounts to fail
Date: Mon, 27 Mar 2000 17:27:22 -0600
From: Casey Zacek <cz@800hosting.com>
Type: Bug
State: Abandoned - not reproducible.
I'm starting to think so too... the crash I sent you was caused by
using:
set_prompt("> ");
And then the next backend refcount check would crash. With a refcount
off by one from what it "should be" in the this_player() body. Actually
any string or closure, but not int, would cause it.
We have saved prompt format strings like
%c[hyellow]%M[*]%c[hred]%N[*]%c[hgreen]%f[*]%c[norm]%c[hcyan]%i[*]%c[norm]%c[green]%T[%T]%c[hcyan]:%c[hblue]%P>%c[norm]
which put all kinds of nice information in our prompts using closures.
Anyway, I wasn't thinking about how it was automatically setting my
prompt when I entered the game to that closure. It was only *after*
my prompt was already a closure that using set_prompt(string|closure)
crashed because of refcounts. I used the simplest "prompt string" I
could think of that we have ("%n>" == newline then '> ') (and yes, it
generates a closure even for that, sigh), then I tried set_prompt("> ")
and it crashed with:
2000.03.29 14:09:33 Bad ref count in object secure/wizard/body#1, 31 - 30
on the next refcount check. I was doing this on a test mud where I
was the only participant and there were very few objects loaded.
Analysis: Not reproducible using the test_master.c.