"Variable is undefined: conversion destination variable." [message #54549] |
Tue, 26 June 2007 17:42  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Hi IDL folks,
Exciting! A First-Time IDL Error!
This is a variant, of sorts, on the problem IDL has with "functions
that return UNDEFINED" (http://groups.google.com/group/comp.lang.idl-
pvwave/browse_thread/thread/954c06bc4c1714/3682f2ba899b68d2?
lnk=gst&q=undefined+return&rnum=1&hl=en#3682f2ba 899b68d2)
Like that older problem, this one halts execution with no indication
of where the error occurred:
% Variable is undefined: Conversion destination variable.
% Execution halted at: $MAIN$
This time, I'm running an IDL script with '.run' (forget what the IDLy
term is for that), which calls a bunch of subroutines to do its
business. For those who don't use it regularly, this run-mode does
give line numbers where errors occurred, since the file is "compiled"
before running. Except in this case, it doesn't.
I said it in the previous thread and I'll say it again here: this
should *never* happen. The existence of an exception that causes IDL
to halt execution and not say where it stopped indicates a bug.
Without any indication of where the error occurs, I'll probably just
fiddle until it goes away and not be any wiser. I'll repost if I
actually uncover the root cause, or if I whittle my script down to a
small case that illustrates this problem.
Happy hacking,
Edward H.
|
|
|
Re: "Variable is undefined: conversion destination variable." [message #54680 is a reply to message #54549] |
Wed, 27 June 2007 10:40  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Hello,
Ed Hyer wrote:
>> You forgot "in MY program" at the end of that sentence. If written
>> properly, the information will be available to you. Certainly you
>> can't blame this on IDL, but, again, EBKAC.
>
> I beg to differ. IDL, being a high-level language, provides
> rudimentary debugging as part of its built-in error handling. As you
> point out, there is in this case an error, in my code, which causes
> IDL to halt execution. However, in the case of this particular
> exception, there is an error, in IDL's error-handling routine, which
> results in the location where the exception occurs not being reported.
> Fixing errors in my own code is nothing new, it's what I do all day.
> But if I wanted to fix code without the benefit of any indication of
> where the error occurred, I'd write in assembly language.
>
> I am not asking anyone to fix whatever was in my code that caused IDL
> to crap out. I am reporting a flaw in IDL's error-handling that
> results in certain exceptions not reporting proper debugging
> information.
That could very well be, but I don't see how you can be sure of that until you know what
is causing the error.
It's the usual 99%/1% rule, i.e. 99% of the time you think it's a compiler (or in this
case, IDL) bug, it's not. :o)
cheers,
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|
Re: "Variable is undefined: conversion destination variable." [message #54682 is a reply to message #54549] |
Wed, 27 June 2007 08:44  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
> You forgot "in MY program" at the end of that sentence. If written
> properly, the information will be available to you. Certainly you
> can't blame this on IDL, but, again, EBKAC.
I beg to differ. IDL, being a high-level language, provides
rudimentary debugging as part of its built-in error handling. As you
point out, there is in this case an error, in my code, which causes
IDL to halt execution. However, in the case of this particular
exception, there is an error, in IDL's error-handling routine, which
results in the location where the exception occurs not being reported.
Fixing errors in my own code is nothing new, it's what I do all day.
But if I wanted to fix code without the benefit of any indication of
where the error occurred, I'd write in assembly language.
I am not asking anyone to fix whatever was in my code that caused IDL
to crap out. I am reporting a flaw in IDL's error-handling that
results in certain exceptions not reporting proper debugging
information.
|
|
|
Re: "Variable is undefined: conversion destination variable." [message #54686 is a reply to message #54549] |
Wed, 27 June 2007 06:50  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jun 26, 7:42 pm, Ed Hyer <ejh...@gmail.com> wrote:
> Hi IDL folks,
>
> I said it in the previous thread and I'll say it again here: this
> should *never* happen. The existence of an exception that causes IDL
> to halt execution and not say where it stopped indicates a bug.
>
You forgot "in MY program" at the end of that sentence. If written
properly, the information will be available to you. Certainly you
can't blame this on IDL, but, again, EBKAC.
You should be able to determine the offending code in any number of
ways, such as print statements, breakpoints, etc.
|
|
|