Still on the trail of warnings during exit from certain Tk apps I turned on PERL_DESTRUCT_LEVEL 3. Now some of them core-dump instead ;-) Code that causes that is (perl5.005_03) sv.c line 2891: if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) mg_free(sv); Now the sv in question has SvTYPE(sv) == SVTYPEMASK - which is certainly bigger than SVt_PVMG but does not mean that SvANY points to something which will lead to a sane chain of magics to free! The root of the problem is probably still elsewhere, but should sv_clear() just return if SvTYPE(sv) == SVTYPEMASK ? -- Nick Ing-Simmons <nik@tiuk.ti.com> Via, but not speaking for: Texas Instruments Ltd.Thread Next