Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

strange error message

by esr (Scribe)
on Aug 22, 2008 at 00:11 UTC ( #706025=perlquestion: print w/ replies, xml ) Need Help??
esr has asked for the wisdom of the Perl Monks concerning the following question:

I have a program in ActivePerl in a Windows environment which has been used successfully for a long time. I am in the process of making some "improvements" to it and in the debugging process I got an error message which is unintelligble to me. It says:
"Can't coerce UNKNOWN to string in gv at sked.test.pl line 486".
The line number identified is defining an array in a part of the program that hasn't been modified. I don't know how to fix whatever it was that I did to cause this because I don't know what the error message is trying to tell me. Help.

Comment on strange error message
Re: strange error message
by GrandFather (Cardinal) on Aug 22, 2008 at 00:17 UTC

    Odd how a paucity of information precludes giving a helpful answer isn't it? May we see the offending code? Even better, can you show us a small (5 lines or so) runnable sample the reproduces the problem?


    Perl reduces RSI - it saves typing
Re: strange error message
by esr (Scribe) on Aug 22, 2008 at 02:41 UTC
    No I can't send code that reproduces the problem because it is not reproducable at will. It has happened once (so far) and in a line of code some 200 lines past any changes I made to the program. It has all the earmarks of something earlier leaving a turdlet lying around and the later code is stepping in it. Besides, it appears that this error also caused the Perl interpreter/compiler to blow up. The Windows Event Viewer shows application errors for perl.exe with the description "Fault bucket".
    However, for whatever help it might be the line which was attributed to the error is the last in this sequence:
    @sess_funcs = ("F1E","F1W","F1N","F1S"); @v_funcs = ("$oev_code","$oevc_code"); @eprep_funcs = ("$oe_e","$e_e"); @ev_funcs = (@sess_funcs,@v_funcs,@eprep_funcs);
    The last block of code added to the program was some 200 lines earlier:
    if (! $date_to_use) { $msg = "Enter or confirm the date to schedule. \n"; while (! $date_to_use) { $msg .= " (mmmdd, mmmd, or mmm dd)\.\n"; $intext = $excel->InputBox("$msg","Enter date","$assumed_date" +); go_away(16,"Quitting as requested\.") if ($intext eq "0"); $date_to_use = check_date($intext); $msg = "Date error. Re-enter.\n" if (! $date_to_use); } }
    What I am trying to understand it what is meant by trying to "coerce UNKNOWN" and what a "gv" is. I can guess that "gv" might be a global variable but I don't know that.
    A Google search for the string "coerce UNKNOWN" shows other people seeing a similar message but I don't see any explanation for what it means.
      From perldiag
      Can't coerce %s to string in %s (F) Certain types of SVs, in particular real symbol table entries (typ +eglobs), can't be forced to stop being what they are.
      So I'm guessing its a bug in InputBox (whatever that is), or if one of the variables is overloaded, in one of them

        And since this error message template was instantiated as

        Can't coerce UNKNOWN to string in gv at sked.test.pl line 486

        esr would be well advised to search the program text for the strings UNKNOWN and gv.

        Later

        ... or to wait for a better-informed response. Thanks, dave_the_m.

Re: strange error message
by esr (Scribe) on Aug 22, 2008 at 14:53 UTC
    Thanks for all the replies. A subsequent Google search indicates that others have seen similar intermittent messages when using Ctrl-C to terminate execution in a Windows environment. Ctrl-C appears to cause Perl to crash intermittently which is consistent with what I was seeing.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://706025]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2014-09-21 00:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls