On 2 Apr 2010 23:54:54 +0100, Chris Young wibbled on for an age:

> > Pasting text into multi-line text input areas since the new-cache
> > merge appears to be broken.  It is completely freezing NetSurf here
> > (I'm not getting any debug from it at all), however single-line text
> > input fields are fine.
> 
> On further investigation, it appears that simply trying to put a
> newline character (0x0a) into a multi-line field is enough to
> reproduce this crash.

I have now tracked this back as far as line 1964 in
desktop/textinput.c (function textarea_insert_break):
char *text = talloc_array(bw->current_content, char, text_box->length
+ 1);

If the context part of the talloc_array call is replaced by NULL, it
then works (but crashes at the next hurdle - box_create calling talloc
with the dodgy context).

The only suggestion I have as to why this is happening, is that
bw->current_content was being allocated with talloc before the merge,
and now isn't.

Replacing all the contexts in this function with with NULL isn't
really a solution as I suspect it will screw up NetSurf's memory
management.

John-Mark, please can you check where and how the memory for
current_content is being allocated?

Chris

Reply via email to