[Insight-developers] ICE on vs6.0
Bill Lorensen
bill.lorensen at gmail.com
Thu Apr 1 13:38:13 EDT 2010
It could be an ordering problem. I'll wait until you are done with
your updates to find a workaround.
Bill
On Thu, Apr 1, 2010 at 1:32 PM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
> Bill,
> The future means before the 3.18 release. I believe it would be a mistake to
> release this methods in it's current implementation, as it is just a
> skeleton.
>
> The primary goal of this method was to aid in the support for 64-bit
> windows. With the numerous types used with IO, and the sizes of images, this
> function is needed to detect overflow errors to prevent crashes. Support for
> "long long" was also added to the numeric traits, so that we'd have numeric
> traits for the Image::SizeType and size_t on windows 64.
> It is my understanding that Luis believes adding support for win64 is a high
> priority. As such I interpret that to mean that the 3.19 development effort
> will have some focus on making this possible. This methods is a useful tool
> for that work.
> I assume that is just the result of some bug is VS6. Could be as simple to
> fix as just changing the order of the header files in Math.h? Other files
> seem to include itkConceptChecking with out issues.
>
> Brad
>
> On Apr 1, 2010, at 1:07 PM, Bill Lorensen wrote:
>
> If the future means itk 4.0, then can I remove it for now? I assume
> that VS6 will not be supported in itk 4.0.
>
> Bill
>
> On Thu, Apr 1, 2010 at 1:04 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
> wrote:
>
> Darn,
>
> I missed that change! Thanks for finding it. The planned implementation of
>
> CastWithRangeCheck is:
>
> template <typename TReturn,typename TInput>
>
> inline TReturn CastWithRangeCheck(TInput x)
>
> {
>
> itkConceptMacro( OnlyDefinedForIntegerTypes1,
>
> (itk::Concept::IsInteger<TReturn>) );
>
> itkConceptMacro( OnlyDefinedForIntegerTypes2,
>
> (itk::Concept::IsInteger<TInput>) );
>
> TReturn ret = static_cast<TReturn>(x);
>
> if ( sizeof (TReturn) > sizeof(TInput) &&
>
> !( !NumericTraits<TReturn>::is_signed &&
>
> NumericTraits<TInput>::is_signed ) )
>
> {
>
> // if the output type is bigger and we are not converting a signed
>
> // interger to an unsigned interger then we have no problems
>
> return ret;
>
> }
>
> else if ( ret != x ||
>
> ( NumericTraits<TInput>::IsPositive(x) !=
>
> NumericTraits<TReturn>::IsPositive(ret) ) )
>
> {
>
> // this should likely be a new exception class
>
> RangeError _e(__FILE__, __LINE__);
>
> throw _e;
>
> }
>
> return ret;
>
> }
>
> So while it is not needed now, currently it looks like it will be in the
>
> future.
>
> The other issue with the code is the comparison "ret != x". This is correct
>
> and is exactly as it needs to be, as it relies on the default promotion of
>
> types, and default behavior for comparing signed and unsigned integer types.
>
> Unfortunately it generates a warning, and there is not simple explicit
>
> casting which will follow the default promotion rules.
>
> Brad
>
> On Apr 1, 2010, at 12:11 PM, Bill Lorensen wrote:
>
> Brad,
>
> Actually, you also added
>
> #include "itkConceptChecking.h"
>
> to
>
> itkMath.h
>
> If I remove that, the ICE goes away.
>
> Why was that include added? Can I remove it?
>
> Bill
>
> On Wed, Mar 31, 2010 at 8:33 AM, Bradley Lowekamp
>
> <blowekamp at mail.nih.gov> wrote:
>
> Hello,
>
> Yesterday I committed these innocent changes to comments:
>
> http://www.cdash.org/CDash/viewUpdate.php?buildid=574645
>
> Then both the continuous and the night vs60 build generated ICEs:
>
> http://www.cdash.org/CDash/viewBuildError.php?buildid=574645
>
> I have no clue on this one!
>
> Thanks,
>
> Brad
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
> _______________________________________________
>
> 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
>
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
More information about the Insight-developers
mailing list