POV-Ray : Newsgroups : povray.off-topic : Context switching : Re: Context switching Server Time
4 Sep 2024 13:16:57 EDT (-0400)
  Re: Context switching  
From: Jim Henderson
Date: 24 Apr 2010 16:33:22
Message: <4bd35592$1@news.povray.org>
On Sat, 24 Apr 2010 19:27:38 +0100, Orchid XP v8 wrote:

>>> Isn't trying to figure out why an arbitrary piece of code doesn't work
>>> formally equivilent to the Halting Problem? (With non-termination
>>> simply being the most basic kind of program bug...)
>> 
>> You're not asking grep to tell you why it failed, just to tell you
>> where in the code the error is so one can manually inspect the file and
>> see if one can determine why the failure occurred.
> 
> Oh, sure. I just meant that even once grep has found the location for
> you, the task you're attempting to perform is almost impossible
> anyway...

Clearly it is, because I've only done it several times in my lifetime. ;-)

Come to that, I've even somehow managed this "impossible" or "almost 
impossible" task a few times *without access to the code*. <gasp>

(There you go again, assuming because you can't see how it could be done 
that it must be absolutely impossible for anyone to do - you really need 
to stop doing that).

Now, from a *practical* standpoint, with access to the source, the way I 
would do it is this:

1.  Grep for the error code in the source tree.
2.  Look at the function the error code is in; if it's a generic error 
function, then it becomes a little more tricky, but not impossibly so, 
because:
3.  I can use a tool like Source Navigator NG to show me the function 
call stack; walking backwards through the stack and seeing what 
conditions must exist in order to end up with that error message can 
point to several causes.
4.  Then look at the options for causes, and see which one is likely on 
the system.
5.  If it is easy to reproduce the cause, try it and see if the result is 
what was expected.

Not so difficult to do - and I don't have a background in software 
engineering. ;-)

Jim


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.