Closed Bug 245960 Opened 16 years ago Closed Last year

GtkMozEmbed gets stuck when rendering large buffers

Categories

(Core Graveyard :: Embedding: GTK Widget, defect, major)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: conrad, Assigned: blizzard)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040602 Firefox/0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040602 Firefox/0.8

When I use the GtkMozEmbed widget to render a large buffer from memory, it gets
stuck waiting. Backtrace:

#0  0x409f3115 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0x406a0387 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
#2  0x409d886f in PR_WaitCondVar () from /usr/lib/libnspr4.so
#3  0x409d8bb7 in PR_Wait () from /usr/lib/libnspr4.so
#4  0x40947398 in nsPipeOutputStream::Wait () from /usr/lib/libxpcom.so
#5  0x409477df in nsPipeOutputStream::WriteSegments () from /usr/lib/libxpcom.so
#6  0x4094789e in nsPipeOutputStream::Write () from /usr/lib/libxpcom.so
#7  0x404c8890 in EmbedStream::Append () from /usr/lib/libgtkembedmoz.so
#8  0x404c86ad in EmbedStream::AppendToStream () from /usr/lib/libgtkembedmoz.so
#9  0x404c2fa2 in EmbedPrivate::AppendToStream () from /usr/lib/libgtkembedmoz.so
#10 0x404c0960 in gtk_moz_embed_render_data () from /usr/lib/libgtkembedmoz.so
#11 0x08048d84 in main ()

Reproducible: Always
Steps to Reproduce:
The following program demonstrates the error on my machine:

#include <stdio.h>
#include <gtk/gtk.h>
#include <gtkmozembed.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
        GtkWidget *window;
        GtkWidget *mozembed;
        GtkWidget *container;
        char *url;
        char *str;
        int i;
        gtk_init(&argc, &argv);

        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

        mozembed = gtk_moz_embed_new();

        gtk_container_add(GTK_CONTAINER(window), mozembed);

        gtk_widget_set_usize(window, 400, 300);
        gtk_widget_show_all(window);

        str =(char*) malloc(10000*12);
        for (i=0;i<10000; i++)
                memcpy((void*)&str[i*11], (void*)"<p>test</p>", 11);
        str[11*10000] = '\0';

        url = (argc > 1) ? argv[1] : (char *)"localhost";
        gtk_moz_embed_render_data(GTK_MOZ_EMBED(mozembed), str, strlen(str),
"file:///", "text/html");

        gtk_main();

        return 0;
}

It can be compiled with:
g++ -o test test.c `mozilla-config --libs gtkembedmoz` `pkg-config --libs
gtk+-2.0` -lgtkembedmoz `mozilla-config --cflags gtkembedmoz` `pkg-config
--cflags gtk+-2.0`

Actual Results:  
The program hung. See backtrace above

Expected Results:  
Display a bunch of paragraphs with the phrase "test".
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
I just checked to see if the bug is still present in Mozilla 1.7.11 and it is
still there... I've worked around the problem in my application, but it would be
nice to have this bug fixed.
QA Contact: pavlov → gtk-widget
Product: Core → Core Graveyard
May be this bug is related to the bug 1060711.
Embedding: GTK Widget isn't a thing, closing.
Status: UNCONFIRMED → RESOLVED
Closed: Last year
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.