On Sep-02, Nicholas Clark wrote:
> On Thu, Sep 01, 2005 at 10:24:14PM -0700, Steve Fink wrote:
> > I get this error message in my embedded perl app. I used to get it, then
> > I cleaned up some refcounting bugs, and it went away. Later, it came
> > back (very probably due to a different cause). I know I'm not giving
> > enough information to go on, but can anyone tell me what this means and
> > give me any tips on how to go about tracking it down?
> 
> Well, it comes about because the source SV type passed to sv_setsv() isn't
> one of the types it can cope with. It's not expecting to copy hashes (or
> arrays or a few other things), and usually everyone passes references to
> the complex types. I know how to provoke the error with pure perl, but only
> for IOs:
> 
> $ perl -e '$a = ${*STDOUT{IO}}'
> Bizarre copy of IO in sassign at -e line 1.
> 
> As to what the debugger is doing, or how to diagnose this better, I don't
> really have any clues.

You are awesome.

That problem has been haunting me for half a year, and I've just been
ignoring it. Your description was enough for me to find the bug within 5
minutes. I had an Inline::CPP function returning an SV*, but I was
casting an HV* to SV* rather than making a reference.

Yay, I have the debugger back! (And I think it fixed another bug that
I've been meaning to hunt down...)

Reply via email to