[Insight-developers] Recent changes to arrow code are causing numerical exceptions

Gabe Hart gabe.hart at kitware.com
Mon Jun 14 10:23:08 EDT 2010


Great.  Thanks for the help.  I'll look into both options and see which 
makes the most sense in the context.

-Gabe

On 06/14/2010 10:18 AM, Bill Lorensen wrote:
> Gabe,
>
> No problem. We appreciate your efforts. All of us make these mistakes.
> The important thing is to fix them as quickly as possible.
>
> The VS6 problem is because that compiler is pretty broken. You will
> either have to use an enum or a #define.
>
> This page describes the issue:
> http://support.microsoft.com/kb/241569
>
> Bill
>
> On Mon, Jun 14, 2010 at 9:20 AM, Gabe Hart<gabe.hart at kitware.com>  wrote:
>    
>> Hi Bill,
>>
>> This has been my "learn the ropes" coverage/bug fix project, so I apologize
>> for the messy dashboard the last few days.  The bug you found in the test is
>> an artifact of trying to get things fixed before leaving on Friday
>> (something Luis has just informed me is not probably a good thing to do).
>>   The errors that were arising last week came about because I was trying to
>> modify MetaArrowConverter so that it properly handled the Position and
>> Direction fields from itkArrowSpatialObject.  My initial attempt at this was
>> to put the Direction field from the spatial object into the Orientation
>> field from the meta object.  After some investigation we realized that this
>> was trying to shoehorn a vector into a matrix.  We then decided that the
>> best course of action was adding a new field to the MetaArrow object to
>> specifically hold the direction vector.  The bug you identified was a
>> leftover from the first fix (Direction ->  Orientation) which I should have
>> caught when making the initial changes.  I'm fixing it now, so it should be
>> all set soon.
>>
>> There does seem to be another issue which is coming from the VS6 compilers
>> around initializing a constant in the MetaArrow.h header file.  I'll get on
>> fixing this asap also.
>>
>> -Gabe
>>
>> On 06/14/2010 09:02 AM, Bill Lorensen wrote:
>>      
>>> OK, here is the problem I think.
>>>
>>> The zero divide is occurring in itkMetaArrowConverterTest at the
>>> newMetaDirectionNorm.Normalize();
>>> The newMetaOrientation is all zeroes...
>>> Looking back, the direction is obtained from newMetaArrow which is
>>> created by the converter.
>>>
>>> The converter internally creates a smartpointer to a spatialobject and
>>> returns it. I believe this is not correct. Doesn't the smartpointer go
>>> away when it loses scope?
>>>
>>> Looks like the code has been there for 5 1/2 years. Looking at an old
>>> coverage log:
>>>
>>> http://www.cdash.org/CDash/viewCoverageFile.php?buildid=623555&fileid=10859113
>>> seems like the MetaArrowConverter class was never tested.
>>>
>>> Bill
>>>
>>>
>>> On Mon, Jun 14, 2010 at 7:40 AM, Luis Ibanez<luis.ibanez at kitware.com>
>>>   wrote:
>>>
>>>        
>>>> Hi Gabe,
>>>>
>>>> Can you please take a look at this problem ?
>>>>
>>>> A common cause is to have divisions by zero...
>>>> (but there may be other reasons..).
>>>>
>>>>
>>>>    Thanks
>>>>
>>>>
>>>>        Luis
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------------
>>>> On Sun, Jun 13, 2010 at 11:53 AM, Bill Lorensen<bill.lorensen at gmail.com>
>>>> wrote:
>>>>
>>>>          
>>>>> Folks,
>>>>>
>>>>> I did not try to track down the culprit, but recent changes to the
>>>>> spatial object arrow code is causing numerical exceptions on the
>>>>> borland compiler.
>>>>>
>>>>>
>>>>> http://www.cdash.org/CDash/testSummary.php?project=2&name=itkMetaArrowConverterTest&date=2010-06-13
>>>>>
>>>>> This is probably not Borland specific. The Borland compiler is the
>>>>> only one that enables floating point exceptions.
>>>>>
>>>>> Bill
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>> http://kitware.com/products/protraining.html
>>>>>
>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>
>>>>>            
>>>>
>>>>          
>>
>>      



More information about the Insight-developers mailing list