如何调查“尝试释放未引用的标量“ [英] How to investigate " Attempt to free unreferenced scalar"

查看:124
本文介绍了如何调查“尝试释放未引用的标量“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Perl脚本(使用本地编写的模块,正在开发中)刚刚开始生产零星的



尝试释放未引用的标量: SV 0xa6e685c,Perl解释器:
0x96d9008在全球销毁。



消息。这是始终可重复的,在某种意义上,特定的命令序列总是产生消息,如果有的话,但我没有设法隔离引起它的简单或独立的情况。特别是,我从Perl调试器运行脚本时还没有看到(调试使用IPC :: Open3的脚本运行我的目标脚本时可以得到它)。



我意识到这只是Perl中的一个错误,但是更有可能成为我正在做的事情,很可能在调用SVN :: Client的过程中;但我被困了一个调查方式,我想知道有没有人有任何指针。



Perl 5.10.0;各种版本的Fedora Linux。我将在Perl 5.12上尝试一下,除非它也显示在那里,这不会真的帮助我。
编辑:在5.10中可靠地给出消息的特定情况不在5.12中。不幸的是,这并不真的告诉我什么。

解决方案

晚回答,但是我写了一篇关于这个特定主题的文章帮助调试:可怕的尝试释放未引用的标量


A Perl script (which uses a load of locally-written modules, and is under active development) has just started producing sporadic

" Attempt to free unreferenced scalar: SV 0xa6e685c, Perl interpreter: 0x96d9008 during global destruction."

messages. This are always repeatable, in the sense that a particular sequence of commands always produces the message if it ever does, but I've not managed to isolate a simple or stand-alone case which elicits it. In particular, I haven't yet seen it when running the script from the Perl debugger (I can get it when debugging a script which uses IPC::Open3 to run my target script.)

I realise that this is just possibly a bug in Perl, but much more likely to be something I'm doing, very likely round my calls to SVN::Client; but I'm stumped for a way to investigate it, and I wondered if anybody had any pointers.

Perl 5.10.0; Various versions of Fedora Linux. I'm going to try it on Perl 5.12, but unless it manifests there too, it won't really help me. Edit: a particular case which reliably gives the message in 5.10 doesn't in 5.12. Unfortunately that doesn't really tell me anything.

解决方案

Late answer, but I wrote a long article about this particular topic that should help with debugging: The Dreaded "Attempt to free unreferenced scalar".

这篇关于如何调查“尝试释放未引用的标量“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆