In the specific case you mention (improper use of an array), valgrind will usually catch the error.
-Nicholas On Thu, Aug 12, 2010 at 2:24 PM, Torsten Rupp <[email protected]> wrote: > Dear developers, > > sometimes I see a SigSegV when using blender. When I'm able to > reproduce the problem I try to trace it back. Sometimes it is a > problem either with an array (to small or not initialized) or with > some pointer. With other software projects I made good > experiences to place assert() in the code to detect such problems > early and and trace it back more easily instead of running into a > SigSegV. > > For example, it may be helpful to add an assert-check before accessing > an array (check if array is not NULL and check the size) or > deferencing a pointer. Also pre- and post-conditions may help to find > bugs more easily. > > I know there are already assert()-checks in the blender code. Were > adding more assert()-code ever a discussion here? > > Best regards, > > Torsten > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
