edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] What? How did this ever work?
Date: Mon, 3 Feb 2014 12:23:23 +0000	[thread overview]
Message-ID: <20140203122323.GE32200@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140102174906.eklhad@comcast.net>

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.

      parent reply	other threads:[~2014-02-03 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02 22:49 Karl Dahlke
2014-02-02 23:01 ` Chris Brannon
2014-02-03 12:23 ` Adam Thompson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140203122323.GE32200@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).