Sean/ Daniel,
I have made a new 'g-voxel.c' that can output a file voxels.txt which gives
the percentage fill of all the voxels by region-- that is,
coordinates of voxel----total distance filled----percentage filll due to
each region.
For keeping track of the regions, i save the name using bu_vls_strgrab. Now
this program gives correct results.
However, since the name of the region was set many times, I made a function
which looks like this:
void setRegionName(struct bu_vls **vp, const char **nameSource, const char
**nameDestination) {
size_t newlen;
bu_vls_vlsinit(*vp);
newlen = strlen(*nameSource);
bu_vls_setlen(*vp,newlen);
(*vp)->vls_str = (char *)(*nameSource);
*nameDestination = bu_vls_strgrab(*vp);
}
[ basically the same set of commands was used even when I was doing it in
the hit callback function ]
however, I get an error saying:
"ERROR: bad pointer 0x82bfc30: s/b bu_vls(x89333bbb), was librt
seg(x98bcdef1), file /home/anurag/brlcad1506/src/libbu/vls.c, line 166
ERROR: bad pointer 0x82bfc30: s/b bu_vls(x89333bbb), was librt
seg(x98bcdef1), file /home/anurag/brlcad1506/src/libbu/vls.c, line 166
Saving stack trace to (BRL-CAD)-10720-bomb.log"
I do not understand why the same code inside the hit callback function does
not give the error, but when used as a function is giving this error.
Can you please help?
Thanks and regards,
--
Anurag Murty
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel