On Mon, Apr 16, 2012 at 10:08, Christopher Sean Morrison <[email protected]> wrote:
>
> On Apr 16, 2012, at 10:56 AM, Tom Browder wrote:
...
>> [1] Does that mean the tree pointer itself should have been set to
>> zero after the free?
>
> Possibly, but usually the "dead" tree nodes are removed.
After some more investigating I've done the following (trying to take
the "first, do no harm" approach):
1. In db_tree.c in the db_free_tree function I've left this line in (1469):
tp->magic = (uint32_t)-3; /* special bad flag */
and, at the end of the function, inserted these lines:
/* reset magic after recursion */
tp->magic = RT_TREE_MAGIC;
That seems like a conservative way to fix the problem of the smash
flag left in the tree, and all the crashes on g-nff and friends are no
longer happening when calling the db_free_tree function in the catch
block or anywhere else.
I have checked the change in for the db_tree.c as an immediate fix,
but I would appreciate some other eyeballs on it.
2. Given the "fix" in 1, now g-iges bombs at this line of
src/conv/iges/iges.c in function count_non_union_ops(union tree *tp):
RT_CK_TREE(tp);
with this error:
ERROR: bad pointer 0x1ac3ae0: s/b union tree(x91191191), was
Unknown_Magic(x36313573), file
/usr/src/tbrowde/brlcad-svn/brlcad/trunk/src/conv/iges/iges.c, line
2848
I am still investigating that one but not having much luck....
Best regards,
-Tom
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel