On Sun, Feb 02, 2014 at 05:49:06PM -0500, Karl Dahlke wrote: > What does this do? > When I parse the html page I build a link list of tag structures, > one for each <tag> on the page. > Then at the end, buildTagArray copies them over into one linear array > for easy access. > Now I can get my hands on tag[17] easily. > But ... have a look at the structure htmlTag. > It has this member. > > struct htmlTag *controller; > > This usually points to the form that owns the tag. > So an input field, or a submit or reset button, > or radio button, they all point back to the form that contains it. > Ok but that's a pointer, and it points to the form tag > that was put into my link list. > When all those tags are copied over into the array, > the pointers are not updated. > They still point back to the structures in my link list. Yeah, but this array is an array of pointers to structs. However if things get reallocated then you'll get this divergence. Perhaps that's why t->controller is causing the weird jsrt segfault I was reporting. I'd always assumed it was some strange js and html interaction, but if something in what I'm doing is causing the form tag to be reallocated before I click the reset button then that'd explain the segfault with the t->controller pointer. Anyway, I'm glad you're going to sort this.
Cheers, Adam. _______________________________________________ Edbrowse-dev mailing list [email protected] http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
