View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013018VTK(No Category)public2012-03-21 09:192013-06-25 09:35
ReporterPavel Pokutnev 
Assigned ToDave DeMarle 
PriorityhighSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version5.10.0 
Summary0013018: BUG: vtkFixedPointVolumeRayCastMapper in MFC Application, non standard std::bad_alloc behavior
DescriptionvtkFixedPointVolumeRayCastMapper causes MFC application to crash on 32-bit systems, during rendering of big volumes. The problem is the non standard hahavior of the new operator. MFC provides its own operator new, which throws, instead of std::bad_alloc, a CMemoryException* on allocation failure. This is also the case in vtkFixedPointVolumeRayCastMapper during allocation of ContiguousGradientNormal and ContiguousGradientMagnitude in the ComputeGradients() function.

To work around this issue we can either use "catch(...)" instead of "catch(std::bad_alloc &)" or use the "new (std::nothrow)"!

This behavior was verified under VS9 and VS10!

Please see this article for more details on std::bad_alloc handling under VC++: http://msdn.microsoft.com/en-us/magazine/cc164087.aspx [^]
TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files

 Relationships

  Notes
(0028379)
Pavel Pokutnev (reporter)
2012-03-21 09:24

vtkFixedPointVolumeRayCastMapper is also the only place where std::bad_alloc is used!
(0031037)
Dave DeMarle (administrator)
2013-06-25 09:32

Fixed in 5.10:
commit 7e16b6a01a3948f596c066ea2b9082dd90b66d67
Author: Pavel Pokutnev <pavel.pokutnev@googlemail.com>
Date: Tue Mar 27 14:01:28 2012 -0400

Thanks!

 Issue History
Date Modified Username Field Change
2012-03-21 09:19 Pavel Pokutnev New Issue
2012-03-21 09:24 Pavel Pokutnev Note Added: 0028379
2013-06-25 09:32 Dave DeMarle Note Added: 0031037
2013-06-25 09:32 Dave DeMarle Project VTK => ParaView
2013-06-25 09:33 Dave DeMarle Project ParaView => VTK
2013-06-25 09:34 Dave DeMarle Status backlog => todo
2013-06-25 09:34 Dave DeMarle Resolution open => fixed
2013-06-25 09:34 Dave DeMarle Fixed in Version => 5.10.0
2013-06-25 09:35 Dave DeMarle Assigned To => Dave DeMarle
2013-06-25 09:35 Dave DeMarle Status todo => active development
2013-06-25 09:35 Dave DeMarle Status active development => gatekeeper review
2013-06-25 09:35 Dave DeMarle Status gatekeeper review => customer review
2013-06-25 09:35 Dave DeMarle Status customer review => closed


Copyright © 2000 - 2018 MantisBT Team