[Qgis-developer] Re: Segmentation fault while reading raster maps

Peter Ersts ersts at amnh.org
Thu Feb 12 18:08:48 EST 2009


JJL wrote:
>> mColorShadingAlgorithm is an enum so it will always be initialized. Your
>> suggested fix works because you have effectively just "turned off" shading.
>>     
> Hum, sounds quite strange to me. If I dump the value of
> mColorShadingAlgorithm at the beginning of setColorShadingAlgorithm, I
> have 0 or very weird values (see attached txt file) Just before the
> crash, its value is 3, the same as theShadingAlgorithm
> Also the attached c++ code give me strange results.
> But I'm not a C++ developer, only a C one. So I'm really lost with all
> this C++ stuff (and qgis is huge). Surely I missed something.
>   
Well, would you look at that. I stand corrected on enums defaulting to 
their first value.

I will take a look through, because regardless of whether the color 
shading algorithm is initialized/set or not, a default  shader exists 
and it should be stable in its initial "uninitialized" state.

-pete

-- 
====================================
Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org

Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS

Open Source,
...evolving through community cooperation to change the world bit by bit



More information about the Qgis-developer mailing list